From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8179 invoked by alias); 13 Feb 2003 14:52:58 -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 8171 invoked from network); 13 Feb 2003 14:52:57 -0000 Received: from unknown (HELO mx1.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 13 Feb 2003 14:52:57 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h1DEqvf23202 for ; Thu, 13 Feb 2003 09:52:57 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1DEqva11692 for ; Thu, 13 Feb 2003 09:52:57 -0500 Received: from localhost.redhat.com (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1DEqu919311 for ; Thu, 13 Feb 2003 09:52:56 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id D7D2CFF79; Thu, 13 Feb 2003 09:57:05 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15947.45633.737181.134834@localhost.redhat.com> Date: Thu, 13 Feb 2003 14:52:00 -0000 To: Jason Molenda Cc: gdb-patches@sources.redhat.com Subject: Re: RFC: have maint print statistics print a little more In-Reply-To: <20030212175358.A24355@molenda.com> References: <20030212175358.A24355@molenda.com> X-SW-Source: 2003-02/txt/msg00305.txt.bz2 Jason Molenda writes: > At Apple we're often faced with a mysteriously slow gdb. It would > be very helpful to know if we've just expanded all the psymtabs > into symtabs, or if we have some problem from the compiler that is > causing us to get a vastly larger number of psymtabs for header > files than we would normally have. > > This patch adds a few new entries to the objfile information printed > by maint print statistics: > > Statistics for '/home/jmolenda/sware/gdb/b/gdb/gdb': > Number of "stab" symbols read: 139907 > Number of "minimal" symbols read: 8022 > Number of "partial" symbols read: 24584 > Number of "types" defined: 4794 > * Number of psym tables (not yet expanded): 904 > * Number of symbol tables: 260 > * Number of symbol tables with line tables: 32 > * Number of symbol tables with blockvectors: 33 > Space used by a.out string tables: 1060259 > Total memory used for psymbol obstack: 1190666 > Total memory used for psymbol cache: 513072 > Total memory used for macro cache: 4072 > Total memory used for symbol obstack: 1717613 > Total memory used for type obstack: 550039 > > > I highlighted the new entries with '*'. This would be a very useful > piece of information when presented with a slow gdb here at Apple > - I think other folks may find it useful as well. > > This patch introduces no new testsuite failures. 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. elena > > Comments? > > J > 2003-02-12 Jason Molenda (jmolenda@apple.com) > > * symmis.c (print_objfile_statistics): Include information about > the number of psymtabs and symtabs in each object file. > > 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 13 Feb 2003 01:48:50 -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));