aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 08bf5da86676..d4614a8a034b 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -369,8 +369,35 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
369 369
370/* 370/*
371 * General tracing related utility functions - trace_printk(), 371 * General tracing related utility functions - trace_printk(),
372 * tracing_start()/tracing_stop: 372 * tracing_on/tracing_off and tracing_start()/tracing_stop
373 *
374 * Use tracing_on/tracing_off when you want to quickly turn on or off
375 * tracing. It simply enables or disables the recording of the trace events.
376 * This also corresponds to the user space debugfs/tracing/tracing_on
377 * file, which gives a means for the kernel and userspace to interact.
378 * Place a tracing_off() in the kernel where you want tracing to end.
379 * From user space, examine the trace, and then echo 1 > tracing_on
380 * to continue tracing.
381 *
382 * tracing_stop/tracing_start has slightly more overhead. It is used
383 * by things like suspend to ram where disabling the recording of the
384 * trace is not enough, but tracing must actually stop because things
385 * like calling smp_processor_id() may crash the system.
386 *
387 * Most likely, you want to use tracing_on/tracing_off.
373 */ 388 */
389#ifdef CONFIG_RING_BUFFER
390void tracing_on(void);
391void tracing_off(void);
392/* trace_off_permanent stops recording with no way to bring it back */
393void tracing_off_permanent(void);
394int tracing_is_on(void);
395#else
396static inline void tracing_on(void) { }
397static inline void tracing_off(void) { }
398static inline void tracing_off_permanent(void) { }
399static inline int tracing_is_on(void) { return 0; }
400#endif
374#ifdef CONFIG_TRACING 401#ifdef CONFIG_TRACING
375extern void tracing_start(void); 402extern void tracing_start(void);
376extern void tracing_stop(void); 403extern void tracing_stop(void);