perf top: Remove superfluous name_len field
Commit-ID: 764328d3209dd81b02a55722556b07b6f35e3ca0 Gitweb: http://git.kernel.org/tip/764328d3209dd81b02a55722556b07b6f35e3ca0 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Fri, 4 Feb 2011 07:33:24 -0200 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Sat, 5 Feb 2011 12:26:40 -0200
perf top: Remove superfluous name_len field
Quoted 1 line
From the
sym_entrystruct, struct symbol already has this field.
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Tom Zanussi <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/builtin-top.c | 3 --- tools/perf/util/top.c | 5 +++-- tools/perf/util/top.h | 1 - 3 files changed, 3 insertions(+), 6 deletions(-)
tools/perf/builtin-top.c +0 -3
@@ -787,9 +787,6 @@ static int symbol_filter(struct map *map, struct symbol *sym) } } -if (!syme->skip) - syme->name_len =strlen (sym->name); -return 0 ; }
tools/perf/util/top.c +3 -2
@@ -200,6 +200,7 @@ void perf_top__find_widths(struct perf_top *top, struct rb_root *root,for (nd =rb_first (root); nd; nd =rb_next (nd)) { struct sym_entry *syme = rb_entry(nd, struct sym_entry, rb_node); +struct symbol *sym =sym_entry__symbol (syme);if (++printed > top->print_entries || (int )syme->snap_count < top->count_filter)
@@ -211,7 +212,7 @@ void perf_top__find_widths(struct perf_top *top, struct rb_root *root,if (syme->map->dso->short_name_len > *dso_short_width) *dso_short_width = syme->map->dso->short_name_len; -if (syme->name_len > *sym_width) - *sym_width = syme->name_len; +if (sym->namelen > *sym_width) + *sym_width = sym->namelen; } }
tools/perf/util/top.h +0 -1
@@ -31,7 +31,6 @@ struct sym_entry {unsigned long snap_count;double weight;int skip; -u16 name_len;u8 origin;struct map *map;struct sym_entry_source *src;