public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Metzger, Markus T" <markus.t.metzger@intel.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "palves@redhat.com" <palves@redhat.com>,
	"gdb-patches@sourceware.org"	<gdb-patches@sourceware.org>
Subject: RE: [PATCH 5/5] btrace: maintenance commands
Date: Wed, 24 Jun 2015 07:05:00 -0000	[thread overview]
Message-ID: <A78C989F6D9628469189715575E55B2333166119@IRSMSX104.ger.corp.intel.com> (raw)
In-Reply-To: <837fquh2bd.fsf@gnu.org>

> -----Original Message-----
> From: Eli Zaretskii [mailto:eliz@gnu.org]
> Sent: Tuesday, June 23, 2015 5:28 PM
> To: Metzger, Markus T
> Cc: palves@redhat.com; gdb-patches@sourceware.org
> Subject: Re: [PATCH 5/5] btrace: maintenance commands

Thanks for your quick review.  Here are the parts I changed:

diff --git a/gdb/btrace.c b/gdb/btrace.c
index 561ccd6..e0e5267 100644
--- a/gdb/btrace.c
+++ b/gdb/btrace.c
[...]
+  add_setshow_boolean_cmd ("skip-pad", class_maintenance,
+			   &maint_btrace_pt_skip_pad, _("\
+Set whether PAD packets should be skipped in the btrace packet history."), _("\
+Show whether PAD packets should be skipped in the btrace packet history."),_("\
+When enabled, PAD packets are ignored in the btrace packet history."),
+			   NULL, NULL, &maint_btrace_pt_set_cmdlist,
+			   &maint_btrace_pt_show_cmdlist);
+
+  add_cmd ("packet-history", class_maintenance, maint_btrace_packet_history_cmd,
+	   _("Print the raw branch tracing data.\n\
+With no argument, print ten more packets after the previous ten-line print.\n\
+With '-' as argument print ten packets before a previous ten-line print.\n\
+One argument specifies the starting packet of a ten-line print.\n\
+Two arguments with comma between specify starting and ending packets to \
+print.\n\
+Preceded with '+'/'-' the second argument specifies the distance from the \
+first.\n"),
+	   &maint_btrace_cmdlist);

For the above, strings are less than 80 characters per line.  Just the trailing '\'
or '");' doesn't fit so I have to break the string earlier.

[...]
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 58a9bc7..f4c95ae 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -33965,6 +33965,66 @@ Shared library events.
 This prints information about each @code{bfd} object that is known to
 @value{GDBN}.  @xref{Top, , BFD, bfd, The Binary File Descriptor Library}.
 
+@kindex maint info btrace
+@item maint info btrace
+Pint information about raw branch tracing data.
+
+@kindex maint btrace packet-history
+@item maint btrace packet-history
+Print the raw branch trace packets that are used to compute the
+execution history for the @samp{record btrace} command.  Both the
+information and the format in which it is printed depend on the btrace
+recording format.
+
+@table @code
+@item bts
+For the BTS recording format, print a list of blocks of sequential
+code.  For each block, the following information is printed:
+
+@table @asis
+@item Block number
+Newer blocks have higher numbers.  The oldest block has number zero.
+@item Lowest @samp{PC}
+@item Highest @samp{PC}
+@end table
+
+@item pt
+For the Intel(R) Processor Trace recording format, print a list of
+Intel(R) Processor Trace packets.  For each packet, the following
+information is printed:
+
+@table @asis
+@item Packet number
+Newer packets have higher numbers.  The oldest packet has number zero.
+@item Trace offset
+The packet's offset in the trace stream.
+@item Packet opcode and payload
+@end table
+@end table
+
+@kindex maint btrace clear-packet-history
+@item maint btrace clear-packet-history
+Discards the cached packet history printed by the @samp{maint btrace
+packet-history} command.  The history will be computed again when
+needed.
+
+@kindex maint btrace clear
+@item maint btrace clear
+Discard the branch trace data.  The data will be fetched anew and the
+branch trace will be recomputed when needed.
+
+This implicitly truncates the branch trace to a single branch trace
+buffer.  When updating branch trace incrementally, the branch trace
+available to @value{GDBN} may be bigger than a single branch trace
+buffer.
+
+@kindex maint set btrace pt skip-pad
+@item maint set btrace pt skip-pad
+@kindex maint show btrace pt skip-pad
+@item maint show btrace pt skip-pad
+Control whether @value{GDBN} will skip PAD packets when computing the
+packet history.
+
 @kindex set displaced-stepping
 @kindex show displaced-stepping
 @cindex displaced stepping support

Thanks,
Markus.
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052

  reply	other threads:[~2015-06-24  7:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23  8:22 [PATCH 0/5] Support Intel(R) Processor Trace Markus Metzger
2015-06-23  8:22 ` [PATCH 3/5] btrace, linux: use data_size and data_offset Markus Metzger
2015-06-30 12:56   ` Pedro Alves
2015-06-23  8:22 ` [PATCH 4/5] btrace: store raw btrace data Markus Metzger
2015-06-30 12:56   ` Pedro Alves
2015-06-23  8:22 ` [PATCH 5/5] btrace: maintenance commands Markus Metzger
2015-06-23 15:28   ` Eli Zaretskii
2015-06-24  7:05     ` Metzger, Markus T [this message]
2015-06-24 14:38       ` Eli Zaretskii
2015-06-30 12:57   ` Pedro Alves
2015-06-23  8:22 ` [PATCH 1/5] configure: check for libipt Markus Metzger
2015-06-30 12:56   ` Pedro Alves
2015-06-30 14:54     ` Metzger, Markus T
2015-06-30 15:01       ` Pedro Alves
2015-06-23  8:23 ` [PATCH 2/5] btrace: support Intel(R) Processor Trace Markus Metzger
2015-06-23 15:32   ` Eli Zaretskii
2015-06-30 12:56   ` Pedro Alves
2015-06-30 14:54     ` Metzger, Markus T
2015-06-30 15:08       ` Pedro Alves
2015-07-01  8:39         ` Metzger, Markus T

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=A78C989F6D9628469189715575E55B2333166119@IRSMSX104.ger.corp.intel.com \
    --to=markus.t.metzger@intel.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).