diff options
author | Steven Rostedt <srostedt@redhat.com> | 2012-03-20 12:28:29 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-03-20 12:28:29 -0400 |
commit | 93d68e52295fb8b65ded6db49e32e63b6a203e0b (patch) | |
tree | b6c794ee0b95aa6b837da109b85da245cd47ee31 /include | |
parent | 37d73998920859784e6504462a2fd5f52cc08051 (diff) |
tracing: Move the tracing_on/off() declarations into CONFIG_TRACING
The tracing_on/off() declarations were under CONFIG_RING_BUFFER, but
the functions are now only defined under CONFIG_TRACING as they are
specific to ftrace and not the ring buffer.
But the declarations were still defined under the ring buffer and
this caused the build to fail when CONFIG_RING_BUFFER was set but
CONFIG_TRACING was not.
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kernel.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index e8343422240a..51b9548fd12d 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -414,16 +414,10 @@ extern int __must_check hex2bin(u8 *dst, const char *src, size_t count); | |||
414 | * Most likely, you want to use tracing_on/tracing_off. | 414 | * Most likely, you want to use tracing_on/tracing_off. |
415 | */ | 415 | */ |
416 | #ifdef CONFIG_RING_BUFFER | 416 | #ifdef CONFIG_RING_BUFFER |
417 | void tracing_on(void); | ||
418 | void tracing_off(void); | ||
419 | /* trace_off_permanent stops recording with no way to bring it back */ | 417 | /* trace_off_permanent stops recording with no way to bring it back */ |
420 | void tracing_off_permanent(void); | 418 | void tracing_off_permanent(void); |
421 | int tracing_is_on(void); | ||
422 | #else | 419 | #else |
423 | static inline void tracing_on(void) { } | ||
424 | static inline void tracing_off(void) { } | ||
425 | static inline void tracing_off_permanent(void) { } | 420 | static inline void tracing_off_permanent(void) { } |
426 | static inline int tracing_is_on(void) { return 0; } | ||
427 | #endif | 421 | #endif |
428 | 422 | ||
429 | enum ftrace_dump_mode { | 423 | enum ftrace_dump_mode { |
@@ -433,6 +427,10 @@ enum ftrace_dump_mode { | |||
433 | }; | 427 | }; |
434 | 428 | ||
435 | #ifdef CONFIG_TRACING | 429 | #ifdef CONFIG_TRACING |
430 | void tracing_on(void); | ||
431 | void tracing_off(void); | ||
432 | int tracing_is_on(void); | ||
433 | |||
436 | extern void tracing_start(void); | 434 | extern void tracing_start(void); |
437 | extern void tracing_stop(void); | 435 | extern void tracing_stop(void); |
438 | extern void ftrace_off_permanent(void); | 436 | extern void ftrace_off_permanent(void); |
@@ -517,6 +515,11 @@ static inline void tracing_start(void) { } | |||
517 | static inline void tracing_stop(void) { } | 515 | static inline void tracing_stop(void) { } |
518 | static inline void ftrace_off_permanent(void) { } | 516 | static inline void ftrace_off_permanent(void) { } |
519 | static inline void trace_dump_stack(void) { } | 517 | static inline void trace_dump_stack(void) { } |
518 | |||
519 | static inline void tracing_on(void) { } | ||
520 | static inline void tracing_off(void) { } | ||
521 | static inline int tracing_is_on(void) { return 0; } | ||
522 | |||
520 | static inline int | 523 | static inline int |
521 | trace_printk(const char *fmt, ...) | 524 | trace_printk(const char *fmt, ...) |
522 | { | 525 | { |