lkml.org 
[lkml]   [2009]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 05/16] tracing: show that buffer size is not expanded
Date
> From: Steven Rostedt <srostedt@redhat.com>
>
> Impact: do not confuse user on small trace buffer sizes
>
> When the system boots up, the trace buffer is small to conserve memory.
> It is only two pages per online CPU. When the tracer is used, it expands
> to the default value.
>
> This can confuse the user if they look at the buffer size and see only
> 7, but then later they see 1408.
>
> # cat /debug/tracing/buffer_size_kb
> 7
>
> # echo sched_switch > /debug/tracing/current_tracer
>
> # cat /debug/tracing/buffer_size_kb
> 1408
>
> This patch tries to help remove this confustion by showing that the
> buffer has not been expanded.
>
> # cat /debug/tracing/buffer_size_kb
> 7 (expanded: 1408)

Hi,

I have one question.
Why souldn't use following output?

sprintf(buf, "%lu\n", trace_buf_size >> 10);


My point is:
- pure number output can hadle easily.
- nobody need to know internal memory saving logic.





\
 
 \ /
  Last update: 2009-03-13 04:09    [W:1.456 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site