diff options
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r-- | tools/perf/util/symbol.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index c0c36965fff0..f55c18da1e40 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -573,6 +573,36 @@ static u8 kallsyms2elf_type(char type) | |||
573 | return isupper(type) ? STB_GLOBAL : STB_LOCAL; | 573 | return isupper(type) ? STB_GLOBAL : STB_LOCAL; |
574 | } | 574 | } |
575 | 575 | ||
576 | bool symbol__is_idle(struct symbol *sym) | ||
577 | { | ||
578 | const char * const idle_symbols[] = { | ||
579 | "cpu_idle", | ||
580 | "intel_idle", | ||
581 | "default_idle", | ||
582 | "native_safe_halt", | ||
583 | "enter_idle", | ||
584 | "exit_idle", | ||
585 | "mwait_idle", | ||
586 | "mwait_idle_with_hints", | ||
587 | "poll_idle", | ||
588 | "ppc64_runlatch_off", | ||
589 | "pseries_dedicated_idle_sleep", | ||
590 | NULL | ||
591 | }; | ||
592 | |||
593 | int i; | ||
594 | |||
595 | if (!sym) | ||
596 | return false; | ||
597 | |||
598 | for (i = 0; idle_symbols[i]; i++) { | ||
599 | if (!strcmp(idle_symbols[i], sym->name)) | ||
600 | return true; | ||
601 | } | ||
602 | |||
603 | return false; | ||
604 | } | ||
605 | |||
576 | static int map__process_kallsym_symbol(void *arg, const char *name, | 606 | static int map__process_kallsym_symbol(void *arg, const char *name, |
577 | char type, u64 start) | 607 | char type, u64 start) |
578 | { | 608 | { |