From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19814 invoked by alias); 14 Feb 2003 01:15:41 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 19807 invoked from network); 14 Feb 2003 01:15:39 -0000 Received: from unknown (HELO molenda.com) (192.220.74.81) by 172.16.49.205 with SMTP; 14 Feb 2003 01:15:39 -0000 Received: (qmail 78559 invoked by uid 19025); 14 Feb 2003 01:15:39 -0000 Date: Fri, 14 Feb 2003 01:15:00 -0000 From: Jason Molenda To: Elena Zannoni Cc: gdb-patches@sources.redhat.com Subject: Re: RFC: have maint print statistics print a little more Message-ID: <20030213171539.A78213@molenda.com> References: <20030212175358.A24355@molenda.com> <15947.45633.737181.134834@localhost.redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="45Z9DzgjV8m4Oswq" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <15947.45633.737181.134834@localhost.redhat.com>; from ezannoni@redhat.com on Thu, Feb 13, 2003 at 09:57:05AM -0500 X-SW-Source: 2003-02/txt/msg00326.txt.bz2 --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 954 On Thu, Feb 13, 2003 at 09:57:05AM -0500, Elena Zannoni wrote: > Yes, but the new output needs to be tested. It is just because the .* > patterns in the maint.exp file. Could you add the new output to the > test file? > > Otherwise, looks good. Thanks, I assume this was permission to commit? I probably should have asked that fifteen seconds ago. :-) Eli reminded me to update any relevant documentation - maint print statistics isn't documented. That itself could be considered a bug, of course. I committed the patch below. I can back it out if I misread the above. [ChangeLog] 2003-02-12 Jason Molenda (jmolenda@apple.com) * symmisc.c (print_objfile_statistics): Include information about the number of psymtabs and symtabs in each object file. [testsuite/ChangeLog] 2003-02-13 Jason Molenda (jmolenda@apple.com) * gdb.base/maint.exp: Update maint print statistics regexp to include new entries. J --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pa.txt" Content-length: 3311 [ChangeLog] 2003-02-12 Jason Molenda (jmolenda@apple.com) * symmisc.c (print_objfile_statistics): Include information about the number of psymtabs and symtabs in each object file. [testsuite/ChangeLog] 2003-02-13 Jason Molenda (jmolenda@apple.com) * gdb.base/maint.exp: Update maint print statistics regexp to include new entries. Index: symmisc.c =================================================================== RCS file: /cvs/src/src/gdb/symmisc.c,v retrieving revision 1.14 diff -u -p -r1.14 symmisc.c --- symmisc.c 18 Jan 2003 15:55:53 -0000 1.14 +++ symmisc.c 14 Feb 2003 01:12:07 -0000 @@ -179,6 +179,9 @@ void print_objfile_statistics (void) { struct objfile *objfile; + struct symtab *s; + struct partial_symtab *ps; + int i, linetables, blockvectors; immediate_quit++; ALL_OBJFILES (objfile) @@ -199,6 +202,28 @@ print_objfile_statistics (void) if (OBJSTAT (objfile, n_types) > 0) printf_filtered (" Number of \"types\" defined: %d\n", OBJSTAT (objfile, n_types)); + i = 0; + ALL_OBJFILE_PSYMTABS (objfile, ps) + { + if (ps->readin == 0) + i++; + } + printf_filtered (" Number of psym tables (not yet expanded): %d\n", i); + i = linetables = blockvectors = 0; + ALL_OBJFILE_SYMTABS (objfile, s) + { + i++; + if (s->linetable != NULL) + linetables++; + if (s->primary == 1) + blockvectors++; + } + printf_filtered (" Number of symbol tables: %d\n", i); + printf_filtered (" Number of symbol tables with line tables: %d\n", + linetables); + printf_filtered (" Number of symbol tables with blockvectors: %d\n", + blockvectors); + if (OBJSTAT (objfile, sz_strtab) > 0) printf_filtered (" Space used by a.out string tables: %d\n", OBJSTAT (objfile, sz_strtab)); Index: testsuite/gdb.base/maint.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/maint.exp,v retrieving revision 1.17 diff -u -p -r1.17 maint.exp --- testsuite/gdb.base/maint.exp 24 Dec 2002 04:03:46 -0000 1.17 +++ testsuite/gdb.base/maint.exp 14 Feb 2003 01:12:09 -0000 @@ -180,7 +180,7 @@ gdb_expect { send_gdb "maint print statistics\n" gdb_expect { - -re "Statistics for.*break.*Number of \"minimal\" symbols read.*Number of \"partial\" symbols read.*Number of \"types\" defined.*Total memory used for psymbol obstack.*Total memory used for psymbol cache.*Total memory used for symbol obstack.*Total memory used for type obstack.*$gdb_prompt $"\ + -re "Statistics for.*break.*Number of \"minimal\" symbols read.*Number of \"partial\" symbols read.*Number of \"types\" defined.*Number of psym tables \\(not yet expanded\\).*Number of symbol tables.*Number of symbol tables with line tables.*Number of symbol tables with blockvectors.*Total memory used for psymbol obstack.*Total memory used for psymbol cache.*Total memory used for symbol obstack.*Total memory used for type obstack.*$gdb_prompt $"\ { pass "maint print statistics" } -re ".*$gdb_prompt $" { fail "maint print statistics" } timeout { fail "(timeout) maint print statistics" } --45Z9DzgjV8m4Oswq--