mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: David Sharp <dhsharp@google.com>
Cc: linux-kernel@vger.kernel.org, Michael Rubin <mrubin@google.com>
Subject: Re: ftrace: trace_pipe_raw interface broken
Date: Thu, 23 Dec 2010 23:35:26 -0500	[thread overview]
Message-ID: <1293165326.22802.411.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <AANLkTi=_VJcDmpdfy=nfo_771iHjdVHTHnciUe8DrZme@mail.gmail.com>

On Thu, 2010-12-23 at 15:06 -0800, David Sharp wrote:
> On Thu, Dec 23, 2010 at 7:57 AM, Steven Rostedt <rostedt@goodmis.org> wrote:

> > Not quite intended, but not something to worry about either. We mask off
> > the 30 bits to determine the size.
> 
> in trace-cmd you mean?

Yeah, but if you find that strange, I guess we could mask it off too.

> 
> >> By my count that leaves only one mystery: why are we seeing this extra
> >> page at the beginning with pre-overflow data?
> >
> > If you did not reset the buffer, there's a chance that the writer is on
> > the reader page. The reader page is always outside the ring buffer, but
> > it points into the ring buffer. If this occurs, then you will get the
> > reader page data, plus the rest of the ring buffer (which is the full
> > size you asked for).
> 
> Okay, that's a surprising behavior to me, but resetting the buffer
> seems like a fine workaround.

Getting a little more trace than you asked for seems like a good thing
to me ;-)

> 
> btw, corroborating this is that reading the formatted output of
> "trace" also shows the page of pre-overflow data.

Yep, that's already known.

-- Steve



  reply	other threads:[~2010-12-24  4:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-21  2:43 David Sharp
2010-12-21  3:52 ` Steven Rostedt
2010-12-21  5:59   ` David Sharp
2010-12-22 23:23     ` David Sharp
2010-12-22 23:47       ` David Sharp
2010-12-23  0:37         ` David Sharp
2010-12-23 15:57           ` Steven Rostedt
2010-12-23 23:06             ` David Sharp
2010-12-24  4:35               ` Steven Rostedt [this message]
2010-12-22 23:45     ` [PATCH] ring_buffer: off-by-one and duplicate events in ring_buffer_read_page David Sharp
2010-12-23  0:38     ` David Sharp
2010-12-25  8:59     ` [tip:perf/urgent] ring_buffer: Off-by-one " tip-bot for David Sharp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1293165326.22802.411.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=dhsharp@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrubin@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®