ftrace: trace_entries to dynamically change trace buffer size
commita98a3c3fde3ae7614f19758a043691b6f59dac53
authorSteven Rostedt <rostedt@goodmis.org>
Mon, 12 May 2008 19:20:59 +0000 (12 21:20 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 23 May 2008 19:49:54 +0000 (23 21:49 +0200)
tree7a04e3e7c1748ee5b258e5176e10e1fe13468001
parent05bd68c514579e007b46e4fa0461b78416a3f4c2
ftrace: trace_entries to dynamically change trace buffer size

This patch adds /debug/tracing/trace_entries that allows users to
see as well as modify the number of trace entries the buffers hold.

The number of entries only increments in ENTRIES_PER_PAGE which is
calculated by the size of an entry with the number of entries that
can fit in a page. The user does not need to use an exact size, but
the entries will be rounded to one of the increments.

Trying to set the entries to 0 will return with -EINVAL.

To avoid race conditions, the modification of the buffer size can only
be done when tracing is completely disabled (current_tracer == none).
A info message will be printed if a user tries to modify the buffer size
when not set to none.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/trace/trace.c