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>
This commit is contained in:
Ashwin Chaugule
2012-08-09 10:50:45 -04:00
parent b6bcf7a943
commit d803b281af
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -700,7 +700,7 @@ int parse_events_add_pmu(struct list_head *list, int *idx,
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,
+1 -1
View File
@@ -64,7 +64,7 @@ static int term(int type)
num_dec [0-9]+
num_hex 0x[a-fA-F0-9]+
num_raw_hex [a-fA-F0-9]+
name [a-zA-Z_*?][a-zA-Z0-9_*?]*
name [a-zA-Z_*?][a-zA-Z\-0-9_*?]*
modifier_event [ukhpGH]{1,8}
modifier_bp [rwx]