This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [doc RFA] New commands: mt set per-command on|off


> Date: Fri, 15 Mar 2013 15:29:09 -0700
> From: Doug Evans <dje@google.com>
> 
> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]