perf report: Ignore kptr_restrict when not sampling the kernel
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 9c39ed90153d95d362004ed0d5e259ec46af3803 Gitweb: https://git.kernel.org/tip/9c39ed90153d95d362004ed0d5e259ec46af3803 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Tue, 14 Nov 2017 11:12:11 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Thu, 16 Nov 2017 14:50:01 -0300
perf report: Ignore kptr_restrict when not sampling the kernel
If none of the evsels has attr.exclude_kernel set to zero, no kernel samples, so no point in warning the user about problems in processing kernel samples, as there will be none.
Cc Adrian Hunter <[email protected]>
Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Wang Nan <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/builtin-report.c | 3 +++ 1 file changed, 3 insertions(+)
tools/perf/builtin-report.c +3 -0
@@ -441,6 +441,9 @@ static void report__warn_kptr_restrict(const struct report *rep)struct map *kernel_map =machine__kernel_map (&rep->session->machines.host);struct kmap *kernel_kmap = kernel_map ?map__kmap (kernel_map) :NULL ; +if (perf_evlist__exclude_kernel (rep->session->evlist)) +return ; + if (kernel_map == NULL || (kernel_map->dso->hit && (kernel_kmap->ref_reloc_sym == NULL ||