diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2020-03-18 00:32:23 +0300 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2020-03-20 00:48:36 +0300 |
commit | ff895103a84abc85a5f43ecabc7f67cf36e1348f (patch) | |
tree | c486cf29f043122a633a22c5a77fa8660c872f6b /include/linux/trace_events.h | |
parent | 8c77f0ba41566b5a54a49c53107cc855d89ff4c1 (diff) | |
download | linux-ff895103a84abc85a5f43ecabc7f67cf36e1348f.tar.xz |
tracing: Save off entry when peeking at next entry
In order to have the iterator read the buffer even when it's still updating,
it requires that the ring buffer iterator saves each event in a separate
location outside the ring buffer such that its use is immutable.
There's one use case that saves off the event returned from the ring buffer
interator and calls it again to look at the next event, before going back to
use the first event. As the ring buffer iterator will only have a single
copy, this use case will no longer be supported.
Instead, have the one use case create its own buffer to store the first
event when looking at the next event. This way, when looking at the first
event again, it wont be corrupted by the second read.
Link: http://lkml.kernel.org/r/20200317213415.722539921@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/trace_events.h')
-rw-r--r-- | include/linux/trace_events.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index 6c7a10a6d71e..5c6943354049 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -85,6 +85,8 @@ struct trace_iterator { struct mutex mutex; struct ring_buffer_iter **buffer_iter; unsigned long iter_flags; + void *temp; /* temp holder */ + unsigned int temp_size; /* trace_seq for __print_flags() and __print_symbolic() etc. */ struct trace_seq tmp_seq; |