Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+3
+3
tools/perf/builtin-report.c
··· 441 441 struct map *kernel_map = machine__kernel_map(&rep->session->machines.host); 442 442 struct kmap *kernel_kmap = kernel_map ? map__kmap(kernel_map) : NULL; 443 443 444 + if (perf_evlist__exclude_kernel(rep->session->evlist)) 445 + return; 446 + 444 447 if (kernel_map == NULL || 445 448 (kernel_map->dso->hit && 446 449 (kernel_kmap->ref_reloc_sym == NULL ||