mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>, Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH][GIT PULL] tracing: Move the tracing_on/off() declarations into CONFIG_TRACING
Date: Tue, 20 Mar 2012 18:50:28 -0400	[thread overview]
Message-ID: <1332283828.23924.17.camel@gandalf.stny.rr.com> (raw)


Ingo,

This fixes the bug you found with the config. I also added a test to my
test suite, that includes that config combination of having RING_BUFFER
enabled but TRACING not, to catch further bugs similar to this one.

-- Steve 

Please pull the latest tip/perf/core tree, which can be found at:

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
tip/perf/core

Head SHA1: 93d68e52295fb8b65ded6db49e32e63b6a203e0b


Steven Rostedt (1):
      tracing: Move the tracing_on/off() declarations into CONFIG_TRACING

----
 include/linux/kernel.h |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
---------------------------
commit 93d68e52295fb8b65ded6db49e32e63b6a203e0b
Author: Steven Rostedt <srostedt@redhat.com>
Date:   Tue Mar 20 12:28:29 2012 -0400

    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>

diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index e834342..51b9548 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);
  * Most likely, you want to use tracing_on/tracing_off.
  */
 #ifdef CONFIG_RING_BUFFER
-void tracing_on(void);
-void tracing_off(void);
 /* trace_off_permanent stops recording with no way to bring it back */
 void tracing_off_permanent(void);
-int tracing_is_on(void);
 #else
-static inline void tracing_on(void) { }
-static inline void tracing_off(void) { }
 static inline void tracing_off_permanent(void) { }
-static inline int tracing_is_on(void) { return 0; }
 #endif
 
 enum ftrace_dump_mode {
@@ -433,6 +427,10 @@ enum ftrace_dump_mode {
 };
 
 #ifdef CONFIG_TRACING
+void tracing_on(void);
+void tracing_off(void);
+int tracing_is_on(void);
+
 extern void tracing_start(void);
 extern void tracing_stop(void);
 extern void ftrace_off_permanent(void);
@@ -517,6 +515,11 @@ static inline void tracing_start(void) { }
 static inline void tracing_stop(void) { }
 static inline void ftrace_off_permanent(void) { }
 static inline void trace_dump_stack(void) { }
+
+static inline void tracing_on(void) { }
+static inline void tracing_off(void) { }
+static inline int tracing_is_on(void) { return 0; }
+
 static inline int
 trace_printk(const char *fmt, ...)
 {



             reply	other threads:[~2012-03-20 22:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20 22:50 Steven Rostedt [this message]
2012-03-22  8:18 ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1332283828.23924.17.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®