Re: [PATCH 3/7] trace-cmd: Fixed logic in tracecmd_read_page_record()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 21, 2019 at 11:09 AM Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> On Wed, 16 Jan 2019 21:18:34 +0200
> Tzvetomir Stoyanov <tstoyanov@xxxxxxxxxx> wrote:
>
> > Fixed the logic in tracecmd_read_page_record() when
> > searching for the next event in the event from the
> > ring buffer.
>
> Please explain what you are fixing. In other words, what was wrong with
> the current logic?

In the current logic, in the case when last_record is not NULL (we are
searching for the second one)
the check "if (ptr != last_record->data)" always fails. As I can
understand, kbuffer_next_event() reads the event
after the one pointed by last_record. In my use case I search for a
series of few events,
tracecmd_read_page_record() returns the first one (when I pass
last_record=NULL), and always fails on
the second one with the error "tracecmd_read_page_record: could not
find last_record". I use a gdb to figure out
what happens there.

>
> -- Steve
>
> >
> > Signed-off-by: Tzvetomir Stoyanov <tstoyanov@xxxxxxxxxx>
> > ---



-- 

Tzvetomir (Ceco) Stoyanov
VMware Open Source Technology Center




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux