diff options
author | Jiri Olsa <jolsa@redhat.com> | 2011-07-14 05:25:32 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-07-21 04:41:11 -0400 |
commit | f120f9d51be3a7db8991e7b78dc08bab5f8ab8f3 (patch) | |
tree | 237926a6231f4009015b8ce4119935a455069395 /tools/perf/util/parse-events.h | |
parent | adc4bf9955856f8aa081ba613dbf56ffd664f0b7 (diff) |
perf tools: De-opt the parse_events function
Moving out the option parameter from parse_events function,
and adding new parse_events_option function instead.
The option parameter is used only to carry "struct perf_evlist"
pointer for chaining new events. Putting it away, enable us
to call parse_events from other places without using the
option parameter.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: acme@redhat.com
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
Link: http://lkml.kernel.org/r/1310635534-4013-2-git-send-email-jolsa@redhat.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/parse-events.h')
-rw-r--r-- | tools/perf/util/parse-events.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h index 746d3fcbfc2a..2f8e375e038d 100644 --- a/tools/perf/util/parse-events.h +++ b/tools/perf/util/parse-events.h | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | struct list_head; | 9 | struct list_head; |
10 | struct perf_evsel; | 10 | struct perf_evsel; |
11 | struct perf_evlist; | ||
11 | 12 | ||
12 | struct option; | 13 | struct option; |
13 | 14 | ||
@@ -24,7 +25,10 @@ const char *event_type(int type); | |||
24 | const char *event_name(struct perf_evsel *event); | 25 | const char *event_name(struct perf_evsel *event); |
25 | extern const char *__event_name(int type, u64 config); | 26 | extern const char *__event_name(int type, u64 config); |
26 | 27 | ||
27 | extern int parse_events(const struct option *opt, const char *str, int unset); | 28 | extern int parse_events_option(const struct option *opt, const char *str, |
29 | int unset); | ||
30 | extern int parse_events(struct perf_evlist *evlist, const char *str, | ||
31 | int unset); | ||
28 | extern int parse_filter(const struct option *opt, const char *str, int unset); | 32 | extern int parse_filter(const struct option *opt, const char *str, int unset); |
29 | 33 | ||
30 | #define EVENTS_HELP_MAX (128*1024) | 34 | #define EVENTS_HELP_MAX (128*1024) |