perf: Provide a separate task context for swevents
Since software events are always schedulable, mixing them up with hardware events (who are not) can lead to funny scheduling oddities. Giving them their own context solves this. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: paulus <paulus@samba.org> Cc: stephane eranian <eranian@googlemail.com> Cc: Robert Richter <robert.richter@amd.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Lin Ming <ming.m.lin@intel.com> Cc: Yanmin <yanmin_zhang@linux.intel.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
8dc85d5472
commit
89a1e18731
@@ -952,14 +952,7 @@ extern int perf_event_overflow(struct perf_event *event, int nmi,
|
||||
*/
|
||||
static inline int is_software_event(struct perf_event *event)
|
||||
{
|
||||
switch (event->attr.type) {
|
||||
case PERF_TYPE_SOFTWARE:
|
||||
case PERF_TYPE_TRACEPOINT:
|
||||
/* for now the breakpoint stuff also works as software event */
|
||||
case PERF_TYPE_BREAKPOINT:
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
return event->pmu->task_ctx_nr == perf_sw_context;
|
||||
}
|
||||
|
||||
extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX];
|
||||
|
Reference in New Issue
Block a user