diff options
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r-- | include/linux/ftrace.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index e46a7b34037c..4642959e5bda 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -234,6 +234,11 @@ ftrace_init_module(unsigned long *start, unsigned long *end) { } | |||
234 | #endif | 234 | #endif |
235 | 235 | ||
236 | 236 | ||
237 | /* | ||
238 | * Structure which defines the trace of an initcall. | ||
239 | * You don't have to fill the func field since it is | ||
240 | * only used internally by the tracer. | ||
241 | */ | ||
237 | struct boot_trace { | 242 | struct boot_trace { |
238 | pid_t caller; | 243 | pid_t caller; |
239 | char func[KSYM_NAME_LEN]; | 244 | char func[KSYM_NAME_LEN]; |
@@ -244,13 +249,28 @@ struct boot_trace { | |||
244 | }; | 249 | }; |
245 | 250 | ||
246 | #ifdef CONFIG_BOOT_TRACER | 251 | #ifdef CONFIG_BOOT_TRACER |
252 | /* Append the trace on the ring-buffer */ | ||
247 | extern void trace_boot(struct boot_trace *it, initcall_t fn); | 253 | extern void trace_boot(struct boot_trace *it, initcall_t fn); |
254 | |||
255 | /* Tells the tracer that smp_pre_initcall is finished. | ||
256 | * So we can start the tracing | ||
257 | */ | ||
248 | extern void start_boot_trace(void); | 258 | extern void start_boot_trace(void); |
249 | extern void stop_boot_trace(void); | 259 | |
260 | /* Resume the tracing of other necessary events | ||
261 | * such as sched switches | ||
262 | */ | ||
263 | extern void enable_boot_trace(void); | ||
264 | |||
265 | /* Suspend this tracing. Actually, only sched_switches tracing have | ||
266 | * to be suspended. Initcalls doesn't need it.) | ||
267 | */ | ||
268 | extern void disable_boot_trace(void); | ||
250 | #else | 269 | #else |
251 | static inline void trace_boot(struct boot_trace *it, initcall_t fn) { } | 270 | static inline void trace_boot(struct boot_trace *it, initcall_t fn) { } |
252 | static inline void start_boot_trace(void) { } | 271 | static inline void start_boot_trace(void) { } |
253 | static inline void stop_boot_trace(void) { } | 272 | static inline void enable_boot_trace(void) { } |
273 | static inline void disable_boot_trace(void) { } | ||
254 | #endif | 274 | #endif |
255 | 275 | ||
256 | 276 | ||