From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20267 invoked by alias); 4 Oct 2004 22:12:02 -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 20260 invoked from network); 4 Oct 2004 22:12:01 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 4 Oct 2004 22:12:01 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i94MBu3o022583 for ; Mon, 4 Oct 2004 18:12:01 -0400 Received: from zenia.home.redhat.com (sebastian-int.corp.redhat.com [172.16.52.221]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i94MBsr07916; Mon, 4 Oct 2004 18:11:55 -0400 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: [rfa/dwarf] Support for attributes pointing to a different CU References: <20040923045723.GA11871@nevyn.them.org> <20040924003412.GB10500@nevyn.them.org> <20041004004111.GD3234@nevyn.them.org> From: Jim Blandy Date: Mon, 04 Oct 2004 22:12:00 -0000 In-Reply-To: <20041004004111.GD3234@nevyn.them.org> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-10/txt/msg00071.txt.bz2 This patch still avoids building the all_comp_units table if it never finds a CU whose abbrev table suggests it might contain inter-CU references. What I was actually suggesting was building all_comp_units for every objfile, unconditionally --- even for objfiles with no inter-CU references, and which will thus never use the table. The win would be to remove the case of an absent all_comp_units table from the code. I want to keep the number of different cases one needs to think about down where doing so doesn't provide a noticeable performance hit. On an 8000-CU objfile (what you estimated glibc compiled with duplicate elimination would have), that would be a memory overhead of 160k, which doesn't seem bad. It's true that that would be a separate pass over the .debug_info section, but the latest patch will do two passes anyway. The quadratic bit in create_all_comp_units to recover the psymtabs we'd already created wouldn't be needed any more.