From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23396 invoked by alias); 20 Feb 2004 18:07:49 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 23373 invoked from network); 20 Feb 2004 18:07:49 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 20 Feb 2004 18:07:49 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 3FA422B92; Fri, 20 Feb 2004 13:07:47 -0500 (EST) Message-ID: <40364CF2.5020704@gnu.org> Date: Fri, 20 Feb 2004 18:07:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Elena Zannoni Cc: Daniel Jacobowitz , David Carlton , gdb@sources.redhat.com Subject: Re: Huge slowdown since 6.0 References: <20040218210927.GA16641@nevyn.them.org> <20040220050905.GA15209@nevyn.them.org> <16438.14300.323849.306261@localhost.redhat.com> <40363D78.9080708@gnu.org> <16438.18096.205403.553354@localhost.redhat.com> In-Reply-To: <16438.18096.205403.553354@localhost.redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-02/txt/msg00288.txt.bz2 > > Hmm, begs a few questions: > > sorry, I am talking about partial symbols. It's not clear from the above. [psymbols, symbols, same question :-)] > > > > - why do we load the symbols during startup? > > Load globals on demand? Daniel wrote: > What sort of demand do you have in mind? The very first lookup_symbol_by_name(). At present core gdb contains significant chunks of logic intended to out wit the symbol table. core-gdb should instead just ask for exactly what it needs and let the symbol table decide if/when something should be pulled in. > > - why do we sort the symbols during startup? > > Use a hash (so that break main is fast) and sort when (break main > > is entered?) > > - why don't we do more while GDB is twiddling its thumbs in the event > > loop event loop? Daniel writes: > Hmm.... that's pretty complicated to implement. It would require doing > things in small chunks and handling interruption gracefully. The > problem is, at the first symbol lookup, we will probably need to have > all the symbols... The current behavior isn't too friendly either mind. Given a slow loading symbol table the users only option is "take an early lunch". Cntrl-c, if it worked, would just abort the load :-( Even if we start out with on-demand, it should work better. Given: $ gdb foo (gdb) break main (gdb) run why is GDB loading glibc's symbols? > The thing that I am curious about is to see how early into a regular > debug session we build the symtabs. I.e. I am afraid that any > reference to any symbol from the command line makes the whole lot > expand anyway. The answer to this may help answer the question whether > we really need a two tier symbol table system, or if there is another > way of solving the same problem. While cleaning up the obstack stuff, > it became obvious that the intent was for the psymtabs to go away once > expanded into full symtabs, but this was never implemented. enjoy, Andrew