Re: [PATCH 2/2 -tip] perf_counter: parse-events.c introduce aliasmember in event_symbol
From: Ingo Molnar
Date: Mon Jun 22 2009 - 07:33:32 EST
* Jaswinder Singh Rajput <jaswinder@xxxxxxxxxx> wrote:
>
> By introducing alias member in event_symbol :
>
> 1. duplicate lines are removed, like:
> cpu-cycles and cycles
> branch-instructions and branches
> context-switches and cs
> cpu-migrations and migrations
>
> 2. We can also add alias for another events.
>
> Now ./perf list looks like :
>
> List of pre-defined events (to be used in -e):
>
> cpu-cycles OR cycles [Hardware event]
> instructions [Hardware event]
> cache-references [Hardware event]
> cache-misses [Hardware event]
> branch-instructions OR branches [Hardware event]
> branch-misses [Hardware event]
> bus-cycles [Hardware event]
>
> cpu-clock [Software event]
> task-clock [Software event]
> page-faults [Software event]
> faults [Software event]
> minor-faults [Software event]
> major-faults [Software event]
> context-switches OR cs [Software event]
> cpu-migrations OR migrations [Software event]
>
> rNNN [raw hardware event descriptor]
>
> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@xxxxxxxxx>
> ---
> tools/perf/util/parse-events.c | 63 ++++++++++++++++++++++++----------------
> 1 files changed, 38 insertions(+), 25 deletions(-)
That looks useful - applied, thanks!
Another nice thing would be for 'perf list' to actually start each
counter and stop it - and see whether it ticks. Perhaps that could
be a new sub-command: 'perf test' ?
New 'perf' subcommands are added easily:
create a new tools/perf/builtin-foo.c file, add it to
command-list.txt and to the Makefile - add it to perf.c's array of
built-in commands and add a Documentation/perf-foo.txt file to
generate manpages and usage strings for it.
Ingo
--
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/