[tip:perf/core] tracing: Fix initial buffer_size_kb state
From: tip-bot for Vaibhav Nagarnaik
Date: Mon May 21 2012 - 05:46:02 EST
Commit-ID: a591c73f127505cdbd0aa399a92112a8ddff8730
Gitweb: http://git.kernel.org/tip/a591c73f127505cdbd0aa399a92112a8ddff8730
Author: Vaibhav Nagarnaik <vnagarnaik@xxxxxxxxxx>
AuthorDate: Thu, 3 May 2012 10:40:34 -0700
Committer: Steven Rostedt <rostedt@xxxxxxxxxxx>
CommitDate: Sat, 19 May 2012 08:28:50 -0400
tracing: Fix initial buffer_size_kb state
Make sure that the state of buffer_size_kb is initialized correctly and
returns actual size of the ring buffer.
Link: http://lkml.kernel.org/r/1336066834-1673-1-git-send-email-vnagarnaik@xxxxxxxxxx
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Laurent Chavey <chavey@xxxxxxxxxx>
Cc: Justin Teravest <teravest@xxxxxxxxxx>
Cc: David Sharp <dhsharp@xxxxxxxxxx>
Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@xxxxxxxxxx>
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
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 08a08ba..a44d4c6 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -5112,7 +5112,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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/