From patchwork Tue Oct 18 08:28:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 120375 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id A522F1007D2 for ; Tue, 18 Oct 2011 19:28:53 +1100 (EST) Received: (qmail 10901 invoked by alias); 18 Oct 2011 08:28:49 -0000 Received: (qmail 10885 invoked by uid 22791); 18 Oct 2011 08:28:47 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, SPF_HELO_PASS 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; Tue, 18 Oct 2011 08:28:26 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9I8SD0q010638 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 18 Oct 2011 04:28:14 -0400 Received: from host1.jankratochvil.net (ovpn-116-16.ams2.redhat.com [10.36.116.16]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p9I8SBRm032528 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 18 Oct 2011 04:28:13 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p9I8SAL0030901; Tue, 18 Oct 2011 10:28:10 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p9I8S9r3030896; Tue, 18 Oct 2011 10:28:09 +0200 Date: Tue, 18 Oct 2011 10:28:09 +0200 From: Jan Kratochvil To: Tristan Gingold Cc: Tom Tromey , gcc-patches@gcc.gnu.org Subject: [patch#2] dwarf2out: Drop the size + performance overhead of DW_AT_sibling Message-ID: <20111018082809.GA30776@host1.jankratochvil.net> References: <20111012135008.GA24037@host1.jankratochvil.net> <75BB5328-587F-4704-82EB-C1F8936CF8F2@adacore.com> <20111012141807.GA29514@host1.jankratochvil.net> <20111013204000.GA20992@host1.jankratochvil.net> <017157C8-06DD-4D15-8F7A-4D50FC86338F@adacore.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Tue, 18 Oct 2011 09:24:08 +0200, Tristan Gingold wrote: > What is wrong with my suggestion of adding a command line option to keep the > siblings ? This option could be removed in a few years if nobody complained > about sibling removal. I find an extra option just a pollution of doc and everything by an option which will never get used. Wouldn't it be enough to disable it by -gstrict-dwarf? While currently the -gstrict-dwarf meaning is different I believe the purpose is correct - to be more backward compatible. Thanks, Jan gcc/ 2011-10-12 Jan Kratochvil Stop producing DW_AT_sibling without -gstrict-dwarf. * dwarf2out.c (dwarf2out_finish): Remove calls of add_sibling_attributes if !DWARF_STRICT. Extend the comment with reason. --- gcc/dwarf2out.c (revision 180121) +++ gcc/dwarf2out.c (working copy) @@ -22496,13 +22496,17 @@ dwarf2out_finish (const char *filename) prune_unused_types (); } - /* Traverse the DIE's and add add sibling attributes to those DIE's - that have children. */ - add_sibling_attributes (comp_unit_die ()); - for (node = limbo_die_list; node; node = node->next) - add_sibling_attributes (node->die); - for (ctnode = comdat_type_list; ctnode != NULL; ctnode = ctnode->next) - add_sibling_attributes (ctnode->root_die); + if (dwarf_strict) + { + /* Traverse the DIE's and add add sibling attributes to those DIE's that + have children. It is produced only for compatibility reasons as it is + both a size and consumer performance hit. */ + add_sibling_attributes (comp_unit_die ()); + for (node = limbo_die_list; node; node = node->next) + add_sibling_attributes (node->die); + for (ctnode = comdat_type_list; ctnode != NULL; ctnode = ctnode->next) + add_sibling_attributes (ctnode->root_die); + } /* Output a terminator label for the .text section. */ switch_to_section (text_section);