perf tools: Always use non inlined file name for 'srcfile' sort key
authorAndi Kleen <ak@linux.intel.com>
Tue, 1 Sep 2015 18:47:19 +0000 (11:47 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 2 Sep 2015 19:30:46 +0000 (16:30 -0300)
commit2f84b42b28eed0f980200401077e51571202f868
treebb2a8cb44c2c49d6025765d736c0979378252e08
parent5b923564ccf43f92969c9e0fd199c8c5db657039
perf tools: Always use non inlined file name for 'srcfile' sort key

When profiling the kernel with the 'srcfile' sort key it's common to
"get stuck" in include. For example a lot of code uses current or other
inlines, so they get accounted to some random include file. This is not
very useful as a high level categorization.

For example just profiling the idle loop usually shows mostly inlines,
so you never see the actual cpuidle file.

This patch changes the 'srcfile' sort key to always unwind the inline
stack using BFD/DWARF. So we always account to the base function that
called the inline.

In a few cases include is still shown (for example for MSR accesses),
but that is because they get inlining expanded as part of assigning to a
global function pointer. For the majority it works fine though.

v2: Use simpler while loop. Add maximum iteration count.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/1441133239-31254-1-git-send-email-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/sort.c
tools/perf/util/srcline.c
tools/perf/util/util.h
This page took 0.040598 seconds and 5 git commands to generate.