perf top: Remove redundant syme->origin field
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 11 Mar 2011 15:38:48 +0000 (12:38 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 11 Mar 2011 16:28:45 +0000 (13:28 -0300)
We can get it from syme->map->dso->kernel (that should be renamed to
origin, but leave this for another patch).

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 4bf6e02c2b2a9dcba3f17027c4613d54b8f5c6cf..4976400a1438e02347b0ea36a1a3f5756474760b 100644 (file)
@@ -782,7 +782,6 @@ static void perf_event__process_sample(const union perf_event *event,
        if (!syme->skip) {
                struct perf_evsel *evsel;
 
-               syme->origin = origin;
                evsel = perf_evlist__id2evsel(top.evlist, sample->id);
                assert(evsel != NULL);
                syme->count[evsel->idx]++;
index fcfb77762819ebdd7228621d0ad28b27503331b7..a11f60735a188afae7152998f5e8d2f63bb08475 100644 (file)
@@ -184,9 +184,9 @@ float perf_top__decay_samples(struct perf_top *top, struct rb_root *root)
                if (syme->snap_count != 0) {
 
                        if ((top->hide_user_symbols &&
-                            syme->origin == PERF_RECORD_MISC_USER) ||
+                            syme->map->dso->kernel == DSO_TYPE_USER) ||
                            (top->hide_kernel_symbols &&
-                            syme->origin == PERF_RECORD_MISC_KERNEL)) {
+                            syme->map->dso->kernel == DSO_TYPE_KERNEL)) {
                                perf_top__remove_active_sym(top, syme);
                                continue;
                        }
index 96a78312c7190ceaef275fc12b7166e61059fc9d..ba111b25e16aa94a8276bc2d3ba6a76d18b43dac 100644 (file)
@@ -17,7 +17,6 @@ struct sym_entry {
        unsigned long           snap_count;
        double                  weight;
        int                     skip;
-       u8                      origin;
        struct map              *map;
        unsigned long           count[0];
 };