From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14410 invoked by alias); 16 Aug 2010 20:49:59 -0000 Received: (qmail 14400 invoked by uid 22791); 16 Aug 2010 20:49:58 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 Aug 2010 20:49:54 +0000 Received: (qmail 27502 invoked from network); 16 Aug 2010 20:49:53 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 16 Aug 2010 20:49:53 -0000 Date: Mon, 16 Aug 2010 20:49:00 -0000 From: Daniel Jacobowitz To: sami wagiaalla Cc: gdb-patches@sourceware.org Subject: Re: [RFC] Use custom hash function with bcache Message-ID: <20100816204947.GA22993@caradoc.them.org> Mail-Followup-To: sami wagiaalla , gdb-patches@sourceware.org References: <4C6946E1.6000709@redhat.com> <20100816191348.GA16221@caradoc.them.org> <4C699679.6090209@redhat.com> <20100816200325.GA19823@caradoc.them.org> <4C699B55.5000601@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C699B55.5000601@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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-08/txt/msg00247.txt.bz2 On Mon, Aug 16, 2010 at 04:11:01PM -0400, sami wagiaalla wrote: > On 08/16/2010 04:03 PM, Daniel Jacobowitz wrote: > >On Mon, Aug 16, 2010 at 03:50:17PM -0400, sami wagiaalla wrote: > >>I only took into consideration the values which are set by > >>add_psymbol_to_bcache. The assumption is that these are the only > >>values that will make a difference since they are the only values > >>available when calculating the hash. > > > >Interesting, I didn't remember about add_psymbol_to_bcache. I'd > >better back up - what are you accomplishing by this change? > > > > A previous patch of mine introduced a bcache regression :D. The patch > made cplus_specifc a pointer to an allocated struct. This is because > we wanted to store more information in cplus_specific without > penalizing the other other languages. With cplus_specific being a > pointer hashing the whole symbol didn't work anymore. This patch is > an attempt to fix that. Aha! OK, I get it now. And the section is probably never used for psymbols, right? I think that the way you've got this is probably OK, but could stand some more explanation. It kind of pains me, though, because there's an obvious missed optimization that I don't see how to do efficiently. We don't need to do the work of SYMBOL_SET_NAMES again if there's already a named version in the cache... -- Daniel Jacobowitz CodeSourcery