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 74776558ddfb..d58e41445d0d 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -377,16 +377,23 @@ static int __cmd_report(struct perf_report *rep)
377 (kernel_map->dso->hit && 377 (kernel_map->dso->hit &&
378 (kernel_kmap->ref_reloc_sym == NULL || 378 (kernel_kmap->ref_reloc_sym == NULL ||
379 kernel_kmap->ref_reloc_sym->addr == 0))) { 379 kernel_kmap->ref_reloc_sym->addr == 0))) {
380 const struct dso *kdso = kernel_map->dso; 380 const char *desc =
381 "As no suitable kallsyms nor vmlinux was found, kernel samples\n"
382 "can't be resolved.";
383
384 if (kernel_map) {
385 const struct dso *kdso = kernel_map->dso;
386 if (!RB_EMPTY_ROOT(&kdso->symbols[MAP__FUNCTION])) {
387 desc = "If some relocation was applied (e.g. "
388 "kexec) symbols may be misresolved.";
389 }
390 }
381 391
382 ui__warning( 392 ui__warning(
383"Kernel address maps (/proc/{kallsyms,modules}) were restricted.\n\n" 393"Kernel address maps (/proc/{kallsyms,modules}) were restricted.\n\n"
384"Check /proc/sys/kernel/kptr_restrict before running 'perf record'.\n\n%s\n\n" 394"Check /proc/sys/kernel/kptr_restrict before running 'perf record'.\n\n%s\n\n"
385"Samples in kernel modules can't be resolved as well.\n\n", 395"Samples in kernel modules can't be resolved as well.\n\n",
386 RB_EMPTY_ROOT(&kdso->symbols[MAP__FUNCTION]) ? 396 desc);
387"As no suitable kallsyms nor vmlinux was found, kernel samples\n"
388"can't be resolved." :
389"If some relocation was applied (e.g. kexec) symbols may be misresolved.");
390 } 397 }
391 398
392 if (dump_trace) { 399 if (dump_trace) {