]> err.no Git - linux-2.6/commitdiff
ftrace: trace scheduler rbtree
authorIngo Molnar <mingo@elte.hu>
Mon, 12 May 2008 19:20:52 +0000 (21:20 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 23 May 2008 19:07:31 +0000 (21:07 +0200)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/trace/trace.c
kernel/trace/trace.h
kernel/trace/trace_sched_switch.c

index 65d2c0a61ed4170c5b08851614484cf2d7778a69..06380dc1ebe0b3f9bdb6825b361b2e683701b6bc 100644 (file)
@@ -129,6 +129,7 @@ static const char *trace_options[] = {
        "bin",
        "block",
        "stacktrace",
+       "sched-tree",
        NULL
 };
 
index 75e23747567491807bcefc7d5dd9b2afc343271e..a52015702a2834ab7f5ddf20fe263fbae7f8f1eb 100644 (file)
@@ -286,6 +286,7 @@ enum trace_iterator_flags {
        TRACE_ITER_BIN                  = 0x40,
        TRACE_ITER_BLOCK                = 0x80,
        TRACE_ITER_STACKTRACE           = 0x100,
+       TRACE_ITER_SCHED_TREE           = 0x200,
 };
 
 #endif /* _LINUX_KERNEL_TRACE_H */
index 12658b3f2b2891fc5d853325dc081a311a972a5a..5555b906a6669b2a2c3892626026d8b68b17f87b 100644 (file)
@@ -36,7 +36,8 @@ ctx_switch_func(void *__rq, struct task_struct *prev, struct task_struct *next)
 
        if (likely(disabled == 1)) {
                tracing_sched_switch_trace(tr, data, prev, next, flags);
-               ftrace_all_fair_tasks(__rq, tr, data);
+               if (trace_flags & TRACE_ITER_SCHED_TREE)
+                       ftrace_all_fair_tasks(__rq, tr, data);
        }
 
        atomic_dec(&data->disabled);
@@ -62,7 +63,8 @@ wakeup_func(void *__rq, struct task_struct *wakee, struct task_struct *curr)
 
        if (likely(disabled == 1)) {
                tracing_sched_wakeup_trace(tr, data, wakee, curr, flags);
-               ftrace_all_fair_tasks(__rq, tr, data);
+               if (trace_flags & TRACE_ITER_SCHED_TREE)
+                       ftrace_all_fair_tasks(__rq, tr, data);
        }
 
        atomic_dec(&data->disabled);