tracing: branch tracer, fix writing to trace/trace_options
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Sun, 16 Nov 2008 10:37:58 +0000 (16:07 +0530)
committerIngo Molnar <mingo@elte.hu>
Mon, 17 Nov 2008 11:07:27 +0000 (12:07 +0100)
Impact: fix trace_options behavior

writing to trace/trace_options use the index of the array
to find the value of the flag. With branch tracer flag
defined conditionally, this breaks writing to trace_options
with branch tracer disabled.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace.c
kernel/trace/trace.h

index 4a904623e05d16ca304c9409de59a67d8de40cd4..b04923b72ce0ba9b22b0b99e16aa9ad7c0af502d 100644 (file)
@@ -259,9 +259,7 @@ static const char *trace_options[] = {
        "sched-tree",
        "ftrace_printk",
        "ftrace_preempt",
-#ifdef CONFIG_BRANCH_TRACER
        "branch",
-#endif
        "annotate",
        NULL
 };
index 790ea8c0e1f3ba04eec5b19f0b3605c41e10d107..b41d7b4c2cae12696216b9ae8f508ef35675ab7c 100644 (file)
@@ -470,9 +470,7 @@ enum trace_iterator_flags {
        TRACE_ITER_SCHED_TREE           = 0x200,
        TRACE_ITER_PRINTK               = 0x400,
        TRACE_ITER_PREEMPTONLY          = 0x800,
-#ifdef CONFIG_BRANCH_TRACER
        TRACE_ITER_BRANCH               = 0x1000,
-#endif
        TRACE_ITER_ANNOTATE             = 0x2000,
 };