diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-02-04 04:33:24 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-02-05 09:26:40 -0500 |
commit | 764328d3209dd81b02a55722556b07b6f35e3ca0 (patch) | |
tree | d2490d612488c220da32cf96f0ce798ea8a75e2a /tools | |
parent | fe4b04fa31a6dcf4358aa84cf81e5a7fd079469b (diff) |
perf top: Remove superfluous name_len field
From the sym_entry struct, struct symbol already has this field.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-top.c | 3 | ||||
-rw-r--r-- | tools/perf/util/top.c | 5 | ||||
-rw-r--r-- | tools/perf/util/top.h | 1 |
3 files changed, 3 insertions, 6 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 104de9ab314c..154e088588bc 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -787,9 +787,6 @@ static int symbol_filter(struct map *map, struct symbol *sym) | |||
787 | } | 787 | } |
788 | } | 788 | } |
789 | 789 | ||
790 | if (!syme->skip) | ||
791 | syme->name_len = strlen(sym->name); | ||
792 | |||
793 | return 0; | 790 | return 0; |
794 | } | 791 | } |
795 | 792 | ||
diff --git a/tools/perf/util/top.c b/tools/perf/util/top.c index 1d2e2652cd68..70a9c13f4ad5 100644 --- a/tools/perf/util/top.c +++ b/tools/perf/util/top.c | |||
@@ -200,6 +200,7 @@ void perf_top__find_widths(struct perf_top *top, struct rb_root *root, | |||
200 | 200 | ||
201 | for (nd = rb_first(root); nd; nd = rb_next(nd)) { | 201 | for (nd = rb_first(root); nd; nd = rb_next(nd)) { |
202 | struct sym_entry *syme = rb_entry(nd, struct sym_entry, rb_node); | 202 | struct sym_entry *syme = rb_entry(nd, struct sym_entry, rb_node); |
203 | struct symbol *sym = sym_entry__symbol(syme); | ||
203 | 204 | ||
204 | if (++printed > top->print_entries || | 205 | if (++printed > top->print_entries || |
205 | (int)syme->snap_count < top->count_filter) | 206 | (int)syme->snap_count < top->count_filter) |
@@ -211,7 +212,7 @@ void perf_top__find_widths(struct perf_top *top, struct rb_root *root, | |||
211 | if (syme->map->dso->short_name_len > *dso_short_width) | 212 | if (syme->map->dso->short_name_len > *dso_short_width) |
212 | *dso_short_width = syme->map->dso->short_name_len; | 213 | *dso_short_width = syme->map->dso->short_name_len; |
213 | 214 | ||
214 | if (syme->name_len > *sym_width) | 215 | if (sym->namelen > *sym_width) |
215 | *sym_width = syme->name_len; | 216 | *sym_width = sym->namelen; |
216 | } | 217 | } |
217 | } | 218 | } |
diff --git a/tools/perf/util/top.h b/tools/perf/util/top.h index 611370fa7df8..500950818d2f 100644 --- a/tools/perf/util/top.h +++ b/tools/perf/util/top.h | |||
@@ -31,7 +31,6 @@ struct sym_entry { | |||
31 | unsigned long snap_count; | 31 | unsigned long snap_count; |
32 | double weight; | 32 | double weight; |
33 | int skip; | 33 | int skip; |
34 | u16 name_len; | ||
35 | u8 origin; | 34 | u8 origin; |
36 | struct map *map; | 35 | struct map *map; |
37 | struct sym_entry_source *src; | 36 | struct sym_entry_source *src; |