Skip to content

Commit 922d0e4

Browse files
Vladimir NikulichevJiri Olsa
authored andcommitted
perf tools: Adjust symbols in VDSO
pert-report doesn't resolve function names in VDSO: $ perf report --stdio -g flat,0.0,15,callee --sort pid ... 8.76% 0x7fff6b1fe861 __gettimeofday ACE_OS::gettimeofday() ... In this case symbol values should be adjusted the same way as for executables, relocatable objects and prelinked libraries. After fix: $ perf report --stdio -g flat,0.0,15,callee --sort pid ... 8.76% __vdso_gettimeofday __gettimeofday ACE_OS::gettimeofday() Signed-off-by: Vladimir Nikulichev <nvs@tbricks.com> Tested-by: Namhyung Kim <namhyung@kernel.org> Reviewed-by: Adrian Hunter <adrian.hunter@intel.com> Link: http://lkml.kernel.org/r/969812.163009436-sendEmail@nvs Signed-off-by: Jiri Olsa <jolsa@redhat.com>
1 parent acb61fc commit 922d0e4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎tools/perf/util/symbol-elf.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <inttypes.h>
77

88
#include "symbol.h"
9+
#include "vdso.h"
910
#include <symbol/kallsyms.h>
1011
#include "debug.h"
1112

@@ -618,6 +619,7 @@ int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name,
618619
GElf_Shdr shdr;
619620
ss->adjust_symbols = (ehdr.e_type == ET_EXEC ||
620621
ehdr.e_type == ET_REL ||
622+
is_vdso_map(dso->short_name) ||
621623
elf_section_by_name(elf, &ehdr, &shdr,
622624
".gnu.prelink_undo",
623625
NULL) != NULL);

0 commit comments

Comments
 (0)