diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2013-03-14 14:20:54 -0400 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-03-27 02:41:14 +0000 |
commit | ae02f16fd87c84716699065ba9b0e1cafcb17f6e (patch) | |
tree | 62062039e9d70ea1efd7b8295ca8a1512d57dc67 | |
parent | 06eec6023ca72dbb5c5e3732feb2947ef699d1f5 (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>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-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 6751c1158b6..0c6ce4438d3 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2650,8 +2650,12 @@ static void set_tracer_flags(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 + } } static ssize_t |