mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
perf top: Don't look for kernel idle symbols in all DSOs
The 'top' tool initially supported only kernel symbols, when making it support userspace symbols we forgot to make the symbol filter first check that the DSO is the kernel one. Fix it. Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Don Zickus <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> c: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
1 parent
ddcd0973fe
commit
e7110b9fb9
2 files changed
+7
-1
No files matched your search
@@ -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.
|
||||
|
||||
@@ -523,6 +523,10 @@ struct process_kallsyms_args {
|
||||
struct dso *dso;
|
||||
};
|
||||
|
||||
/*
|
||||
* These are symbols in the kernel image, so make sure that
|
||||
* sym is from a kernel DSO.
|
||||
*/
|
||||
bool symbol__is_idle(struct symbol *sym)
|
||||
{
|
||||
const char * const idle_symbols[] = {
|
||||
|
||||
Reference in new issue
Block a user