aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ftrace_event.h
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-10-14 23:21:42 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-15 05:35:23 -0400
commit6fb2915df7f0747d9044da9dbff5b46dc2e20830 (patch)
treeb4c5d7d913362ae6161c2859a7a385263330e965 /include/linux/ftrace_event.h
parentb0f1a59a98d7ac2102e7e4f22904c26d564a5628 (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/ftrace_event.h')
-rw-r--r--include/linux/ftrace_event.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index 4ec5e67e18cf..d11770472bc8 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -144,7 +144,7 @@ extern char *trace_profile_buf_nmi;
144#define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ 144#define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */
145 145
146extern void destroy_preds(struct ftrace_event_call *call); 146extern void destroy_preds(struct ftrace_event_call *call);
147extern int filter_match_preds(struct ftrace_event_call *call, void *rec); 147extern int filter_match_preds(struct event_filter *filter, void *rec);
148extern int filter_current_check_discard(struct ring_buffer *buffer, 148extern int filter_current_check_discard(struct ring_buffer *buffer,
149 struct ftrace_event_call *call, 149 struct ftrace_event_call *call,
150 void *rec, 150 void *rec,
@@ -186,4 +186,13 @@ do { \
186 __trace_printk(ip, fmt, ##args); \ 186 __trace_printk(ip, fmt, ##args); \
187} while (0) 187} while (0)
188 188
189#ifdef CONFIG_EVENT_PROFILE
190struct perf_event;
191extern int ftrace_profile_enable(int event_id);
192extern void ftrace_profile_disable(int event_id);
193extern int ftrace_profile_set_filter(struct perf_event *event, int event_id,
194 char *filter_str);
195extern void ftrace_profile_free_filter(struct perf_event *event);
196#endif
197
189#endif /* _LINUX_FTRACE_EVENT_H */ 198#endif /* _LINUX_FTRACE_EVENT_H */