From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2763 invoked by alias); 24 Jun 2015 07:05:28 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 2738 invoked by uid 89); 24 Jun 2015 07:05:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mga14.intel.com Received: from mga14.intel.com (HELO mga14.intel.com) (192.55.52.115) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 24 Jun 2015 07:05:23 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 24 Jun 2015 00:05:21 -0700 X-ExtLoop1: 1 Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by orsmga001.jf.intel.com with ESMTP; 24 Jun 2015 00:05:20 -0700 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.171]) by IRSMSX154.ger.corp.intel.com ([169.254.12.91]) with mapi id 14.03.0224.002; Wed, 24 Jun 2015 08:05:19 +0100 From: "Metzger, Markus T" To: Eli Zaretskii CC: "palves@redhat.com" , "gdb-patches@sourceware.org" Subject: RE: [PATCH 5/5] btrace: maintenance commands Date: Wed, 24 Jun 2015 07:05:00 -0000 Message-ID: References: <1435047418-21611-1-git-send-email-markus.t.metzger@intel.com> <1435047418-21611-6-git-send-email-markus.t.metzger@intel.com> <837fquh2bd.fsf@gnu.org> In-Reply-To: <837fquh2bd.fsf@gnu.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00511.txt.bz2 > -----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_histor= y_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 trai= ling '\' 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}. =20 +@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