Skip to contentSkip to conversation

perf top: Filter symbols based on __map__is_kernel(map)

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Sep 29, 2015 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  cfc5acd4c80b875d2f739d6a93562034aee5563f
Gitweb:     http://git.kernel.org/tip/cfc5acd4c80b875d2f739d6a93562034aee5563f
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Wed, 23 Sep 2015 15:15:54 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 28 Sep 2015 15:50:53 -0300

perf top: Filter symbols based on __map__is_kernel(map)

Instead of using dso->kernel, this is equivalent at the moment, and helps in reducing the accesses to dso->kernel.

Cc Adrian Hunter <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Stephane Eranian <[email protected]>
Cc Wang Nan <[email protected]>
---
 tools/perf/builtin-top.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-top.c +1 -1
index bdaf44f..38d4d6c 100644
@@ -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