Re: [PATCH] perf stat: Add event-interval-print option
From: Andi Kleen
Date: Thu Aug 24 2017 - 16:52:06 EST
On Thu, Aug 24, 2017 at 04:39:02PM -0400, Aaron Lindsay wrote:
> Does anyone have any feedback on this patch or the idea in general?
>
> Also, (for our bookkeeping - not trying to rush things) is there any
> chance this will still make it in for the 4.14 merge window, or is it
> 4.15 material at the earliest?
You can already do that with leader sampling through perf record
e.g.
% perf record -e '{cpu/cpu-cycles,period=10000/,branches,branch-misses}:S' ...
% perf script
swapper 0 [005] 3905226.804037: 10210 cpu/cpu-cycles,period=10000/: ffffffff9e87643c intel_idle ([kernel.kallsyms])
swapper 0 [005] 3905226.804037: 345 branches: ffffffff9e87643c intel_idle ([kernel.kallsyms])
swapper 0 [005] 3905226.804037: 58 branch-misses: ffffffff9e87643c intel_idle ([kernel.kallsyms])
:16797 16797 [004] 3905226.804038: 10160 cpu/cpu-cycles,period=10000/: ffffffffc07fdd10 kvm_fetch_guest_virt ([kvm])
:16797 16797 [004] 3905226.804038: 515 branches: ffffffffc07fdd10 kvm_fetch_guest_virt ([kvm])
:16797 16797 [004] 3905226.804038: 19 branch-misses: ffffffffc07fdd10 kvm_fetch_guest_virt ([kvm])
Yes it's a useful technique.
-Andi