aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/builtin-sched.c21
-rw-r--r--tools/perf/util/symbol.h1
2 files changed, 22 insertions, 0 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 43fcc13e402d..06be809a02ab 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1966,7 +1966,28 @@ static bool is_idle_sample(struct perf_sched *sched,
1966 1966
1967 return false; 1967 return false;
1968 } 1968 }
1969
1969 callchain_cursor_commit(cursor); 1970 callchain_cursor_commit(cursor);
1971
1972 while (true) {
1973 struct callchain_cursor_node *node;
1974 struct symbol *sym;
1975
1976 node = callchain_cursor_current(cursor);
1977 if (node == NULL)
1978 break;
1979
1980 sym = node->sym;
1981 if (sym && sym->name) {
1982 if (!strcmp(sym->name, "schedule") ||
1983 !strcmp(sym->name, "__schedule") ||
1984 !strcmp(sym->name, "preempt_schedule"))
1985 sym->ignore = 1;
1986 }
1987
1988 callchain_cursor_advance(cursor);
1989 }
1990
1970 return false; 1991 return false;
1971} 1992}
1972 1993
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index dec7e2d44885..1bcbefc0c325 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -58,6 +58,7 @@ struct symbol {
58 u16 namelen; 58 u16 namelen;
59 u8 binding; 59 u8 binding;
60 u8 idle:1; 60 u8 idle:1;
61 u8 ignore:1;
61 u8 arch_sym; 62 u8 arch_sym;
62 char name[0]; 63 char name[0];
63}; 64};