From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11474 invoked by alias); 20 Jun 2003 09:00:24 -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 17430 invoked from network); 20 Jun 2003 08:47:35 -0000 Received: from unknown (HELO dali.onevision.de) (212.77.172.62) by sources.redhat.com with SMTP; 20 Jun 2003 08:47:35 -0000 Received: from onevision.de (oppenheim [192.168.7.120]) by dali.onevision.de (8.11.7/8.11.3/ROSCH/DB) with ESMTP id h5K8lZb31658 for ; Fri, 20 Jun 2003 10:47:35 +0200 Message-ID: <3EF2CA26.1030807@onevision.de> Date: Fri, 20 Jun 2003 09:00:00 -0000 From: Roland Schwingel Organization: OneVision Software AG User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: de, de-de, en-us, en MIME-Version: 1.0 To: gdb Subject: really really slow lookup_symtabs() - some obversations Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-06/txt/msg00409.txt.bz2 Hi... A while ago I posted a patch for gdbtk to avoid lookup_symtab() calls because they appear to be ***very*** expensive in my environment. The patch made gdb more usable again, but there are still frequent calls to lookup_symtab() causing *heavy* slowdowns (waiting 1 minute for one lookup_symtab on a P4 1.5GHz is very common for me). So I started out a new round. I found out that calling lookup_symtab gets desperately slow when the following 2 circumstances are met: 1. A lot of files involved in the executable (in my case >6000) 2. Calls to lookup_symtab with fully qualified name I added some printfs in lookup_symtab for debugging: ..... got_symtab: /* First, search for an exact match */ printf ("lookup_symtab: ALL_SYMTABS\n"); ALL_SYMTABS (objfile, s) { if (FILENAME_CMP (name, s->filename) == 0) { printf ("lookup_symtab: found Case1\n"); return s; } .... } printf ("lookup_symtab: After ALL_SYMTABS\n"); /* Now, search for a matching tail (only if name doesn't have any dirs) */ .... When called with a fully qualifed name I get a cascade of my printf (at least hundreds mabe thousands) and I takes ages to complete (as menitioned above) when called with a short name eg "foo.m" I just get 3 to 8 of my printfs.... Does anyone know why all this is done for fully qualified names? And maybe what can be done against? Thanks for any infos, Roland PS: All stuff here mentioned concerns gdb 5.3 (to which I have to stick until 6.0 is released)