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

From: Peter Zijlstra
Date: Thu Jun 30 2016 - 05:40:49 EST


On Sat, Jul 18, 2015 at 08:24:50AM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@xxxxxxxxxxxxxxx>
>
> Compute the IPC and the basic block cycles for the annotate display.
>
> IPC is computed by counting the instructions, and then dividing the
> accounted cycles by that count.
>
> The actual IPC computation can only be done at annotate time,
> because we need to parse the objdump output first to know
> the number of instructions in the basic block.
>
> The cycles/IPC are also put into the perf function annotation
> so that the display code can show them.
>
> Again basic block overlaps are not handled, with the longest winning,
> but there are some heuristics to hide the IPC when the longest is not
> the most common.

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?

I'm looking to plot the hottest path through a branchy function.