]>
Commit | Line | Data |
---|---|---|
fb1b6d8b SN |
1 | /* |
2 | * nop tracer | |
3 | * | |
4 | * Copyright (C) 2008 Steven Noonan <steven@uplinklabs.net> | |
5 | * | |
6 | */ | |
7 | ||
8 | #include <linux/module.h> | |
9 | #include <linux/fs.h> | |
10 | #include <linux/debugfs.h> | |
11 | #include <linux/ftrace.h> | |
12 | ||
13 | #include "trace.h" | |
14 | ||
15 | static struct trace_array *ctx_trace; | |
16 | ||
17 | static void start_nop_trace(struct trace_array *tr) | |
18 | { | |
19 | /* Nothing to do! */ | |
20 | } | |
21 | ||
22 | static void stop_nop_trace(struct trace_array *tr) | |
23 | { | |
24 | /* Nothing to do! */ | |
25 | } | |
26 | ||
1c80025a | 27 | static int nop_trace_init(struct trace_array *tr) |
fb1b6d8b | 28 | { |
35cb5ed0 | 29 | int cpu; |
fb1b6d8b SN |
30 | ctx_trace = tr; |
31 | ||
35cb5ed0 | 32 | for_each_online_cpu(cpu) |
3928a8a2 | 33 | tracing_reset(tr, cpu); |
35cb5ed0 | 34 | |
c76f0694 | 35 | start_nop_trace(tr); |
1c80025a | 36 | return 0; |
fb1b6d8b SN |
37 | } |
38 | ||
39 | static void nop_trace_reset(struct trace_array *tr) | |
40 | { | |
c76f0694 | 41 | stop_nop_trace(tr); |
fb1b6d8b SN |
42 | } |
43 | ||
43a15386 | 44 | struct tracer nop_trace __read_mostly = |
fb1b6d8b SN |
45 | { |
46 | .name = "nop", | |
47 | .init = nop_trace_init, | |
48 | .reset = nop_trace_reset, | |
fb1b6d8b SN |
49 | #ifdef CONFIG_FTRACE_SELFTEST |
50 | .selftest = trace_selftest_startup_nop, | |
51 | #endif | |
52 | }; | |
53 |