Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1661160
| From | Milian Wolff <milian.wolff@kdab.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] perf, tools, script: Allow adding and removing fields |
| Date | 2017-06-08 15:10 +0200 |
| Message-ID | <tQ5mi-4Gs-9@gated-at.bofh.it> (permalink) |
| References | <tNWZP-34m-13@gated-at.bofh.it> |
| Organization | KDAB |
[Multipart message — attachments visible in raw view] - view raw
On Friday, June 2, 2017 5:48:10 PM CEST Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> With perf script it is common that we just want to add or remove a field.
> Currently this requires figuring out the long list of default fields and
> specifying them first, and then adding/removing the new field.
>
> This patch adds a new + - syntax to merely add or remove fields,
> that allows more succint and clearer command lines
>
> For example to remove the comm field from PMU samples:
>
> Previously
>
> perf script -F tid,cpu,time,event,sym,ip,dso,period
> 0 [000] 504345.383126: 1 cycles: ffffffff90060c66
> native_write_msr ([kernel.kallsyms])
>
> with the new syntax
>
> perf script -F -comm
> 0 [000] 504345.383126: 1 cycles: ffffffff90060c66
> native_write_msr ([kernel.kallsyms])
>
> The new syntax cannot be mixed with normal overriding.
Tested-by: Milian Wolff <milian.wolff@kdab.com>
Works a charm.
But I notice that this functionality is missing in other places too. Most
notably, I would like to be able to configure `perf stat` in a similar way.
Such that one could do:
perf stat -e +cache-misses
Instead of
perf stat -e <whatever the defaults are>,cache-misses
While at it, I also think it would be tremendously useful to get wildcard
matching behavior in all perf tools. Currently, I can do:
perf list "topdown-*"
List of pre-defined events (to be used in -e):
topdown-fetch-bubbles OR cpu/topdown-fetch-bubbles/ [Kernel PMU event]
topdown-recovery-bubbles OR cpu/topdown-recovery-bubbles/ [Kernel PMU event]
topdown-slots-issued OR cpu/topdown-slots-issued/ [Kernel PMU event]
topdown-slots-retired OR cpu/topdown-slots-retired/ [Kernel PMU event]
topdown-total-slots OR cpu/topdown-total-slots/ [Kernel PMU event]
But I cannot do:
$ perf record -e "topdown-*" ls
event syntax error: 'topdown-*'
\___ parser error
Run 'perf list' for a list of valid events
But of course I'm aware that these are all separate issues. But Andi, you seem
to be working a lot on polishing perf. I'd really appreciate it if you could
also implement the above two suggestions. Otherwise I'll try to see when I get
the time to do it myself.
Cheers
--
Milian Wolff | milian.wolff@kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH] perf, tools, script: Allow adding and removing fields Milian Wolff <milian.wolff@kdab.com> - 2017-06-08 15:10 +0200
Re: [PATCH] perf, tools, script: Allow adding and removing fields Andi Kleen <ak@linux.intel.com> - 2017-06-09 05:00 +0200
Re: [PATCH] perf, tools, script: Allow adding and removing fields Milian Wolff <milian.wolff@kdab.com> - 2017-06-09 11:20 +0200
Re: [PATCH] perf, tools, script: Allow adding and removing fields Andi Kleen <andi@firstfloor.org> - 2017-06-11 21:10 +0200
csiph-web