From: Frederic Weisbecker <fweisbec@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 7/7] ring-buffer: Add lost event count to end of sub buffer
Date: Thu, 1 Apr 2010 08:13:46 +0200 [thread overview]
Message-ID: <20100401061343.GA5207@nowhere> (raw)
In-Reply-To: <20100401031820.590115556@goodmis.org>
On Wed, Mar 31, 2010 at 11:17:42PM -0400, Steven Rostedt wrote:
> From: Steven Rostedt <srostedt@redhat.com>
>
> Currently, binary readers of the ring buffer only know where events were
> lost, but not how many events were lost at that location.
> This information is available, but it would require adding another
> field to the sub buffer header to include it.
>
> But when a event can not fit at the end of a sub buffer, it is written
> to the next sub buffer. This means there is a good chance that the
> buffer may have room to hold this counter. If it does, write
> the counter at the end of the sub buffer and set another flag
> in the data size field that states that this information exists.
Since you can not ensure you have a room for that,
is there no way to delay the update of cpu_buffer->last_overrun
until you find a large enough end of page for that?
I mean, you do this in rb_get_page():
if (overwrite != cpu_buffer->last_overrun) {
cpu_buffer->lost_events = overwrite - cpu_buffer->last_overrun;
cpu_buffer->last_overrun = overwrite;
}
If you don't have enough room to put lost_events in the end of
the buffer, you could keep as is cpu_buffer->last_overrun,
so the next time you swap the reader page, the new delta
will be added to the previous that you couldn't transmit.
That way you ensure the user always know when you lose events.
next prev parent reply other threads:[~2010-04-01 5:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-01 3:17 [PATCH 0/7] [GIT PULL] tracing: updates Steven Rostedt
2010-04-01 3:17 ` [PATCH 1/7] tracing: Convert some signal events to DEFINE_TRACE Steven Rostedt
2010-04-01 3:17 ` [PATCH 2/7] tracing: Update comments Steven Rostedt
2010-04-01 3:17 ` [PATCH 3/7] tracing: Remove side effect from module tracepoints that caused a GPF Steven Rostedt
2010-04-01 3:17 ` [PATCH 4/7] tracing: Fix compile error in module tracepoints when MODULE_UNLOAD not set Steven Rostedt
2010-04-01 3:17 ` [PATCH 5/7] ring-buffer: Add place holder recording of dropped events Steven Rostedt
2010-04-01 3:17 ` [PATCH 6/7] tracing: Show the lost events in the trace_pipe output Steven Rostedt
2010-04-01 3:17 ` [PATCH 7/7] ring-buffer: Add lost event count to end of sub buffer Steven Rostedt
2010-04-01 6:13 ` Frederic Weisbecker [this message]
2010-04-01 12:23 ` Steven Rostedt
2010-04-08 23:42 ` Frederic Weisbecker
2010-04-02 16:39 ` [PATCH 0/7] [GIT PULL] tracing: updates Ingo Molnar
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=20100401061343.GA5207@nowhere \
--to=fweisbec@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
/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;
as well as URLs for NNTP newsgroup(s).