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

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>

authored by

Namhyung Kim and committed by
Arnaldo Carvalho de Melo
8f0f684b 930477bd

+3 -10
+3 -9
tools/perf/builtin-top.c
··· 794 794 return; 795 795 } 796 796 797 - if (top->sort_has_symbols) 797 + if (sort__has_sym) 798 798 perf_top__record_precise_ip(top, he, evsel->idx, ip); 799 799 } 800 800 ··· 912 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 918 if (symbol_conf.use_callchain) { 919 919 ui__error("Selected -g but \"sym\" not present in --sort/-s."); 920 920 return -EINVAL; ··· 1201 1201 return -1; 1202 1202 1203 1203 sort__setup_elide(stdout); 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 1204 1211 1205 get_term_dimensions(&top.winsize); 1212 1206 if (top.print_entries == 0) {
-1
tools/perf/util/top.h
··· 26 26 int print_entries, count_filter, delay_secs; 27 27 bool hide_kernel_symbols, hide_user_symbols, zero; 28 28 bool use_tui, use_stdio; 29 - bool sort_has_symbols; 30 29 bool kptr_restrict_warned; 31 30 bool vmlinux_warned; 32 31 bool dump_symtab;