From: Eli Zaretskii <eliz@gnu.org>
To: Stan Shebs <stan@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: PATCH: Circular trace buffers
Date: Wed, 17 Mar 2010 07:25:00 -0000 [thread overview]
Message-ID: <E1Nrncg-0006vx-Nk@fencepost.gnu.org> (raw)
In-Reply-To: <4B9FFB2A.4080205@codesourcery.com> (message from Stan Shebs on Tue, 16 Mar 2010 14:42:02 -0700)
> Date: Tue, 16 Mar 2010 14:42:02 -0700
> From: Stan Shebs <stan@codesourcery.com>
>
> This patch adds a flag that requests the target agent to make the trace
> buffer circular, so that instead of filling it up and then stopping, the
> agent discards the oldest trace frames as necessary to accommodate new
> ones. Any hairy memory management code is going to be on the target
> side; GDB just has to transmit the setting (and now always via target
> vector), and report back status, which may now include a total number of
> frames that were created. This also adds complete documentation of the
> qTStatus reply, per request.
Thanks.
> Any comments before I commit?
A few.
> + set circular-trace-buffer
> + show circular-trace-buffer
> + If set to 1, the target is instructed to use a circular trace buffer
> + and discard the oldest trace frames instead of stopping the trace due
> + to a full trace buffer. If set to 0, the trace stops when the buffer
> + fills up.
The caveat about this feature being available only on some targets
should be present here as well, I think.
> + collecting. This is especially useful if your tracepoints are being
> + hit too often and terminating tracing too soon. To ask for a circular
^^^^^^^^^^^
I think using "terminate" here makes the sentence more clear, if not
more grammatically correct.
> + trace buffer, simply set @samp{circular_trace_buffer} to 1. You can
> + set this at any time, including during tracing; if the agent can do
> + it, it will change buffer handling on the fly, otherwise it will not
> + take effect until the next run.
> +
> + @table @code
> + @item set circular-trace-buffer on
> + @itemx set circular-trace-buffer off
You use "on" and "off" here, but the text (and the NEWS entry) say 0
or 1. I think you should use "on" and "off" throughout; the fact that
we also allow 0 and 1 is indeed a feature, but either it should be
explicitly mentioned as an add-on convenience, or not at all.
> ! The reply has the form:
> !
> ! @table @samp
> !
> ! @item T@var{running}@r{[};@var{field}@r{]}@dots{}
> ! @var{running} is a single digit @code{1} if the trace is presently
> ! running, or @code{0} if not. It is followed by optional fields that
> ! an agent may use to report additional status.
Is there indeed only one semi-colon, before the first FIELD? If so,
how are the fields separated from one another?
> ! @item tcreated:@var{n}
> ! The total number of trace frames created during the run. This may
> ! be larger than the trace frame count, if the buffer is circular.
It would be reader-friendly to have an xref here to the description of
the circular buffer facility that you just added above.
> ! @item tsize:@var{n}
> ! The total size of the trace buffer.
In what units? (I'm guessing bytes, but why should I guess?)
Okay with those changes.
next prev parent reply other threads:[~2010-03-17 7:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-16 21:42 Stan Shebs
2010-03-17 7:25 ` Eli Zaretskii [this message]
2010-03-17 16:00 ` Pedro Alves
2010-03-17 16:55 ` Stan Shebs
2010-03-17 17:19 ` Pedro Alves
2010-03-17 18:05 ` Stan Shebs
2010-03-17 18:51 ` Pedro Alves
2010-03-18 22:14 ` Pedro Alves
2010-03-18 23:34 ` Stan Shebs
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=E1Nrncg-0006vx-Nk@fencepost.gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=stan@codesourcery.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