diff options
author | Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> | 2014-10-22 02:09:58 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-10-29 13:32:46 +0100 |
commit | 7d073b335edc8d97af730c2e3b83ed6642bd3c27 (patch) | |
tree | 161f1cf4d4bf4f18c45a5e8de92a3ecc6b8027a2 /tools/perf/util/dso.h | |
parent | perf probe: Trivial typo fix for --demangle (diff) | |
download | linux-7d073b335edc8d97af730c2e3b83ed6642bd3c27.tar.xz linux-7d073b335edc8d97af730c2e3b83ed6642bd3c27.zip |
perf tools powerpc: Cache the DWARF debug info
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 > orig
Performance 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 cycle
1.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 cycle
0.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 <anton@samba.org>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Anton Blanchard <anton@au1.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20141022000958.GB2228@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/dso.h')
-rw-r--r-- | tools/perf/util/dso.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h index acb651acc7fd..3c9b391493f9 100644 --- a/tools/perf/util/dso.h +++ b/tools/perf/util/dso.h @@ -127,6 +127,7 @@ struct dso { const char *long_name; u16 long_name_len; u16 short_name_len; + void *dwfl; /* DWARF debug info */ /* dso data file */ struct { |