Skip to contentSkip to conversation

tracing: Fix initial buffer_size_kb state

PATCH In review Vaibhav Nagarnaik 1 participant 2 messages May 3, 2012 – May 21, 2012 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 kernel/trace/trace.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
kernel/trace/trace.c +2 -1
index 6d4c2dd..a90386c 100644
@@ -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
Signature · 1 line
1.7.7.3
#1 lore raw
Commit-ID:  a591c73f127505cdbd0aa399a92112a8ddff8730
Gitweb:     http://git.kernel.org/tip/a591c73f127505cdbd0aa399a92112a8ddff8730
Author:     Vaibhav Nagarnaik <[email protected]>
AuthorDate: Thu, 3 May 2012 10:40:34 -0700
Committer:  Steven Rostedt <[email protected]>
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.

Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Laurent Chavey <[email protected]>
Cc Justin Teravest <[email protected]>
Cc David Sharp <[email protected]>
---
 kernel/trace/trace.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
kernel/trace/trace.c +2 -1
index 08a08ba..a44d4c6 100644
@@ -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