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

perf top: Use machine->kptr_restrict_warned

Its now there, no need to have it too.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-y18oeou494uy11im7u9to0dx@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+3 -4
+3 -3
tools/perf/builtin-top.c
··· 732 732 if (machine__resolve(machine, &al, sample) < 0) 733 733 return; 734 734 735 - if (!top->kptr_restrict_warned && 735 + if (!machine->kptr_restrict_warned && 736 736 symbol_conf.kptr_restrict && 737 737 al.cpumode == PERF_RECORD_MISC_KERNEL) { 738 738 ui__warning( ··· 743 743 " modules" : ""); 744 744 if (use_browser <= 0) 745 745 sleep(5); 746 - top->kptr_restrict_warned = true; 746 + machine->kptr_restrict_warned = true; 747 747 } 748 748 749 749 if (al.sym == NULL) { ··· 759 759 * --hide-kernel-symbols, even if the user specifies an 760 760 * invalid --vmlinux ;-) 761 761 */ 762 - if (!top->kptr_restrict_warned && !top->vmlinux_warned && 762 + if (!machine->kptr_restrict_warned && !top->vmlinux_warned && 763 763 al.map == machine->vmlinux_maps[MAP__FUNCTION] && 764 764 RB_EMPTY_ROOT(&al.map->dso->symbols[MAP__FUNCTION])) { 765 765 if (symbol_conf.vmlinux_name) {
-1
tools/perf/util/top.h
··· 27 27 int max_stack; 28 28 bool hide_kernel_symbols, hide_user_symbols, zero; 29 29 bool use_tui, use_stdio; 30 - bool kptr_restrict_warned; 31 30 bool vmlinux_warned; 32 31 bool dump_symtab; 33 32 struct hist_entry *sym_filter_entry;