diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-11-14 11:12:11 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-11-16 14:50:01 -0300 |
commit | 9c39ed90153d95d362004ed0d5e259ec46af3803 (patch) | |
tree | 49423db427d590e972ff4118af1e1d1752208858 /tools/perf/builtin-report.c | |
parent | 07d6f446a9e45b7e6e7438f8560e40d4dcfa0321 (diff) | |
download | op-kernel-dev-9c39ed90153d95d362004ed0d5e259ec46af3803.zip op-kernel-dev-9c39ed90153d95d362004ed0d5e259ec46af3803.tar.gz |
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 <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-7dn926v3at8txxkky92aesz2@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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 1394cd8..af5dd03 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -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 || |