From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22584 invoked by alias); 4 Jun 2010 22:47:48 -0000 Received: (qmail 22574 invoked by uid 22791); 4 Jun 2010 22:47:47 -0000 X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Jun 2010 22:47:42 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o54MlcXA018461 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 4 Jun 2010 18:47:38 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o54MladU015045; Fri, 4 Jun 2010 18:47:37 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o54MlaOk012351; Fri, 4 Jun 2010 18:47:36 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id CF3FC37897F; Fri, 4 Jun 2010 16:47:35 -0600 (MDT) From: Tom Tromey To: Jan Kratochvil Cc: gdb-patches@sourceware.org, Keith Seitz Subject: Re: [patch] Fix duplicate types for single DIE References: <20100513115029.GA27341@host0.dyn.jankratochvil.net> Reply-To: tromey@redhat.com Date: Fri, 04 Jun 2010 22:47:00 -0000 In-Reply-To: <20100513115029.GA27341@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Thu, 13 May 2010 13:50:29 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-06/txt/msg00149.txt.bz2 >>>>> "Jan" == Jan Kratochvil writes: Jan> Keith has provided "obstack-leak.patch" there as a prerequisite for Jan> the physname patch there. Attaching here a more complete solution Jan> of the problem. I think it makes sense. Thanks for doing this. Jan> On 250MB webkit debuginfo it reduced memory consumption by 3MB from Jan> 4616MB (0.06%) (which is less than I hoped for; checked with Jan> Keith's physname patch). I have not found measureable any Jan> performance difference. FWIW I've been thinking for a while about how we could "intern" types to reduce memory use. However, it seems simpler expensive to just wait for the .debug_types-enabled GCC to be deployed everywhere; also this approach means no performance hit for GDB. Jan> Tom Tromey may not agree with new internal_error as expressed in Jan> Re: [patch] Fix dwarf2read to crash again Jan> http://sourceware.org/ml/gdb-patches/2010-04/msg00812.html Jan> I am not sure what are his specific plans; if some TRY_CATCH should be Jan> involved the new internal_error call should OK there. I am still going to get back to this eventually -- I took a long detour through DW_OP_*piece. I don't have a concrete plan other than to find appropriate places in the DWARF reader to catch exceptions and arrange to do something sensible. I don't have a problem with an internal_error if it can only trigger when there is a bug in GDB. If strange-but-valid DWARF can trigger it, then I think it should be a complaint or maybe an ordinary error. Jan> With the new internal_error call I have verified at least the fixes Jan> of read_tag_pointer_type and read_tag_const_type fixes (and not Jan> just these two) to be required. Other fixes are just written Jan> artificially to cover all the cases of any indirect call of Jan> tag_type_to_type, that is die_type, die_descriptive_type, Jan> set_descriptive_type and die_containing_type. (I believe at least Jan> those *_descriptive_type are in fact never needed as their DWARF Jan> usage should never lead to DWARF references loops.) Thanks. Jan> 2010-05-13 Jan Kratochvil Jan> * dwarf2read.c (read_structure_type): Move set_descriptive_type after Jan> set_die_type. Jan> (read_array_type): Remove type initialization. Recheck get_die_type Jan> after initial die_type. Move set_die_type before set_descriptive_type. Jan> (read_set_type): New variable domain_type. Recheck get_die_type after Jan> initial die_type. Jan> (read_tag_pointer_type, read_tag_reference_type): New variable Jan> target_type. Recheck get_die_type after initial die_type. Jan> (read_tag_ptr_to_member_type): Recheck get_die_type after initial Jan> die_type and die_containing_type. Jan> (read_tag_const_type, read_tag_volatile_type, read_subroutine_type): Jan> Recheck get_die_type after initial die_type. Jan> (read_subrange_type): Recheck get_die_type after initial die_type. Jan> Move set_die_type before set_descriptive_type. Jan> (set_die_type): Call internal_error if DIE has some type already set. This patch is ok. I'm sorry for the delay in the review. I did not look closely to see if this conflicts with Keith's obstack-leak.patch. If so, it doesn't matter to me if that goes in and then you back it out, or if Keith just doesn't commit it. Tom