Re: [PATCH v4 06/16] perf tools: Support perf event alias name

From: pi3orama
Date: Fri Dec 11 2015 - 07:13:15 EST




发自我的 iPhone

> 在 2015年12月11日,下午8:03,Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> 写道:
>
> Em Tue, Dec 08, 2015 at 02:25:34AM +0000, Wang Nan escreveu:
>> From: He Kuang <hekuang@xxxxxxxxxx>
>>
>> This patch adds new bison rules for specifying an alias name to a perf
>> event, which allows cmdline refer to previous defined perf event through
>> its name. With this patch user can give alias name to a perf event using
>> following cmdline:
>
> Please add Jiri Olsa to any changes that touches the parser changes.
>
> Can you reword the above phrase? Does it mean something like:
>
> ----
> This patches adds new bison rules for specifying an alias to a perf
> event, which allows referring to this previously defined perf event
> through this alias."
> ----
>
> But then, why would I want this aliasing? The provided examples shows a
> way to obfuscate 'cycles', a perfectly good name, why would one want to
> call it "mypmu"?
>

Sorry. I should put this patch after 7/16 so you won't get confused. Without event
aliasing it is hard to select an event and insert it into a BPF map.

Patch 7/16 would use alias like:

# perf record -e evt=cycles/no-inherit/ -e BPF.c/maps.pmu.event=evt/ ...
So it put cycles/no-inherit/ into that map.

Thank you.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/