From 4d99e4136580d178e3523281a820be17bf814bf8 Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Tue, 22 May 2018 13:54:33 +0300 Subject: perf machine: Workaround missing maps for x86 PTI entry trampolines On x86_64 the PTI entry trampolines are not in the kernel map created by perf tools. That results in the addresses having no symbols and prevents annotation. It also causes Intel PT to have decoding errors at the trampoline addresses. Workaround that by creating maps for the trampolines. At present the kernel does not export information revealing where the trampolines are. Until that happens, the addresses are hardcoded. Signed-off-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Andy Lutomirski Cc: Dave Hansen Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Joerg Roedel Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: x86@kernel.org Link: http://lkml.kernel.org/r/1526986485-6562-6-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/machine.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/perf/util/machine.h') diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h index 2d2b092ba753..b6a1c3eb3d65 100644 --- a/tools/perf/util/machine.h +++ b/tools/perf/util/machine.h @@ -268,4 +268,7 @@ int machine__set_current_tid(struct machine *machine, int cpu, pid_t pid, */ char *machine__resolve_kernel_addr(void *vmachine, unsigned long long *addrp, char **modp); +int machine__map_x86_64_entry_trampolines(struct machine *machine, + struct dso *kernel); + #endif /* __PERF_MACHINE_H */ -- cgit v1.2.3