diff options
author | Jiri Olsa <jolsa@redhat.com> | 2012-03-15 20:09:18 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-03-16 14:30:13 -0300 |
commit | 5f537a26590e696466aae7f41e6b77e92c8486d1 (patch) | |
tree | 6946ba5b2a4cc1133ab11d8a81c37465f794e655 /tools/perf/util/parse-events.h | |
parent | cd82a32e9924d3a82bd27f830755d23e4ded25bc (diff) |
perf tools: Add support to specify pmu style event
Added new event rule to the event definition grammar:
event_def: event_pmu |
...
event_pmu: PE_NAME '/' event_config '/'
Using this rule, event could be now specified like:
cpu/config=1,config1=2,config2=3/u
where pmu name 'cpu' is looked up via following path:
${sysfs_mount}/bus/event_source/devices/${pmu}
and config options are bound to the pmu's format definiton:
${sysfs_mount}/bus/event_source/devices/${pmu}/format
The hardcoded config options still stays and have precedence
over any format field defined with same name.
Acked-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/n/tip-50d8nr94f8k4wkezutrxvthe@git.kernel.org
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 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h index 37a270d91d3..6d7c74b77c2 100644 --- a/tools/perf/util/parse-events.h +++ b/tools/perf/util/parse-events.h @@ -74,6 +74,8 @@ int parse_events_add_cache(struct list_head *list, int *idx, char *type, char *op_result1, char *op_result2); int parse_events_add_breakpoint(struct list_head *list, int *idx, void *ptr, char *type); +int parse_events_add_pmu(struct list_head *list, int *idx, + char *pmu , struct list_head *head_config); void parse_events_error(struct list_head *list, int *idx, char const *msg); |