diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-10-14 23:21:42 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-15 05:35:23 -0400 |
commit | 6fb2915df7f0747d9044da9dbff5b46dc2e20830 (patch) | |
tree | b4c5d7d913362ae6161c2859a7a385263330e965 /include/linux/perf_event.h | |
parent | b0f1a59a98d7ac2102e7e4f22904c26d564a5628 (diff) |
tracing/profile: Add filter support
- Add an ioctl to allocate a filter for a perf event.
- Free the filter when the associated perf event is to be freed.
- Do the filtering in perf_swevent_match().
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <4AD69546.8050401@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 2e6d95f97419..df9d964c15fc 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -221,6 +221,7 @@ struct perf_event_attr { | |||
221 | #define PERF_EVENT_IOC_RESET _IO ('$', 3) | 221 | #define PERF_EVENT_IOC_RESET _IO ('$', 3) |
222 | #define PERF_EVENT_IOC_PERIOD _IOW('$', 4, u64) | 222 | #define PERF_EVENT_IOC_PERIOD _IOW('$', 4, u64) |
223 | #define PERF_EVENT_IOC_SET_OUTPUT _IO ('$', 5) | 223 | #define PERF_EVENT_IOC_SET_OUTPUT _IO ('$', 5) |
224 | #define PERF_EVENT_IOC_SET_FILTER _IOW('$', 6, char *) | ||
224 | 225 | ||
225 | enum perf_event_ioc_flags { | 226 | enum perf_event_ioc_flags { |
226 | PERF_IOC_FLAG_GROUP = 1U << 0, | 227 | PERF_IOC_FLAG_GROUP = 1U << 0, |
@@ -633,7 +634,12 @@ struct perf_event { | |||
633 | 634 | ||
634 | struct pid_namespace *ns; | 635 | struct pid_namespace *ns; |
635 | u64 id; | 636 | u64 id; |
637 | |||
638 | #ifdef CONFIG_EVENT_PROFILE | ||
639 | struct event_filter *filter; | ||
636 | #endif | 640 | #endif |
641 | |||
642 | #endif /* CONFIG_PERF_EVENTS */ | ||
637 | }; | 643 | }; |
638 | 644 | ||
639 | /** | 645 | /** |