Skip to content

Commit e77a074

Browse files
committed
perf top: Use machine->kptr_restrict_warned
Its now there, no need to have it too. Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Milian Wolff <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent caf8a0d commit e77a074

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

tools/perf/builtin-top.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ static void perf_event__process_sample(struct perf_tool *tool,
732732
if (machine__resolve(machine, &al, sample) < 0)
733733
return;
734734

735-
if (!top->kptr_restrict_warned &&
735+
if (!machine->kptr_restrict_warned &&
736736
symbol_conf.kptr_restrict &&
737737
al.cpumode == PERF_RECORD_MISC_KERNEL) {
738738
ui__warning(
@@ -743,7 +743,7 @@ static void perf_event__process_sample(struct perf_tool *tool,
743743
" modules" : "");
744744
if (use_browser <= 0)
745745
sleep(5);
746-
top->kptr_restrict_warned = true;
746+
machine->kptr_restrict_warned = true;
747747
}
748748

749749
if (al.sym == NULL) {
@@ -759,7 +759,7 @@ static void perf_event__process_sample(struct perf_tool *tool,
759759
* --hide-kernel-symbols, even if the user specifies an
760760
* invalid --vmlinux ;-)
761761
*/
762-
if (!top->kptr_restrict_warned && !top->vmlinux_warned &&
762+
if (!machine->kptr_restrict_warned && !top->vmlinux_warned &&
763763
al.map == machine->vmlinux_maps[MAP__FUNCTION] &&
764764
RB_EMPTY_ROOT(&al.map->dso->symbols[MAP__FUNCTION])) {
765765
if (symbol_conf.vmlinux_name) {

tools/perf/util/top.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ struct perf_top {
2727
int max_stack;
2828
bool hide_kernel_symbols, hide_user_symbols, zero;
2929
bool use_tui, use_stdio;
30-
bool kptr_restrict_warned;
3130
bool vmlinux_warned;
3231
bool dump_symtab;
3332
struct hist_entry *sym_filter_entry;

0 commit comments

Comments
 (0)