Commit 2ab52083 authored by Anton Blanchard's avatar Anton Blanchard Committed by Ingo Molnar

perf top: Move skip symbols to an array

Move the list of symbols we skip into an array, making it
easier to add new ones.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
LKML-Reference: <20090630230140.904782938@samba.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 6717534d
...@@ -286,11 +286,22 @@ static void *display_thread(void *arg) ...@@ -286,11 +286,22 @@ static void *display_thread(void *arg)
return NULL; return NULL;
} }
/* Tag samples to be skipped. */
char *skip_symbols[] = {
"default_idle",
"cpu_idle",
"enter_idle",
"exit_idle",
"mwait_idle",
NULL
};
static int symbol_filter(struct dso *self, struct symbol *sym) static int symbol_filter(struct dso *self, struct symbol *sym)
{ {
static int filter_match; static int filter_match;
struct sym_entry *syme; struct sym_entry *syme;
const char *name = sym->name; const char *name = sym->name;
int i;
if (!strcmp(name, "_text") || if (!strcmp(name, "_text") ||
!strcmp(name, "_etext") || !strcmp(name, "_etext") ||
...@@ -302,13 +313,12 @@ static int symbol_filter(struct dso *self, struct symbol *sym) ...@@ -302,13 +313,12 @@ static int symbol_filter(struct dso *self, struct symbol *sym)
return 1; return 1;
syme = dso__sym_priv(self, sym); syme = dso__sym_priv(self, sym);
/* Tag samples to be skipped. */ for (i = 0; skip_symbols[i]; i++) {
if (!strcmp("default_idle", name) || if (!strcmp(skip_symbols[i], name)) {
!strcmp("cpu_idle", name) || syme->skip = 1;
!strcmp("enter_idle", name) || break;
!strcmp("exit_idle", name) || }
!strcmp("mwait_idle", name)) }
syme->skip = 1;
if (filter_match == 1) { if (filter_match == 1) {
filter_end = sym->start; filter_end = sym->start;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment