提交 92b67598 编写于 作者: P Peter Zijlstra 提交者: Ingo Molnar

perf: Change the is_software_event() definition

The is_software_event() definition always confuses me because its an
exclusive expression, make it an inclusive one.
Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 22e19085
...@@ -814,9 +814,14 @@ extern int perf_event_overflow(struct perf_event *event, int nmi, ...@@ -814,9 +814,14 @@ extern int perf_event_overflow(struct perf_event *event, int nmi,
*/ */
static inline int is_software_event(struct perf_event *event) static inline int is_software_event(struct perf_event *event)
{ {
return (event->attr.type != PERF_TYPE_RAW) && switch (event->attr.type) {
(event->attr.type != PERF_TYPE_HARDWARE) && case PERF_TYPE_SOFTWARE:
(event->attr.type != PERF_TYPE_HW_CACHE); case PERF_TYPE_TRACEPOINT:
/* for now the breakpoint stuff also works as software event */
case PERF_TYPE_BREAKPOINT:
return 1;
}
return 0;
} }
extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX]; extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册