perf top: Filter symbols based on __map__is_kernel(map)
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 23 Sep 2015 18:15:54 +0000 (15:15 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 28 Sep 2015 18:50:53 +0000 (15:50 -0300)
Instead of using dso->kernel, this is equivalent at the moment,
and helps in reducing the accesses to dso->kernel.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-1pc2v63iphtifovw3bv0bo1v@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-top.c

index bdaf44f24d5d7acb34324a7940ee653d401b1c24..38d4d6cac8236c01ca0b9b66101196d1a41dec17 100644 (file)
@@ -655,7 +655,7 @@ static int symbol_filter(struct map *map, struct symbol *sym)
 {
        const char *name = sym->name;
 
-       if (!map->dso->kernel)
+       if (!__map__is_kernel(map))
                return 0;
        /*
         * ppc64 uses function descriptors and appends a '.' to the