perf top: Remove superfluous name_len field
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 4 Feb 2011 09:33:24 +0000 (07:33 -0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 5 Feb 2011 14:26:40 +0000 (12:26 -0200)
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>
tools/perf/builtin-top.c
tools/perf/util/top.c
tools/perf/util/top.h

index 104de9ab314c379a187b04e47fce6d2e83b6ddcb..154e088588bc4de4334309131aea4d24d72ba327 100644 (file)
@@ -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;
 }
 
index 1d2e2652cd68fb1d5a1c394869a5d43c63eb9af3..70a9c13f4ad5a3cbe8e9aecdfb61c701a400db9c 100644 (file)
@@ -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;
        }
 }
index 611370fa7df8f873f4a56d2aa2e0a4eb1ed0028c..500950818d2f49745c3ca6c1598ed8796879e8da 100644 (file)
@@ -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;