mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][GIT PULL] ring-buffer: Wrap open-coded WARN_ONCE
@ 2010-05-04 17:32 Steven Rostedt
  2010-05-04 17:58 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2010-05-04 17:32 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Frederic Weisbecker, Borislav Petkov


Ingo,

Oops, I forgot to add this one too. I just pushed it after you did your
last pull.

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

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


Borislav Petkov (1):
      ring-buffer: Wrap open-coded WARN_ONCE

----
 kernel/trace/ring_buffer.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)
---------------------------
commit 956097912c40a03bf22603a3be73503fd9ea9e44
Author: Borislav Petkov <bp@alien8.de>
Date:   Sun May 2 08:03:54 2010 +0200

    ring-buffer: Wrap open-coded WARN_ONCE
    
    Wrap open-coded WARN_ONCE functionality into the equivalent macro.
    
    Signed-off-by: Borislav Petkov <bp@alien8.de>
    LKML-Reference: <20100502060354.GA5281@liondog.tnic>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 2a09044..7f6059c 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -2000,17 +2000,13 @@ rb_add_time_stamp(struct ring_buffer_per_cpu *cpu_buffer,
 		  u64 *ts, u64 *delta)
 {
 	struct ring_buffer_event *event;
-	static int once;
 	int ret;
 
-	if (unlikely(*delta > (1ULL << 59) && !once++)) {
-		printk(KERN_WARNING "Delta way too big! %llu"
-		       " ts=%llu write stamp = %llu\n",
-		       (unsigned long long)*delta,
-		       (unsigned long long)*ts,
-		       (unsigned long long)cpu_buffer->write_stamp);
-		WARN_ON(1);
-	}
+	WARN_ONCE(*delta > (1ULL << 59),
+		  KERN_WARNING "Delta way too big! %llu ts=%llu write stamp = %llu\n",
+		  (unsigned long long)*delta,
+		  (unsigned long long)*ts,
+		  (unsigned long long)cpu_buffer->write_stamp);
 
 	/*
 	 * The delta is too big, we to add a



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][GIT PULL] ring-buffer: Wrap open-coded WARN_ONCE
  2010-05-04 17:32 [PATCH][GIT PULL] ring-buffer: Wrap open-coded WARN_ONCE Steven Rostedt
@ 2010-05-04 17:58 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2010-05-04 17:58 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, Frederic Weisbecker, Borislav Petkov


* Steven Rostedt <rostedt@goodmis.org> wrote:

> 
> Ingo,
> 
> Oops, I forgot to add this one too. I just pushed it after you did your
> last pull.
> 
> Please pull the latest tip/tracing/core tree, which can be found at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> tip/tracing/core
> 
> 
> Borislav Petkov (1):
>       ring-buffer: Wrap open-coded WARN_ONCE
> 
> ----
>  kernel/trace/ring_buffer.c |   14 +++++---------
>  1 files changed, 5 insertions(+), 9 deletions(-)

Pulled, thanks Steve!

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-04 17:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-04 17:32 [PATCH][GIT PULL] ring-buffer: Wrap open-coded WARN_ONCE Steven Rostedt
2010-05-04 17:58 ` Ingo Molnar

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®