aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/parse-events.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-01-03 13:39:04 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-01-03 13:39:04 -0500
commit69aad6f1ee69546dea8535ab8f3da9f445d57328 (patch)
treeb328ec140a6a90703a049fcc661d623025d7e81f /tools/perf/util/parse-events.h
parent56f4c400349157289b474a3fd49ee96acab0a4d7 (diff)
perf tools: Introduce event selectors
Out of ad-hoc code and global arrays with hard coded sizes. This is the first step on having a library that will be first used on regression tests in the 'perf test' tool. [acme@felicio linux]$ size /tmp/perf.before text data bss dec hex filename 1273776 97384 5104416 6475576 62cf38 /tmp/perf.before [acme@felicio linux]$ size /tmp/perf.new text data bss dec hex filename 1275422 97416 1392416 2765254 2a31c6 /tmp/perf.new Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> 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.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index fc4ab3fe877a..0f915a01a3f7 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -4,6 +4,15 @@
4 * Parse symbolic events/counts passed in as options: 4 * Parse symbolic events/counts passed in as options:
5 */ 5 */
6 6
7#include <linux/perf_event.h>
8
9struct list_head;
10struct perf_evsel;
11
12extern struct list_head evsel_list;
13
14int perf_evsel_list__create_default(void);
15
7struct option; 16struct option;
8 17
9struct tracepoint_path { 18struct tracepoint_path {
@@ -13,14 +22,11 @@ struct tracepoint_path {
13}; 22};
14 23
15extern struct tracepoint_path *tracepoint_id_to_path(u64 config); 24extern struct tracepoint_path *tracepoint_id_to_path(u64 config);
16extern bool have_tracepoints(struct perf_event_attr *pattrs, int nb_events); 25extern bool have_tracepoints(struct list_head *evsel_list);
17 26
18extern int nr_counters; 27extern int nr_counters;
19 28
20extern struct perf_event_attr attrs[MAX_COUNTERS]; 29const char *event_name(struct perf_evsel *event);
21extern char *filters[MAX_COUNTERS];
22
23extern const char *event_name(int ctr);
24extern const char *__event_name(int type, u64 config); 30extern const char *__event_name(int type, u64 config);
25 31
26extern int parse_events(const struct option *opt, const char *str, int unset); 32extern int parse_events(const struct option *opt, const char *str, int unset);
@@ -33,5 +39,4 @@ extern void print_events(void);
33extern char debugfs_path[]; 39extern char debugfs_path[];
34extern int valid_debugfs_mount(const char *debugfs); 40extern int valid_debugfs_mount(const char *debugfs);
35 41
36
37#endif /* __PERF_PARSE_EVENTS_H */ 42#endif /* __PERF_PARSE_EVENTS_H */