[PATCH] tracing: Fix initial buffer_size_kb state
From: Vaibhav Nagarnaik
Date: Thu May 03 2012 - 13:46:45 EST
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@xxxxxxxxxx>
---
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
--
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/