RE: [PATCH 00/12 v2] ring-buffer/tracing: Remove disabling of ring buffer while reading trace file
From: David Laight
Date: Fri Mar 27 2020 - 06:07:06 EST
From: Steven Rostedt
> Sent: 27 March 2020 01:46
> On Sat, 21 Mar 2020 19:13:51 +0000
> David Laight <David.Laight@xxxxxxxxxx> wrote:
>
> > From: Steven Rostedt
> > > Sent: 19 March 2020 23:22
> > ...
> > >
> > > This patch series attempts to satisfy that request, by creating a
> > > temporary buffer in each of the per cpu iterators to place the
> > > read event into, such that it can be passed to users without worrying
> > > about a writer to corrupt the event while it was being written out.
> > > It also uses the fact that the ring buffer is broken up into pages,
> > > where each page has its own timestamp that gets updated when a
> > > writer crosses over to it. By copying it to the temp buffer, and
> > > doing a "before and after" test of the time stamp with memory barriers,
> > > can allow the events to be saved.
> >
> > Does this mean the you will no longer be able to look at a snapshot
> > of the trace by running 'less trace' (and typically going to the end
> > to get info for all cpus).
>
> I changed patch 9 to be this:
>
> It adds an option "pause-on-trace" that when set, will bring back the
> old behavior of pausing recording to the ring buffer when the trace
> file is open.
>
> If needed, I can add a kernel command line option and a Kconfig that
> makes this set to true by default.
Maybe a different file 'trace_no_pause' ?
Along with the one that lets you read the raw trace and get EOF.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)