aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r--tools/perf/builtin-report.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 2e317438980b..cdae9b2db1cc 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -374,16 +374,23 @@ static int __cmd_report(struct perf_report *rep)
374 (kernel_map->dso->hit && 374 (kernel_map->dso->hit &&
375 (kernel_kmap->ref_reloc_sym == NULL || 375 (kernel_kmap->ref_reloc_sym == NULL ||
376 kernel_kmap->ref_reloc_sym->addr == 0))) { 376 kernel_kmap->ref_reloc_sym->addr == 0))) {
377 const struct dso *kdso = kernel_map->dso; 377 const char *desc =
378 "As no suitable kallsyms nor vmlinux was found, kernel samples\n"
379 "can't be resolved.";
380
381 if (kernel_map) {
382 const struct dso *kdso = kernel_map->dso;
383 if (!RB_EMPTY_ROOT(&kdso->symbols[MAP__FUNCTION])) {
384 desc = "If some relocation was applied (e.g. "
385 "kexec) symbols may be misresolved.";
386 }
387 }
378 388
379 ui__warning( 389 ui__warning(
380"Kernel address maps (/proc/{kallsyms,modules}) were restricted.\n\n" 390"Kernel address maps (/proc/{kallsyms,modules}) were restricted.\n\n"
381"Check /proc/sys/kernel/kptr_restrict before running 'perf record'.\n\n%s\n\n" 391"Check /proc/sys/kernel/kptr_restrict before running 'perf record'.\n\n%s\n\n"
382"Samples in kernel modules can't be resolved as well.\n\n", 392"Samples in kernel modules can't be resolved as well.\n\n",
383 RB_EMPTY_ROOT(&kdso->symbols[MAP__FUNCTION]) ? 393 desc);
384"As no suitable kallsyms nor vmlinux was found, kernel samples\n"
385"can't be resolved." :
386"If some relocation was applied (e.g. kexec) symbols may be misresolved.");
387 } 394 }
388 395
389 if (dump_trace) { 396 if (dump_trace) {