diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2013-04-04 21:26:37 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-05-28 09:23:56 -0400 |
commit | 8f0f684b7b640caeca319f7f4e18474d099d8606 (patch) | |
tree | 66edd7ce359d569dade18b39969246b079e69e52 /tools | |
parent | 930477bdc227adbbff1d42ec9eba50a805cc9b78 (diff) |
perf top: Use sort__has_sym
perf top had a similar variable sort_has_symbols for the same purpose.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1365125198-8334-8-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-top.c | 12 | ||||
-rw-r--r-- | tools/perf/util/top.h | 1 |
2 files changed, 3 insertions, 10 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 2eb272d8753c..df9e06af89bf 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -794,7 +794,7 @@ static void perf_event__process_sample(struct perf_tool *tool, | |||
794 | return; | 794 | return; |
795 | } | 795 | } |
796 | 796 | ||
797 | if (top->sort_has_symbols) | 797 | if (sort__has_sym) |
798 | perf_top__record_precise_ip(top, he, evsel->idx, ip); | 798 | perf_top__record_precise_ip(top, he, evsel->idx, ip); |
799 | } | 799 | } |
800 | 800 | ||
@@ -912,9 +912,9 @@ out_err: | |||
912 | return -1; | 912 | return -1; |
913 | } | 913 | } |
914 | 914 | ||
915 | static int perf_top__setup_sample_type(struct perf_top *top) | 915 | static int perf_top__setup_sample_type(struct perf_top *top __maybe_unused) |
916 | { | 916 | { |
917 | if (!top->sort_has_symbols) { | 917 | if (!sort__has_sym) { |
918 | if (symbol_conf.use_callchain) { | 918 | if (symbol_conf.use_callchain) { |
919 | ui__error("Selected -g but \"sym\" not present in --sort/-s."); | 919 | ui__error("Selected -g but \"sym\" not present in --sort/-s."); |
920 | return -EINVAL; | 920 | return -EINVAL; |
@@ -1202,12 +1202,6 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1202 | 1202 | ||
1203 | sort__setup_elide(stdout); | 1203 | sort__setup_elide(stdout); |
1204 | 1204 | ||
1205 | /* | ||
1206 | * Avoid annotation data structures overhead when symbols aren't on the | ||
1207 | * sort list. | ||
1208 | */ | ||
1209 | top.sort_has_symbols = sort_sym.list.next != NULL; | ||
1210 | |||
1211 | get_term_dimensions(&top.winsize); | 1205 | get_term_dimensions(&top.winsize); |
1212 | if (top.print_entries == 0) { | 1206 | if (top.print_entries == 0) { |
1213 | struct sigaction act = { | 1207 | struct sigaction act = { |
diff --git a/tools/perf/util/top.h b/tools/perf/util/top.h index 7ebf357dc9e1..f0a862539ba9 100644 --- a/tools/perf/util/top.h +++ b/tools/perf/util/top.h | |||
@@ -26,7 +26,6 @@ struct perf_top { | |||
26 | int print_entries, count_filter, delay_secs; | 26 | int print_entries, count_filter, delay_secs; |
27 | bool hide_kernel_symbols, hide_user_symbols, zero; | 27 | bool hide_kernel_symbols, hide_user_symbols, zero; |
28 | bool use_tui, use_stdio; | 28 | bool use_tui, use_stdio; |
29 | bool sort_has_symbols; | ||
30 | bool kptr_restrict_warned; | 29 | bool kptr_restrict_warned; |
31 | bool vmlinux_warned; | 30 | bool vmlinux_warned; |
32 | bool dump_symtab; | 31 | bool dump_symtab; |