summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-01-18 16:02:16 +0300
committerIngo Molnar <mingo@elte.hu>2010-01-21 15:40:40 +0300
commit92b6759857ea3ad19bc6871044e373f6251841d3 (patch)
tree99da01c3d9578b1494e3459d56ba98048f750d22 /include
parent22e190851f8709c48baf00ed9ce6144cdc54d025 (diff)
downloadlinux-92b6759857ea3ad19bc6871044e373f6251841d3.tar.xz
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: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/linux/perf_event.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index c66b34f75eea..8fa71874113f 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -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)
{
- return (event->attr.type != PERF_TYPE_RAW) &&
- (event->attr.type != PERF_TYPE_HARDWARE) &&
- (event->attr.type != PERF_TYPE_HW_CACHE);
+ 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;
}
extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX];