From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56999 invoked by alias); 17 Nov 2017 17:30:32 -0000 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 Received: (qmail 56569 invoked by uid 89); 17 Nov 2017 17:30:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_SORBS_SPAM,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=H*f:sk:e143ccc X-HELO: gateway30.websitewelcome.com Received: from gateway30.websitewelcome.com (HELO gateway30.websitewelcome.com) (50.116.126.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Nov 2017 17:30:30 +0000 Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway30.websitewelcome.com (Postfix) with ESMTP id A55143ED0 for ; Fri, 17 Nov 2017 11:30:28 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id FkTEeGkzLDL8rFkTEe3RPA; Fri, 17 Nov 2017 11:30:28 -0600 Received: from 71-218-90-63.hlrn.qwest.net ([71.218.90.63]:53770 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1eFkTE-0015Tz-E7; Fri, 17 Nov 2017 11:30:28 -0600 From: Tom Tromey To: Tom Tromey Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [RFA] Handle dereferencing Rust trait objects References: <20171115212403.8639-1-tom@tromey.com> <87bmk19554.fsf@tromey.com> Date: Fri, 17 Nov 2017 17:30:00 -0000 In-Reply-To: <87bmk19554.fsf@tromey.com> (Tom Tromey's message of "Thu, 16 Nov 2017 16:26:47 -0700") Message-ID: <87375c95jg.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Source-L: No X-Exim-ID: 1eFkTE-0015Tz-E7 X-Source-Sender: 71-218-90-63.hlrn.qwest.net (pokyo) [71.218.90.63]:53770 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2017-11/txt/msg00351.txt.bz2 Tom> I could do something else. A vector of pairs, sorted by address; or an Tom> htab_t. Pedro> Can you say something about the number of elements that usually Pedro> ends up in this map in some reasonably sized Rust-using app (Firefox?)? Tom> I will look at this tomorrow. I had a bit of a panic when I ran this on libxul and got a count of 501908 symbols. However, my first attempt counted incorrectly; there are actually only 46488 unique LOC_STATIC psymbols in libxul. This roughly conforms to the idea that the psymbol cache is ~90% effective. Anyway, we discussed it on irc a bit, and I think I'll switch to the sorted vector of pairs. This will save some space, and isn't much slower or harder to code. Tom