diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-05-12 15:20:52 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-23 15:07:31 -0400 |
commit | 4ac3ba41d372e3a9e420b36bc43589662b188a14 (patch) | |
tree | b8dd93a0226a92b5f55e5ff1e51712424a7be729 /kernel/trace | |
parent | 1a3c3034336320554a3342572dae98d69e054fc7 (diff) |
ftrace: trace scheduler rbtree
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace.c | 1 | ||||
-rw-r--r-- | kernel/trace/trace.h | 1 | ||||
-rw-r--r-- | kernel/trace/trace_sched_switch.c | 6 |
3 files changed, 6 insertions, 2 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 65d2c0a61ed4..06380dc1ebe0 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -129,6 +129,7 @@ static const char *trace_options[] = { | |||
129 | "bin", | 129 | "bin", |
130 | "block", | 130 | "block", |
131 | "stacktrace", | 131 | "stacktrace", |
132 | "sched-tree", | ||
132 | NULL | 133 | NULL |
133 | }; | 134 | }; |
134 | 135 | ||
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 75e237475674..a52015702a28 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -286,6 +286,7 @@ enum trace_iterator_flags { | |||
286 | TRACE_ITER_BIN = 0x40, | 286 | TRACE_ITER_BIN = 0x40, |
287 | TRACE_ITER_BLOCK = 0x80, | 287 | TRACE_ITER_BLOCK = 0x80, |
288 | TRACE_ITER_STACKTRACE = 0x100, | 288 | TRACE_ITER_STACKTRACE = 0x100, |
289 | TRACE_ITER_SCHED_TREE = 0x200, | ||
289 | }; | 290 | }; |
290 | 291 | ||
291 | #endif /* _LINUX_KERNEL_TRACE_H */ | 292 | #endif /* _LINUX_KERNEL_TRACE_H */ |
diff --git a/kernel/trace/trace_sched_switch.c b/kernel/trace/trace_sched_switch.c index 12658b3f2b28..5555b906a666 100644 --- a/kernel/trace/trace_sched_switch.c +++ b/kernel/trace/trace_sched_switch.c | |||
@@ -36,7 +36,8 @@ ctx_switch_func(void *__rq, struct task_struct *prev, struct task_struct *next) | |||
36 | 36 | ||
37 | if (likely(disabled == 1)) { | 37 | if (likely(disabled == 1)) { |
38 | tracing_sched_switch_trace(tr, data, prev, next, flags); | 38 | tracing_sched_switch_trace(tr, data, prev, next, flags); |
39 | ftrace_all_fair_tasks(__rq, tr, data); | 39 | if (trace_flags & TRACE_ITER_SCHED_TREE) |
40 | ftrace_all_fair_tasks(__rq, tr, data); | ||
40 | } | 41 | } |
41 | 42 | ||
42 | atomic_dec(&data->disabled); | 43 | atomic_dec(&data->disabled); |
@@ -62,7 +63,8 @@ wakeup_func(void *__rq, struct task_struct *wakee, struct task_struct *curr) | |||
62 | 63 | ||
63 | if (likely(disabled == 1)) { | 64 | if (likely(disabled == 1)) { |
64 | tracing_sched_wakeup_trace(tr, data, wakee, curr, flags); | 65 | tracing_sched_wakeup_trace(tr, data, wakee, curr, flags); |
65 | ftrace_all_fair_tasks(__rq, tr, data); | 66 | if (trace_flags & TRACE_ITER_SCHED_TREE) |
67 | ftrace_all_fair_tasks(__rq, tr, data); | ||
66 | } | 68 | } |
67 | 69 | ||
68 | atomic_dec(&data->disabled); | 70 | atomic_dec(&data->disabled); |