OSDN Git Service

perf top: Don't look for kernel idle symbols in all DSOs
[android-x86/kernel.git] / tools / perf / builtin-top.c
index bde216b..4fb6f72 100644 (file)
@@ -623,10 +623,12 @@ repeat:
        return NULL;
 }
 
-static int symbol_filter(struct map *map __maybe_unused, struct symbol *sym)
+static int symbol_filter(struct map *map, struct symbol *sym)
 {
        const char *name = sym->name;
 
+       if (!map->dso->kernel)
+               return 0;
        /*
         * ppc64 uses function descriptors and appends a '.' to the
         * start of every instruction address. Remove it.