From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31524 invoked by alias); 25 Apr 2003 15:31:44 -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 31501 invoked from network); 25 Apr 2003 15:31:43 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 25 Apr 2003 15:31:43 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 03A1E2B2F; Fri, 25 Apr 2003 11:31:35 -0400 (EDT) Message-ID: <3EA954D7.2070207@redhat.com> Date: Fri, 25 Apr 2003 15:31:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Carlton , Elena Zannoni , Jim Blandy Cc: gdb Subject: Re: [rfc] struct dictionary References: <3EA89AB3.6050403@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-04/txt/msg00313.txt.bz2 > On Thu, 24 Apr 2003 22:17:23 -0400, Andrew Cagney said: > > >>> Blocks currently store symbols in one of three different ways: >>> using a hash table, using an unsorted list, or using a sorted list. >>> Most blocks are built by buildsym.c, which use only the former two >>> mechanisms. Sorted list blocks are only being produced by >>> mdebugread.c. And, to make matters worse, jv-lang.c produces one >>> unsorted list block for which the predicate BLOCK_SHOULD_SORT >>> matches; the chain of events by which GDB actually treats that >>> block correctly is very tenuous. > > >> Um, didn't BLOCK_SHOULD_SORT get deleted? > > > No. I tried in last fall, but Jim didn't like it because it probably > would have made performance for mdebugread be awful. Daniel recently > proposed hashing sorted blocks on the fly, but he withdrew that patch > quickly when he found a way to work around whatever problem caused him > to be particularly annoyed with sorted blocks. Hmm, the lack of activity towards mdebugread suggests it's either dieing or dead. Perhaphs by dropping that sort we (as in the developer community) can encourage it in the direction we (as developers) would likely prefer .... Dig dig: http://sources.redhat.com/ml/gdb-patches/2002-09/msg00564.html My reading is that there was simply a request for more tangable numbers on how bad mdebug read was going to become. So ..., what was the performance gain for stabs when the hash table was added? Given that a binary sort's [average] performance is not as good as a hashtable, that number should give you an upper bound on the consequences. Dig dig: http://sources.redhat.com/ml/gdb-patches/2001-05/msg00508.html suggests that things could potentially be twice as slow ``Oops''. Looking at `break captured_main; run' I suspect it is typically less. Assuming, now that there is a number, is this ok? I'm willing to be the fall-guy (my job) and be the one adding something to the NEWS file. > Basically, either somebody needs to buildsym-ify mdebugread.c or else > symbol lookup has to be made a bit more abstract. These would > actually both be good ideas for reasons other than getting rid of > BLOCK_SHOULD_SORT, so it's certainly not an either-or choice. Ok, humor me ... http://sources.redhat.com/ml/gdb/2003-04/msg00017.html why even build these data structures during symbol reading? It takes time and space, yet is probably never used. Why not on-demand build this dictionary specialized for the block? If the user for some reason accesses a block then, in all probablility, they will make later accesses to that same block - getting benefit. > David Carlton > carlton@math.stanford.edu Andrew