From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30477 invoked by alias); 16 Mar 2013 07:35:24 -0000 Received: (qmail 30387 invoked by uid 22791); 16 Mar 2013 07:35:23 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 16 Mar 2013 07:35:15 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MJQ00L00SXTAN00@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Sat, 16 Mar 2013 09:34:57 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MJQ00KV1T29RKE0@a-mtaout20.012.net.il>; Sat, 16 Mar 2013 09:34:57 +0200 (IST) Date: Sun, 17 Mar 2013 19:04:00 -0000 From: Eli Zaretskii Subject: Re: [doc RFA] New commands: mt set per-command on|off In-reply-to: To: Doug Evans Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83zjy33ihp.fsf@gnu.org> References: X-IsSubscribed: yes 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 X-SW-Source: 2013-03/txt/msg00701.txt.bz2 > Date: Fri, 15 Mar 2013 15:29:09 -0700 > From: Doug Evans > > This patch adds a new option to display some simple symtab stats > akin to how "mt time|space 1" work. For consistency with the > rest of gdb I named it: > > maint set per-command symtab on|off > maint show per-command symtab > > and then added new commands: > > maint set per-command space|time on|off > maint show per-command space|time Thanks. > --- NEWS 14 Mar 2013 09:02:27 -0000 1.575 > +++ NEWS 15 Mar 2013 22:03:31 -0000 > @@ -3,6 +3,12 @@ > > *** Changes since GDB 7.6 > > +* New commands: > +maint set|show per-command > +maint set|show per-command space > +maint set|show per-command time > +maint set|show per-command symtab Perhaps consider adding a sentence or two about what these do. > + add_setshow_boolean_cmd ("symtab", class_maintenance, > + &per_command_symtab, _("\ > +Set whether to display per-command symtab stats."), _("\ > +Show whether to display per-command symtab stats."), > + _("\ > +If enabled, the basic symtab stats for each command will be\n\ > +displayed following the command's output."), Suggest to use "statistics" instead of "stats" here. > +@kindex maint set per-command > +@kindex maint show per-command > +@item maint set per-command > +@itemx maint show per-command > +@cindex resources used by commands > > -@kindex maint time > -@cindex time of command execution > -@item maint time > -Control whether to display the execution time of @value{GDBN} for each command. > -If set to a nonzero value, @value{GDBN} will display how much time it > +@value{GDBN} can display the resources used by each command. > +This is useful in debugging performance problems. > + > +@table @code > +@kindex maint set per-command space There's no need for this (and other similar) @kindex entry because you already have "@kindex maint set/show per-command" above. Such indices tend to clutter and bloat the index node without adding useful information, because they all point to approximately the same place, even in the printed manual. > +Enable or disable the printing of the memory usage for each command. > +If enabled, @value{GDBN} will display how much memory each command > +took, following the command's own output. This should make it more explicit that the memory printed is the one used by GDB, not by the inferior. > +Enable or disable the printing of basic symbol table statistics > +for each command. > +If enabled, @value{GDBN} will display the following information: > + > +@table @bullet > +@item number of symbol tables > +@item number of primary symbol tables > +@item number of blocks in the blockvector > +@end table Is this really the statistics _for_ the last command, or is this the statistics _after_ the last command? IOW, is this the delta due to the last command or just the current snapshot of the symtab usage statistics? If the latter, then saying "for the last command" above is misleading.