summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2018-04-23 17:13:49 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-04-26 13:47:06 -0300
commite94b861a231501e73d786970ed5a1fb3ea643906 (patch)
tree03d5e4ceba24394b2b5f7b14a741870d47ab2c07 /tools/perf/builtin-report.c
parentd88205db9caa0e9d42dde8ff6c2fa0c7b57cd11d (diff)
perf map: Introduce map__has_symbols()
To further simplify checking if symbols are available for a given map and to reduce the number of users of MAP__{FUNCTION,VARIABLE}. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-iyfoyvbfdti5uehgpjum3qrq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r--tools/perf/builtin-report.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index a4104e447f56..68ea336bf311 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -523,12 +523,9 @@ static void report__warn_kptr_restrict(const struct report *rep)
"As no suitable kallsyms nor vmlinux was found, kernel samples\n"
"can't be resolved.";
- if (kernel_map) {
- const struct dso *kdso = kernel_map->dso;
- if (dso__has_symbols(kdso, MAP__FUNCTION)) {
- desc = "If some relocation was applied (e.g. "
- "kexec) symbols may be misresolved.";
- }
+ if (kernel_map && map__has_symbols(kernel_map)) {
+ desc = "If some relocation was applied (e.g. "
+ "kexec) symbols may be misresolved.";
}
ui__warning(