Perf: Extend named-pmu grammar
This patch allows "-" in a PMU name and
prints it along with counter output.
Previously, perf would just show "pmu" which can
get confusing for the user.
Change-Id: Ib4fb0fa67c1d5f2e15de6e1cb9c35964449d8ad8
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index be2e0c5..2d2b333 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -700,7 +700,7 @@
if (perf_pmu__config(pmu, &attr, head_config))
return -EINVAL;
- return add_event(list, idx, &attr, (char *) "pmu");
+ return add_event(list, idx, &attr, pmu->name);
}
void parse_events_update_lists(struct list_head *list_event,