From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14558 invoked by alias); 29 Nov 2011 14:51:29 -0000 Received: (qmail 14545 invoked by uid 22791); 29 Nov 2011 14:51:28 -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_GD 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:51:06 +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 pATEp58e028862 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 29 Nov 2011 09:51:05 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pATEp5b6005534; Tue, 29 Nov 2011 09:51:05 -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 pATEp3a1017698; Tue, 29 Nov 2011 09:51:04 -0500 From: Tom Tromey To: Joel Brobecker Cc: gdb-patches@sources.redhat.com 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> Date: Tue, 29 Nov 2011 14:51:00 -0000 In-Reply-To: <20111129030637.GM24943@adacore.com> (Joel Brobecker's message of "Mon, 28 Nov 2011 19:06:37 -0800") 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/msg00811.txt.bz2 >>>>> "Joel" == Joel Brobecker writes: Joel> I just realized that partial symbols are sorted using strcmp_iw_ordered. Joel> This works great for C++, for instance, but only works OK for Ada. Joel> I am wondering if we shouldn't be sorting the partial symbols Joel> using a language-specific sorting routine instead. FWIW, I think it would probably be fine. It is hard to know for certain without actually trying it, though. Joel> The thing is, when I looked at it, it's not easy just looking at Joel> the partial symtab what language it is. The language seems to be Joel> embedded in the symbols themselves. This is easy to add, though. We could also add more function pointers so that the behavior is method-based instead of switch-based. Joel> But, without even thinking about performance issues at startup, this Joel> approach suffers from the same problem as storing the natural name does: Joel> For certain large applications, we would exceed the maximum amount of Joel> memory a process can hold. This is not necessarily on GNU/Linux, but Joel> the problem is there. I think we'll have better luck we are capable of Joel> merging a bit the massive duplication in the debug info. I'm curious to know what massive duplication you mean. In my local builds I'm using -gdwarf-4 and seeing big space wins. These also translate to runtime space wins for gdb; the effect is basically like a bcache for types. This is for C, I don't know about Ada. Tom