diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2013-03-14 14:20:54 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-07 16:02:04 -0700 |
commit | 4652951d1202cef2798b1a0dfbf4122794594b41 (patch) | |
tree | 0c6dd14b186e021355bbb59166237711b97bf767 /kernel | |
parent | 926685e95e4d6518110794b77676b3bb7f9c4be0 (diff) |
tracing: Keep overwrite in sync between regular and snapshot buffers
commit 80902822658aab18330569587cdb69ac1dfdcea8 upstream.
Changing the overwrite mode for the ring buffer via the trace
option only sets the normal buffer. But the snapshot buffer could
swap with it, and then the snapshot would be in non overwrite mode
and the normal buffer would be in overwrite mode, even though the
option flag states otherwise.
Keep the two buffers overwrite modes in sync.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Rui Xiang <rui.xiang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 022940f097b..a494ec317e0 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2782,8 +2782,12 @@ int set_tracer_flag(unsigned int mask, int enabled) if (mask == TRACE_ITER_RECORD_CMD) trace_event_enable_cmd_record(enabled); - if (mask == TRACE_ITER_OVERWRITE) + if (mask == TRACE_ITER_OVERWRITE) { ring_buffer_change_overwrite(global_trace.buffer, enabled); +#ifdef CONFIG_TRACER_MAX_TRACE + ring_buffer_change_overwrite(max_tr.buffer, enabled); +#endif + } return 0; } |