diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-05-17 10:58:52 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-05-20 10:43:55 -0400 |
commit | e77a07425f4391da2f08b0f9a09df4e70626204d (patch) | |
tree | c194e7c6b4ece5c56c4ff4c3f5ada00ee8ae3009 | |
parent | caf8a0d0499792ac1b3f5b0b84e5890df0039cb6 (diff) |
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>
-rw-r--r-- | tools/perf/builtin-top.c | 6 | ||||
-rw-r--r-- | tools/perf/util/top.h | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 1793da585676..2a6cc254ad0c 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -732,7 +732,7 @@ static void perf_event__process_sample(struct perf_tool *tool, | |||
732 | if (machine__resolve(machine, &al, sample) < 0) | 732 | if (machine__resolve(machine, &al, sample) < 0) |
733 | return; | 733 | return; |
734 | 734 | ||
735 | if (!top->kptr_restrict_warned && | 735 | if (!machine->kptr_restrict_warned && |
736 | symbol_conf.kptr_restrict && | 736 | symbol_conf.kptr_restrict && |
737 | al.cpumode == PERF_RECORD_MISC_KERNEL) { | 737 | al.cpumode == PERF_RECORD_MISC_KERNEL) { |
738 | ui__warning( | 738 | ui__warning( |
@@ -743,7 +743,7 @@ static void perf_event__process_sample(struct perf_tool *tool, | |||
743 | " modules" : ""); | 743 | " modules" : ""); |
744 | if (use_browser <= 0) | 744 | if (use_browser <= 0) |
745 | sleep(5); | 745 | sleep(5); |
746 | top->kptr_restrict_warned = true; | 746 | machine->kptr_restrict_warned = true; |
747 | } | 747 | } |
748 | 748 | ||
749 | if (al.sym == NULL) { | 749 | if (al.sym == NULL) { |
@@ -759,7 +759,7 @@ static void perf_event__process_sample(struct perf_tool *tool, | |||
759 | * --hide-kernel-symbols, even if the user specifies an | 759 | * --hide-kernel-symbols, even if the user specifies an |
760 | * invalid --vmlinux ;-) | 760 | * invalid --vmlinux ;-) |
761 | */ | 761 | */ |
762 | if (!top->kptr_restrict_warned && !top->vmlinux_warned && | 762 | if (!machine->kptr_restrict_warned && !top->vmlinux_warned && |
763 | al.map == machine->vmlinux_maps[MAP__FUNCTION] && | 763 | al.map == machine->vmlinux_maps[MAP__FUNCTION] && |
764 | RB_EMPTY_ROOT(&al.map->dso->symbols[MAP__FUNCTION])) { | 764 | RB_EMPTY_ROOT(&al.map->dso->symbols[MAP__FUNCTION])) { |
765 | if (symbol_conf.vmlinux_name) { | 765 | if (symbol_conf.vmlinux_name) { |
diff --git a/tools/perf/util/top.h b/tools/perf/util/top.h index f92c37abb0a8..b2940c88734a 100644 --- a/tools/perf/util/top.h +++ b/tools/perf/util/top.h | |||
@@ -27,7 +27,6 @@ struct perf_top { | |||
27 | int max_stack; | 27 | int max_stack; |
28 | bool hide_kernel_symbols, hide_user_symbols, zero; | 28 | bool hide_kernel_symbols, hide_user_symbols, zero; |
29 | bool use_tui, use_stdio; | 29 | bool use_tui, use_stdio; |
30 | bool kptr_restrict_warned; | ||
31 | bool vmlinux_warned; | 30 | bool vmlinux_warned; |
32 | bool dump_symtab; | 31 | bool dump_symtab; |
33 | struct hist_entry *sym_filter_entry; | 32 | struct hist_entry *sym_filter_entry; |