p54: Move rx_mtu to struct bootrec_desc
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / kernel / trace / trace_nop.c
blob4592b4862515c9d1680417f4fe46bc192999d661
1 /*
2 * nop tracer
4 * Copyright (C) 2008 Steven Noonan <steven@uplinklabs.net>
6 */
8 #include <linux/module.h>
9 #include <linux/fs.h>
10 #include <linux/debugfs.h>
11 #include <linux/ftrace.h>
13 #include "trace.h"
15 static struct trace_array *ctx_trace;
17 static void start_nop_trace(struct trace_array *tr)
19 /* Nothing to do! */
22 static void stop_nop_trace(struct trace_array *tr)
24 /* Nothing to do! */
27 static void nop_trace_init(struct trace_array *tr)
29 int cpu;
30 ctx_trace = tr;
32 for_each_online_cpu(cpu)
33 tracing_reset(tr, cpu);
35 if (tr->ctrl)
36 start_nop_trace(tr);
39 static void nop_trace_reset(struct trace_array *tr)
41 if (tr->ctrl)
42 stop_nop_trace(tr);
45 static void nop_trace_ctrl_update(struct trace_array *tr)
47 /* When starting a new trace, reset the buffers */
48 if (tr->ctrl)
49 start_nop_trace(tr);
50 else
51 stop_nop_trace(tr);
54 struct tracer nop_trace __read_mostly =
56 .name = "nop",
57 .init = nop_trace_init,
58 .reset = nop_trace_reset,
59 .ctrl_update = nop_trace_ctrl_update,
60 #ifdef CONFIG_FTRACE_SELFTEST
61 .selftest = trace_selftest_startup_nop,
62 #endif