diff options
author | Robert Richter <robert.richter@amd.com> | 2012-08-16 21:10:21 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-22 13:40:49 -0300 |
commit | ac2ba9f36bb400755e411309f3e76dbf308a10e7 (patch) | |
tree | 126e4ce25d51de626056c2d6bc1b2afd7098558f /tools/perf/util/parse-events.h | |
parent | 9bfbbc6d1e6b4d055860231e232b807911bf8325 (diff) | |
download | linux-ac2ba9f36bb400755e411309f3e76dbf308a10e7.tar.gz linux-ac2ba9f36bb400755e411309f3e76dbf308a10e7.tar.bz2 linux-ac2ba9f36bb400755e411309f3e76dbf308a10e7.zip |
perf tools: Catch event names from command line
Use command line string provided by the -e option to name events. This
way we get unique events names that also support pmu event syntax
(<pmu_name>/<config>/<modifier>). No need to reconstruct the name
anymore from its attributes. We use the event_desc of the header to
store the name in the perf.data header. Thus it is also available for
perf report.
Implemented by putting the parser in different states to parse events or
configs.
And since event names are now generated from the command line
specification. Update event names in test cases accordingly.
Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1345144224-27280-6-git-send-email-robert.richter@amd.com
[ committer note: Folded patch fixing 'perf test' failure reported by Jiri Olsa ]
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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h index 0b9782dc3da2..c356e443448d 100644 --- a/tools/perf/util/parse-events.h +++ b/tools/perf/util/parse-events.h @@ -81,6 +81,7 @@ int parse_events__term_clone(struct parse_events__term **new, void parse_events__free_terms(struct list_head *terms); int parse_events__modifier_event(struct list_head *list, char *str, bool add); int parse_events__modifier_group(struct list_head *list, char *event_mod); +int parse_events_name(struct list_head *list, char *name); int parse_events_add_tracepoint(struct list_head **list, int *idx, char *sys, char *event); int parse_events_add_numeric(struct list_head **list, int *idx, |