From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4663 invoked by alias); 5 Aug 2004 17:23:26 -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 4656 invoked from network); 5 Aug 2004 17:23:25 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 5 Aug 2004 17:23:25 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i75HNPe1030611 for ; Thu, 5 Aug 2004 13:23:25 -0400 Received: from zenia.home.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i75HNNa13437; Thu, 5 Aug 2004 13:23:24 -0400 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com, ezannoni@redhat.com Subject: Re: [rfa/dwarf/doc] Inter-compilation-unit reference support for partial DIEs References: <20040420170855.GA31548@nevyn.them.org> <20040617034201.GD23443@nevyn.them.org> <20040715184431.GA25807@nevyn.them.org> <20040804230536.GA30848@nevyn.them.org> From: Jim Blandy Date: Thu, 05 Aug 2004 17:23:00 -0000 In-Reply-To: <20040804230536.GA30848@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-08/txt/msg00123.txt.bz2 Okay. I've started to review this. One thought on what I understand so far: The way read-in compilation units are chained through alternating 'struct dwarf2_cu' objects and 'struct dwarf2_per_cu_data' nodes is kind of weird. And the name 'struct dwarf2_per_cu_data' is not great --- 'struct dwarf2_cu' is also per-CU data. Would it work to simply place the 'struct dwarf2_cu' objects themselves directly into the tree, add a 'read_in' flag, and get rid of dwarf2_per_cu_data altogether? The memory consumption doesn't seem like it matters: GDB has 300 CU's, so a 300-byte structure per CU would add up to ~90k. You've been watching memory consumption, so you can say better than I how this looks. Putting the dwarf2_cu objects directly in the tree would also remove the need for a read_in_chain: you could just walk the whole tree. The splay tree accessor functions would replace the linked list wrangling.