From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18485 invoked by alias); 29 Nov 2011 14:55:18 -0000 Received: (qmail 18477 invoked by uid 22791); 29 Nov 2011 14:55:17 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,KAM_STOCKTIP,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_BJ 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, 29 Nov 2011 14:55:03 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pATEt3b1007063 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 29 Nov 2011 09:55:03 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pATEt2Yi020641; Tue, 29 Nov 2011 09:55:03 -0500 Received: from barimba (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 pATEt0qI017787; Tue, 29 Nov 2011 09:55:01 -0500 From: Tom Tromey To: "Pierre Muller" Cc: "'Joel Brobecker'" , Subject: Re: partial-symtab symbol sorting References: <20111123163917.GA13809@adacore.com> <20111123232406.GQ13809@adacore.com> <20111124105603.GA91879@adacore.com> <20111124163304.GR13809@adacore.com> <20111129030637.GM24943@adacore.com> <47228.5772244961$1322556128@news.gmane.org> Date: Tue, 29 Nov 2011 14:55:00 -0000 In-Reply-To: <47228.5772244961$1322556128@news.gmane.org> (Pierre Muller's message of "Tue, 29 Nov 2011 09:41:02 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 2011-11/txt/msg00812.txt.bz2 >>>>> "Pierre" == Pierre Muller writes: Pierre> Did you think about what would happen to executables containing Pierre> objects compiled in different languages, each having a different sorting Pierre> routine? Pierre> I don't understand how this would work in such a case? The symbols in a psymtab are specific to that particular psymtab. In DWARF terms this corresponds to a single CU, so it just has one language (ignoring possible future confusion via LTO builds). See, e.g., psympriv.h:struct partial_symtab:globals_offset. I tend to think this is a weird design and that we should have a single hash per objfile for looking up partial symbols. But I have never tried to measure the slowdown, if any, and of course this sort of change has its own possible flaws... just something for a future to-do list. Speaking of weird design, anybody know why globals are sorted in a psymtab and static symbols are not? The comment in psympriv.h doesn't make sense to me, since it ignores the possibility of an unsuccessful search. Tom