History

tracing: Keep overwrite in sync between regular and snapshot buffers

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.

Steven Rostedt (Red Hat) committed 13 years ago

Commit 80902821 parent 69d34da1 file · +5 −1Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/trace/trace.c+5−1
@@ -2895,8 +2895,12 @@ static void set_tracer_flags(unsigned int mask, int enabled) · 2894 unmodified lines
28952895 if (mask == TRACE_ITER_RECORD_CMD)
28962896 trace_event_enable_cmd_record(enabled);
28972897
2898− if (mask == TRACE_ITER_OVERWRITE)
2898+ if (mask == TRACE_ITER_OVERWRITE) {
28992899 ring_buffer_change_overwrite(global_trace.buffer, enabled);
2900+#ifdef CONFIG_TRACER_MAX_TRACE
2901+ ring_buffer_change_overwrite(max_tr.buffer, enabled);
2902+#endif
2903+ }
29002904
29012905 if (mask == TRACE_ITER_PRINTK)
29022906 trace_printk_start_stop_comm(enabled);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t