From d88205db9caa0e9d42dde8ff6c2fa0c7b57cd11d Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 23 Apr 2018 17:08:02 -0300 Subject: perf dso: Add dso__has_symbols() method To replace longer code sequences in various places. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-tlk3klbkfyjrbfjvryyznfju@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/perf/builtin-report.c') diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 0f198f6d9b77..a4104e447f56 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -525,7 +525,7 @@ static void report__warn_kptr_restrict(const struct report *rep) if (kernel_map) { const struct dso *kdso = kernel_map->dso; - if (!RB_EMPTY_ROOT(&kdso->symbols[MAP__FUNCTION])) { + if (dso__has_symbols(kdso, MAP__FUNCTION)) { desc = "If some relocation was applied (e.g. " "kexec) symbols may be misresolved."; } -- cgit v1.2.3