aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-02-05 15:02:00 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-05 19:01:41 -0500
commitb6f11df26fdc28324cf9c9e3b77f2dc985c1bb13 (patch)
treee03b4b8b9dad8a2d3f81574c10aab8fb7a779cbb /kernel/trace/trace.c
parent51a763dd84253bab1d0a1e68e11a7753d1b702ca (diff)
trace: Call tracing_reset_online_cpus before tracer->init()
Impact: cleanup To make it easy for ftrace plugin writers, as this was open coded in the existing plugins Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Frédéric Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 8fad3776e843..ef4dbac95568 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2171,6 +2171,12 @@ tracing_set_trace_read(struct file *filp, char __user *ubuf,
2171 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r); 2171 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
2172} 2172}
2173 2173
2174int tracer_init(struct tracer *t, struct trace_array *tr)
2175{
2176 tracing_reset_online_cpus(tr);
2177 return t->init(tr);
2178}
2179
2174static int tracing_set_tracer(const char *buf) 2180static int tracing_set_tracer(const char *buf)
2175{ 2181{
2176 struct trace_array *tr = &global_trace; 2182 struct trace_array *tr = &global_trace;
@@ -2195,7 +2201,7 @@ static int tracing_set_tracer(const char *buf)
2195 2201
2196 current_trace = t; 2202 current_trace = t;
2197 if (t->init) { 2203 if (t->init) {
2198 ret = t->init(tr); 2204 ret = tracer_init(t, tr);
2199 if (ret) 2205 if (ret)
2200 goto out; 2206 goto out;
2201 } 2207 }