Re: [PATCH 5/9] perf, tools: Compute IPC and basic block cycles for annotate

From: Andi Kleen
Date: Sat Jul 02 2016 - 16:38:47 EST


> I'm looking at basic block support, but this all seems to depend on the
> cycles stuff. Can we get the basic block stuff without that?

Not sure what you mean with basic block stuff, but ...
>
> I'm looking to plot the hottest path through a branchy function.

Use --branch-history to get a histogram of the hottest paths.
If you want a longer history than 16/32 you can also use PT
and tell the decoder to synthesize larger LBRs.

However currently it cannot output metadata like cycles

Or apply the following patches to show the path with perf script for
individual samples
(unfortunatly the disassembler support was rejected, so this
won't be available in mainline)

https://git.kernel.org/cgit/linux/kernel/git/ak/linux-misc.git/log/?h=perf/disassembler-1

-Andi