Re: [PATCH v2 2/3] perf annotate: Introduce the new source code view

From: Peter Zijlstra
Date: Wed Mar 01 2017 - 09:30:20 EST


On Wed, Mar 01, 2017 at 11:21:33PM +0900, Namhyung Kim wrote:

> > What's the point of source-only? You can't even see what it is that is
> > expensive.
>
> ???

>From a line like:

a = b ? ptr->c : 0;

How do you tell what it is that causes the problem, the branch miss or
the pointer deref?

Typically looking at the asm this is fairly clear; even without
recording with more specific events.

> This is to show source code + overhead (for each line). People can
> see which line of their source is expensive. I think it's way more
> intuitive for most developers..

And how pray are you going to write better code if you have no clue what
the problem is?

I'm really wondering how you can even think about performance if you're
scared of asm.