Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 950b8354 authored by Avi Kivity's avatar Avi Kivity Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarAvi 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 0d4dd797
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);