]> git.baikalelectronics.ru Git - kernel.git/commit
ring-buffer: Have ring_buffer_empty() not depend on tracing stopped
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 17 Mar 2020 21:32:24 +0000 (17:32 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 19 Mar 2020 23:11:19 +0000 (19:11 -0400)
commita917b74f3aa44fe6509a85eefdcd99045a44bb73
tree88f04516691e53f3285d0ea7c76149c82b1ec9e2
parent7c2a3035d9a2eda27542435940c950f049a234ba
ring-buffer: Have ring_buffer_empty() not depend on tracing stopped

It was complained about that when the trace file is read, that the tracing
is disabled, as the iterator expects writing to the buffer it reads is not
updated. Several steps are needed to make the iterator handle a writer,
by testing if things have changed as it reads.

This step is to make ring_buffer_empty() expect the buffer to be changing.
Note if the current location of the iterator is overwritten, then it will
return false as new data is being added. Note, that this means that data
will be skipped.

Link: http://lkml.kernel.org/r/20200317213415.870741809@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/ring_buffer.c