aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r--tools/perf/util/event.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 6635fcd11ca5..0fe9adf76379 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -553,9 +553,18 @@ static int perf_event__process_kernel_mmap(union perf_event *event,
553 goto out_problem; 553 goto out_problem;
554 554
555 perf_event__set_kernel_mmap_len(event, machine->vmlinux_maps); 555 perf_event__set_kernel_mmap_len(event, machine->vmlinux_maps);
556 perf_session__set_kallsyms_ref_reloc_sym(machine->vmlinux_maps, 556
557 symbol_name, 557 /*
558 event->mmap.pgoff); 558 * Avoid using a zero address (kptr_restrict) for the ref reloc
559 * symbol. Effectively having zero here means that at record
560 * time /proc/sys/kernel/kptr_restrict was non zero.
561 */
562 if (event->mmap.pgoff != 0) {
563 perf_session__set_kallsyms_ref_reloc_sym(machine->vmlinux_maps,
564 symbol_name,
565 event->mmap.pgoff);
566 }
567
559 if (machine__is_default_guest(machine)) { 568 if (machine__is_default_guest(machine)) {
560 /* 569 /*
561 * preload dso of guest kernel and modules 570 * preload dso of guest kernel and modules