diff options
author | Avi Kivity <avi@cloudius-systems.com> | 2014-01-22 21:58:46 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-01-27 11:47:27 -0300 |
commit | 950b8354716eb1f9c0b39777d379efa5f4125c04 (patch) | |
tree | fff1591a04caacb81eeceff76db3231b27f75c88 | |
parent | 0d4dd797564cddc1f71ab0b239e9ea50ddd40b2a (diff) | |
download | linux-950b8354716eb1f9c0b39777d379efa5f4125c04.tar.gz linux-950b8354716eb1f9c0b39777d379efa5f4125c04.tar.bz2 linux-950b8354716eb1f9c0b39777d379efa5f4125c04.zip |
perf tools: Demangle kernel and kernel module symbols too
Some kernels contain C++ code, and thus their symbols need to be
demangled. This allows 'perf kvm top' to generate readable output.
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/26f71bf5bf7ee1408e3f1a803556d5df18223ef1.1390420726.git.avi@cloudius-systems.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/util/symbol-elf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 759456728703..8f12f0f5101d 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -922,6 +922,7 @@ int dso__load_sym(struct dso *dso, struct map *map, (u64)shdr.sh_offset); sym.st_value -= shdr.sh_addr - shdr.sh_offset; } +new_symbol: /* * We need to figure out if the object was created from C++ sources * DWARF DW_compile_unit has this, but we don't always have access @@ -933,7 +934,6 @@ int dso__load_sym(struct dso *dso, struct map *map, if (demangled != NULL) elf_name = demangled; } -new_symbol: f = symbol__new(sym.st_value, sym.st_size, GELF_ST_BIND(sym.st_info), elf_name); free(demangled); |