lkml.org 
[lkml]   [2015]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 26/31] perf tools: Support perf event alias name
Hi,

On Wed, Oct 21, 2015 at 10:00 PM, Wangnan (F) <wangnan0@huawei.com> wrote:
>
>
> On 2015/10/21 16:53, Namhyung Kim wrote:
>>
>> Hi,
>>
>> On Wed, Oct 14, 2015 at 12:41:37PM +0000, Wang Nan wrote:
>>>
>>> From: He Kuang <hekuang@huawei.com>
>>>
>>> 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:
>>>
>>> # perf record -e mypmu=cycles ...
>>>
>>> To allow parser refer to existing event selecter, pass event list to
>>> 'struct parse_events_evlist'. perf_evlist__find_evsel_by_alias() is
>>> introduced to get evsel through its alias.
>>
>> What about using event name directly? I guess the alias name is used
>> only to refer an event so it'd be better to use the event name.
>> Anyway we need alias as well when event has no name or name is complex.
>
>
> It is possible to trigger two perf events with same PMU but
> different config options:
>
> # perf record -e cycles/period=9999/ -e cycles/period=99999/ -a sleep 1
>
> In this case the name of events are:
>
> cycles/period=9999/ `
> cycles/period=99999/
>
> Using it in perf cmdline is painful:
>
> # perf record -e cycles/period=9999/ -e cycles/period=99999/ -e
> bpf_program.c/myevent=cycles/period=9999//...

I understand the need of using aliases but I think it's more natural
to use event name for simple cases..

Thanks,
Namhyung


\
 
 \ /
  Last update: 2015-10-22 09:41    [W:0.120 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site