This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Re: Regression for GDB global --statistics
- From: Doug Evans <dje at google dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Eli Zaretskii <eliz at gnu dot org>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Fri, 11 Jul 2014 14:33:43 -0700
- Subject: Re: [PATCH] Re: Regression for GDB global --statistics
- Authentication-results: sourceware.org; auth=none
- References: <yjt2ip4s5mbu dot fsf at ruffy2 dot mtv dot corp dot google dot com> <20140630171333 dot GA2225 at host2 dot jankratochvil dot net> <21437 dot 45024 dot 997531 dot 453750 at ruffy dot mtv dot corp dot google dot com> <20140711212537 dot GA19551 at host2 dot jankratochvil dot net>
On Fri, Jul 11, 2014 at 2:25 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Wed, 09 Jul 2014 23:10:56 +0200, Doug Evans wrote:
>> --- a/gdb/testsuite/gdb.base/maint.exp
>> +++ b/gdb/testsuite/gdb.base/maint.exp
>> @@ -130,10 +130,11 @@ gdb_expect {
>> # tests here!!
>> gdb_test_no_output "maint check-symtabs"
>>
>> +# Test per-command stats.
>> gdb_test_no_output "maint set per-command on"
>> -
>> -gdb_test "maint set per-command off" \
>> +gdb_test "pwd" \
>> "Command execution time: \[0-9.\]+ \\(cpu\\), \[0-9.\]+ \\(wall\\)\[\r\n\]+Space used: $decimal \\(\\+$decimal for this command\\)\[\r\n\]+#symtabs: $decimal \\(\\+$decimal\\), #primary symtabs: $decimal \\(\\+$decimal\\), #blocks: $decimal \\(\\+$decimal\\)"
>> +gdb_test_no_output "maint set per-command off"
>
> Is it needed to change this behavior? It may break some user scripts working
> fine with previous GDB stable releases.
Change in behaviour of something related to a maintenance command?
Or were you referring to something else?
One problem I wish to avoid is not doing anything expensive unnecessarily.
And here that translates to not computing the values of statistics
from before a command executes (so that one can then print the delta
after it completes) if said statistics will not be printed. That then
translates to any turning on of a statistics-reporting command (mt set
per-command foo) will not take effect until the next command. How
will that be a problem?
> Besides that the startup statistics regression is not tested here but I can
> post then a testcase for it.
As you wish. Thanks.