aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAvi Kivity <avi@cloudius-systems.com>2014-01-22 14:58:46 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-01-27 09:47:27 -0500
commit950b8354716eb1f9c0b39777d379efa5f4125c04 (patch)
treefff1591a04caacb81eeceff76db3231b27f75c88 /tools
parent0d4dd797564cddc1f71ab0b239e9ea50ddd40b2a (diff)
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/symbol-elf.c2
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,
922 (u64)shdr.sh_offset); 922 (u64)shdr.sh_offset);
923 sym.st_value -= shdr.sh_addr - shdr.sh_offset; 923 sym.st_value -= shdr.sh_addr - shdr.sh_offset;
924 } 924 }
925new_symbol:
925 /* 926 /*
926 * We need to figure out if the object was created from C++ sources 927 * We need to figure out if the object was created from C++ sources
927 * DWARF DW_compile_unit has this, but we don't always have access 928 * 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,
933 if (demangled != NULL) 934 if (demangled != NULL)
934 elf_name = demangled; 935 elf_name = demangled;
935 } 936 }
936new_symbol:
937 f = symbol__new(sym.st_value, sym.st_size, 937 f = symbol__new(sym.st_value, sym.st_size,
938 GELF_ST_BIND(sym.st_info), elf_name); 938 GELF_ST_BIND(sym.st_info), elf_name);
939 free(demangled); 939 free(demangled);