Re: [Questions] perf c2c: What's the current status of perf c2c?

From: Peter Zijlstra
Date: Wed Dec 09 2015 - 05:58:18 EST


On Wed, Dec 09, 2015 at 10:34:02AM +0100, Peter Zijlstra wrote:
> Which we can imagine could result in code like:
>
> foobar:
> mov (%rax), %rax # load bar::foo
> mov (%rax,1,4), %rax # load foo::val
>
>
> And DWARFs should know this, so by knowing the instruction we can know
> which load missed the cache.
>
> Once you have this information, you can use pahole like structure output
> and heat colour them or whatnot. Bright red if you miss lots etc..
>
> Now currently this is possible but a bit of work because the DWARF
> annotations are not exactly following these data types, that is you
> might need to decode previous instructions and infer some bits.

To clarify, current DWARFs might only know the argument to foobar is of
type struct bar *, and we'll have to infer the rest.

> I think Stephane was working with GCC people to allow more/better DWARF
> annotations and allow easier retrieval of this information.

And even if that gets sorted, it might still make sense to implement the
hard case as per the above, because it'll take a long time before
everything is build with the fancy new GCC/dwarf output.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/