diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-03-11 14:33:00 -0400 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2009-03-11 22:15:24 -0400 |
commit | 1852fcce181faa237c010a3dbedb473cf9d4555f (patch) | |
tree | 863cd12b573fd36436e7fb042f9bd96a73a9f725 /kernel/trace/trace_events.c | |
parent | 73c5162aa362a543793f4a957c6c536dcbaa89ce (diff) | |
download | lwn-1852fcce181faa237c010a3dbedb473cf9d4555f.tar.gz lwn-1852fcce181faa237c010a3dbedb473cf9d4555f.zip |
tracing: expand the ring buffers when an event is activated
To save memory, the tracer ring buffers are set to a minimum.
The activating of a trace expands the ring buffer size. This patch
adds this expanding, when an event is activated.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r-- | kernel/trace/trace_events.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 769dfd00fc85..ca624df73591 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -141,6 +141,10 @@ ftrace_event_write(struct file *file, const char __user *ubuf, if (!cnt || cnt < 0) return 0; + ret = tracing_update_buffers(); + if (ret < 0) + return ret; + ret = get_user(ch, ubuf++); if (ret) return ret; @@ -331,6 +335,10 @@ event_enable_write(struct file *filp, const char __user *ubuf, size_t cnt, if (ret < 0) return ret; + ret = tracing_update_buffers(); + if (ret < 0) + return ret; + switch (val) { case 0: case 1: |