From: Steven Rostedt <rostedt@goodmis.org>
To: "Frank A. Cancio Bello" <frank@generalsoftwareinc.com>
Cc: Joel Fernandes <joel@joelfernandes.org>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org, saiprakash.ranjan@codeaurora.org,
nachukannan@gmail.com
Subject: Re: [PATCH] tracing: Resets the trace buffer after a snapshot
Date: Mon, 6 Jan 2020 12:41:41 -0500 [thread overview]
Message-ID: <20200106124141.1fc400a1@gandalf.local.home> (raw)
In-Reply-To: <20200105103113.flhx26366zoqcgak@frank-laptop>
On Sun, 5 Jan 2020 05:31:13 -0500
"Frank A. Cancio Bello" <frank@generalsoftwareinc.com> wrote:
>
> Thank you both for your answers. I'm wondering what would be the reason
> for not resetting the trace buffer after it gets swapped with the snapshot
> buffer. Given that resetting it's not expensive, I would say that is not
> performance, so I'm intrigued ;)
Is it not expensive? It calls synchronize_rcu()! which is very
expensive.
When I have used the snapshot buffer, It was usually to capture things
that happen at various times, but still look for the next trace. By
alternating, I do get to see where the last snapshot happened. It
basically doubles the size of the buffer.
>
> If it's OK, I will send two patches then, one documenting explicitly
> that the trace buffer it will not be reset after be swapped and the
> implications of this, and the second one changing the documentation of
> the field trace_array->max_buffer that I now realized that say:
>
> "
> /*
> ...
> * The buffers for the max_buffer are set up the same as the trace_buffer
> * When a snapshot is taken, the buffer of the max_buffer is swapped
> * with the buffer of the trace_buffer and the buffers are reset for
> * the trace_buffer so the tracing can continue.
It is reset partially by the latency tracers, and this is where it gets
confusing. Instead of a full reset, as the latency tracer only cares
about a specific start and end, it records where the start and end is,
and only modifies that. Look at the time_start of the trace_buffer.
Hmm, it may be possible to have an option just update that, which
should give the same effect.
-- Steve
prev parent reply other threads:[~2020-01-06 17:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-31 8:58 [PATCH] tracing: Resets the trace buffer after a snapshot Frank A. Cancio Bello
2020-01-03 16:40 ` Steven Rostedt
2020-01-03 22:37 ` Joel Fernandes
2020-01-05 10:31 ` Frank A. Cancio Bello
2020-01-06 17:41 ` Steven Rostedt [this message]
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=20200106124141.1fc400a1@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=frank@generalsoftwareinc.com \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=nachukannan@gmail.com \
--cc=saiprakash.ranjan@codeaurora.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