diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-03 13:39:04 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-03 13:39:04 -0500 |
commit | 69aad6f1ee69546dea8535ab8f3da9f445d57328 (patch) | |
tree | b328ec140a6a90703a049fcc661d623025d7e81f /tools/perf/util/parse-events.h | |
parent | 56f4c400349157289b474a3fd49ee96acab0a4d7 (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.h | 17 |
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 | |||
9 | struct list_head; | ||
10 | struct perf_evsel; | ||
11 | |||
12 | extern struct list_head evsel_list; | ||
13 | |||
14 | int perf_evsel_list__create_default(void); | ||
15 | |||
7 | struct option; | 16 | struct option; |
8 | 17 | ||
9 | struct tracepoint_path { | 18 | struct tracepoint_path { |
@@ -13,14 +22,11 @@ struct tracepoint_path { | |||
13 | }; | 22 | }; |
14 | 23 | ||
15 | extern struct tracepoint_path *tracepoint_id_to_path(u64 config); | 24 | extern struct tracepoint_path *tracepoint_id_to_path(u64 config); |
16 | extern bool have_tracepoints(struct perf_event_attr *pattrs, int nb_events); | 25 | extern bool have_tracepoints(struct list_head *evsel_list); |
17 | 26 | ||
18 | extern int nr_counters; | 27 | extern int nr_counters; |
19 | 28 | ||
20 | extern struct perf_event_attr attrs[MAX_COUNTERS]; | 29 | const char *event_name(struct perf_evsel *event); |
21 | extern char *filters[MAX_COUNTERS]; | ||
22 | |||
23 | extern const char *event_name(int ctr); | ||
24 | extern const char *__event_name(int type, u64 config); | 30 | extern const char *__event_name(int type, u64 config); |
25 | 31 | ||
26 | extern int parse_events(const struct option *opt, const char *str, int unset); | 32 | extern int parse_events(const struct option *opt, const char *str, int unset); |
@@ -33,5 +39,4 @@ extern void print_events(void); | |||
33 | extern char debugfs_path[]; | 39 | extern char debugfs_path[]; |
34 | extern int valid_debugfs_mount(const char *debugfs); | 40 | extern int valid_debugfs_mount(const char *debugfs); |
35 | 41 | ||
36 | |||
37 | #endif /* __PERF_PARSE_EVENTS_H */ | 42 | #endif /* __PERF_PARSE_EVENTS_H */ |