]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
tracing: keep ring buffer to minimum size till used
authorSteven Rostedt <srostedt@redhat.com>
Wed, 11 Mar 2009 17:42:01 +0000 (13:42 -0400)
committerSteven Rostedt <srostedt@redhat.com>
Thu, 12 Mar 2009 02:15:22 +0000 (22:15 -0400)
commit73c5162aa362a543793f4a957c6c536dcbaa89ce
treeca318ef3da72aac3f809583967185c0b34998c94
parent80370cb758e7ca2692cd9fb5e413d970b1f4b2b2
tracing: keep ring buffer to minimum size till used

Impact: less memory impact on systems not using tracer

When the kernel boots up that has tracing configured, it allocates
the default size of the ring buffer. This currently happens to be
1.4Megs per possible CPU. This is quite a bit of wasted memory if
the system is never using the tracer.

The current solution is to keep the ring buffers to a minimum size
until the user uses them. Once a tracer is piped into the current_tracer
the ring buffer will be expanded to the default size. If the user
changes the size of the ring buffer, it will take the size given
by the user immediately.

If the user adds a "ftrace=" to the kernel command line, then the ring
buffers will be set to the default size on initialization.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
kernel/trace/trace.c