diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 12f5e817380e..dde6f0ace6dc 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -43,11 +43,6 @@ static cpumask_t __read_mostly tracing_buffer_mask; | |||
43 | #define for_each_tracing_cpu(cpu) \ | 43 | #define for_each_tracing_cpu(cpu) \ |
44 | for_each_cpu_mask(cpu, tracing_buffer_mask) | 44 | for_each_cpu_mask(cpu, tracing_buffer_mask) |
45 | 45 | ||
46 | /* dummy trace to disable tracing */ | ||
47 | static struct tracer no_tracer __read_mostly = { | ||
48 | .name = "none", | ||
49 | }; | ||
50 | |||
51 | static int trace_alloc_page(void); | 46 | static int trace_alloc_page(void); |
52 | static int trace_free_page(void); | 47 | static int trace_free_page(void); |
53 | 48 | ||
@@ -135,6 +130,23 @@ static DECLARE_WAIT_QUEUE_HEAD(trace_wait); | |||
135 | /* trace_flags holds iter_ctrl options */ | 130 | /* trace_flags holds iter_ctrl options */ |
136 | unsigned long trace_flags = TRACE_ITER_PRINT_PARENT; | 131 | unsigned long trace_flags = TRACE_ITER_PRINT_PARENT; |
137 | 132 | ||
133 | static notrace void no_trace_init(struct trace_array *tr) | ||
134 | { | ||
135 | int cpu; | ||
136 | |||
137 | if(tr->ctrl) | ||
138 | for_each_online_cpu(cpu) | ||
139 | tracing_reset(tr->data[cpu]); | ||
140 | tracer_enabled = 0; | ||
141 | } | ||
142 | |||
143 | /* dummy trace to disable tracing */ | ||
144 | static struct tracer no_tracer __read_mostly = { | ||
145 | .name = "none", | ||
146 | .init = no_trace_init | ||
147 | }; | ||
148 | |||
149 | |||
138 | /** | 150 | /** |
139 | * trace_wake_up - wake up tasks waiting for trace input | 151 | * trace_wake_up - wake up tasks waiting for trace input |
140 | * | 152 | * |