diff options
author | Yunlong Song <yunlong.song@huawei.com> | 2015-02-27 18:21:27 +0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-02-27 15:52:18 -0300 |
commit | 705750f2d6e283ba2856ba8eda60dce2d405b387 (patch) | |
tree | 7bcd239ca2dba67baff8fd48148de7769059f7f2 /tools/perf/util/parse-events.h | |
parent | 3ef1e65c829c86ffaa94a4ed59fed5da37f9610a (diff) | |
download | lwn-705750f2d6e283ba2856ba8eda60dce2d405b387.tar.gz lwn-705750f2d6e283ba2856ba8eda60dce2d405b387.zip |
perf list: Clean up the printing functions of hardware/software events
Do not need print_events_type or __print_events_type for listing hw/sw
events, let print_symbol_events do its job instead. Moreover,
print_symbol_events can also handle event_glob and name_only.
Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1425032491-20224-4-git-send-email-yunlong.song@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/parse-events.h')
-rw-r--r-- | tools/perf/util/parse-events.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h index 39c3b57965d1..52a2dda4f954 100644 --- a/tools/perf/util/parse-events.h +++ b/tools/perf/util/parse-events.h @@ -116,7 +116,16 @@ void parse_events_update_lists(struct list_head *list_event, void parse_events_error(void *data, void *scanner, char const *msg); void print_events(const char *event_glob, bool name_only); -void print_events_type(u8 type); + +struct event_symbol { + const char *symbol; + const char *alias; +}; +extern struct event_symbol event_symbols_hw[]; +extern struct event_symbol event_symbols_sw[]; +void print_symbol_events(const char *event_glob, unsigned type, + struct event_symbol *syms, unsigned max, + bool name_only); void print_tracepoint_events(const char *subsys_glob, const char *event_glob, bool name_only); int print_hwcache_events(const char *event_glob, bool name_only); |