17 Jan, 2015
1 commit
-
dwfl_report_offline() works only when libraries are prelinked.
Replace dwfl_report_offline() with dwfl_report_elf() so we correctly
extract debug info even from libraries that are not prelinked.Reported-by: Jiri Olsa
Signed-off-by: Sukadev Bhattiprolu
Tested-by: Jiri Olsa
Cc: Jiri Olsa
Cc: Michael Ellerman
Link: http://lkml.kernel.org/r/20150114221045.GA17703@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo
29 Oct, 2014
2 commits
-
So stop passing both machine and thread to several thread methods,
reducing function signature length.Cc: Adrian Hunter
Cc: Borislav Petkov
Cc: David Ahern
Cc: Don Zickus
Cc: Frederic Weisbecker
Cc: Jean Pihet
Cc: Jiri Olsa
Cc: Mike Galbraith
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-ckcy19dcp1jfkmdihdjcqdn1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Cache the DWARF debug info for DSO so we don't have to rebuild it for each
address in the DSO.Note that dso__new() uses calloc() so don't need to set dso->dwfl to NULL.
$ /tmp/perf.orig --version
perf version 3.18.rc1.gc2661b8
$ /tmp/perf.new --version
perf version 3.18.rc1.g402d62
$ perf stat -e cycles,instructions /tmp/perf.orig report -g > origPerformance counter stats for '/tmp/perf.orig report -g':
6,428,177,183 cycles # 0.000 GHz
4,176,288,391 instructions # 0.65 insns per cycle1.840666132 seconds time elapsed
$ perf stat -e cycles,instructions /tmp/perf.new report -g > new
Performance counter stats for '/tmp/perf.new report -g':
305,773,142 cycles # 0.000 GHz
276,048,272 instructions # 0.90 insns per cycle0.087693543 seconds time elapsed
$ diff orig new
$Changelog[v2]:
[Arnaldo Carvalho] Cache in existing global objects rather than create
new static/globals in functions.Reported-by: Anton Blanchard
Signed-off-by: Sukadev Bhattiprolu
Cc: Anton Blanchard
Cc: Jiri Olsa
Link: http://lkml.kernel.org/r/20141022000958.GB2228@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo
20 Aug, 2014
1 commit
-
Looks like util/debug.h was indirectly included before and is no longer
included now. pr_debug is left undefined and the build of perf tool
fails on Powerpc.Explicitly include util/debug.h.
Signed-off-by: Sukadev Bhattiprolu
Acked-by: Jiri Olsa
Cc: Jiri Olsa
Cc: Michael Ellerman
Link: http://lkml.kernel.org/r/20140807072700.GA17623@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo
27 Jun, 2014
1 commit
-
When saving the callchain on Power, the kernel conservatively saves excess
entries in the callchain. A few of these entries are needed in some cases
but not others. We should use the DWARF debug information to determine
when the entries are needed.Eg: the value in the link register (LR) is needed only when it holds the
return address of a function. At other times it must be ignored.If the unnecessary entries are not ignored, we end up with duplicate arcs
in the call-graphs.Use the DWARF debug information to determine if any callchain entries
should be ignored when building call-graphs.Callgraph before the patch:
14.67% 2234 sprintft libc-2.18.so [.] __random
|
--- __random
|
|--61.12%-- __random
| |
| |--97.15%-- rand
| | do_my_sprintf
| | main
| | generic_start_main.isra.0
| | __libc_start_main
| | 0x0
| |
| --2.85%-- do_my_sprintf
| main
| generic_start_main.isra.0
| __libc_start_main
| 0x0
|
--38.88%-- rand
|
|--94.01%-- rand
| do_my_sprintf
| main
| generic_start_main.isra.0
| __libc_start_main
| 0x0
|
--5.99%-- do_my_sprintf
main
generic_start_main.isra.0
__libc_start_main
0x0Callgraph after the patch:
14.67% 2234 sprintft libc-2.18.so [.] __random
|
--- __random
|
|--95.93%-- rand
| do_my_sprintf
| main
| generic_start_main.isra.0
| __libc_start_main
| 0x0
|
--4.07%-- do_my_sprintf
main
generic_start_main.isra.0
__libc_start_main
0x0TODO: For split-debug info objects like glibc, we can only determine
the call-frame-address only when both .eh_frame and .debug_info
sections are available. We should be able to determin the CFA
even without the .eh_frame section.Fix suggested by Anton Blanchard.
Thanks to valuable input on DWARF debug information from Ulrich Weigand.
Reported-by: Maynard Johnson
Tested-by: Maynard Johnson
Signed-off-by: Sukadev Bhattiprolu
Link: http://lkml.kernel.org/r/20140625154903.GA29607@us.ibm.com
Signed-off-by: Jiri Olsa