forked from Minki/linux
c171b552a7
Add a new option "--filter <filter_str>" to perf record, and it should be right after "-e trace_point": #./perf record -R -f -e irq:irq_handler_entry --filter irq==18 ^C # ./perf trace perf-4303 ... irq_handler_entry: irq=18 handler=eth0 init-0 ... irq_handler_entry: irq=18 handler=eth0 init-0 ... irq_handler_entry: irq=18 handler=eth0 init-0 ... irq_handler_entry: irq=18 handler=eth0 init-0 ... irq_handler_entry: irq=18 handler=eth0 See Documentation/trace/events.txt for the syntax of filter expressions. 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: <4AD6955F.90602@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
37 lines
850 B
C
37 lines
850 B
C
#ifndef __PERF_PARSE_EVENTS_H
|
|
#define __PERF_PARSE_EVENTS_H
|
|
/*
|
|
* Parse symbolic events/counts passed in as options:
|
|
*/
|
|
|
|
struct option;
|
|
|
|
struct tracepoint_path {
|
|
char *system;
|
|
char *name;
|
|
struct tracepoint_path *next;
|
|
};
|
|
|
|
extern struct tracepoint_path *tracepoint_id_to_path(u64 config);
|
|
|
|
extern int nr_counters;
|
|
|
|
extern struct perf_event_attr attrs[MAX_COUNTERS];
|
|
extern char *filters[MAX_COUNTERS];
|
|
|
|
extern const char *event_name(int ctr);
|
|
extern const char *__event_name(int type, u64 config);
|
|
|
|
extern int parse_events(const struct option *opt, const char *str, int unset);
|
|
extern int parse_filter(const struct option *opt, const char *str, int unset);
|
|
|
|
#define EVENTS_HELP_MAX (128*1024)
|
|
|
|
extern void print_events(void);
|
|
|
|
extern char debugfs_path[];
|
|
extern int valid_debugfs_mount(const char *debugfs);
|
|
|
|
|
|
#endif /* __PERF_PARSE_EVENTS_H */
|