mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vaibhav Nagarnaik <vnagarnaik@google.com>
To: Steven Rostedt <rostedt@goodmis.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@redhat.com>
Cc: Laurent Chavey <chavey@google.com>,
	Justin Teravest <teravest@google.com>,
	David Sharp <dhsharp@google.com>,
	linux-kernel@vger.kernel.org,
	Vaibhav Nagarnaik <vnagarnaik@google.com>
Subject: [PATCH] tracing: Fix initial buffer_size_kb state
Date: Thu,  3 May 2012 10:40:34 -0700	[thread overview]
Message-ID: <1336066834-1673-1-git-send-email-vnagarnaik@google.com> (raw)

Make sure that the state of buffer_size_kb is initialized correctly and
returns actual size of the ring buffer.

Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
---
 kernel/trace/trace.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 6d4c2dd..a90386c 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -5087,7 +5087,8 @@ __init static int tracer_alloc_buffers(void)
 		max_tr.data[i] = &per_cpu(max_tr_data, i);
 	}
 
-	set_buffer_entries(&global_trace, ring_buf_size);
+	set_buffer_entries(&global_trace,
+			   ring_buffer_size(global_trace.buffer, 0));
 #ifdef CONFIG_TRACER_MAX_TRACE
 	set_buffer_entries(&max_tr, 1);
 #endif
-- 
1.7.7.3


             reply	other threads:[~2012-05-03 17:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-03 17:40 Vaibhav Nagarnaik [this message]
2012-05-21  9:45 ` [tip:perf/core] " tip-bot for Vaibhav Nagarnaik

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=1336066834-1673-1-git-send-email-vnagarnaik@google.com \
    --to=vnagarnaik@google.com \
    --cc=chavey@google.com \
    --cc=dhsharp@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=teravest@google.com \
    /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®