Skip to content

Commit 950b835

Browse files
avikivityacmel
authored andcommitted
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>
1 parent 0d4dd79 commit 950b835

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/util/symbol-elf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,7 @@ int dso__load_sym(struct dso *dso, struct map *map,
922922
(u64)shdr.sh_offset);
923923
sym.st_value -= shdr.sh_addr - shdr.sh_offset;
924924
}
925+
new_symbol:
925926
/*
926927
* We need to figure out if the object was created from C++ sources
927928
* 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,
933934
if (demangled != NULL)
934935
elf_name = demangled;
935936
}
936-
new_symbol:
937937
f = symbol__new(sym.st_value, sym.st_size,
938938
GELF_ST_BIND(sym.st_info), elf_name);
939939
free(demangled);

0 commit comments

Comments
 (0)