From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway21.websitewelcome.com (gateway21.websitewelcome.com [192.185.45.210]) by sourceware.org (Postfix) with ESMTPS id 0FE85387090C for ; Tue, 1 Sep 2020 17:59:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0FE85387090C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway21.websitewelcome.com (Postfix) with ESMTP id ED4D9400D8B49 for ; Tue, 1 Sep 2020 12:59:04 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id DAYikIhSkXp2ADAYikUhAe; Tue, 01 Sep 2020 12:59:04 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Qvs10+EVyXhzZ/6bXZoOZkIoE2pi6rr9/yPCfVva1UI=; b=eoa15RPKpXZX0U1hlIBYX00M+U P+bgvkjcQHg6fc9Wm5Ll4TGv/FA9iX+Y9JQbWU98um2lYN9s36FKj5ZsRtofqCwsJSt/rOYSf9WDe Om2G2qTSJZ47zeIpfHs0oeKDZ; Received: from 71-218-12-75.hlrn.qwest.net ([71.218.12.75]:56202 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kDAYi-002Q1Z-CT; Tue, 01 Sep 2020 11:59:04 -0600 From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH] Have partial symbol tables own psymbol vectors References: <20200828193304.17475-1-tom@tromey.com> <871rjo7xic.fsf@tromey.com> <87sgc27nez.fsf@tromey.com> <74b64278-9789-9130-13fb-c722b06c09a9@simark.ca> X-Attribution: Tom Date: Tue, 01 Sep 2020 11:59:02 -0600 In-Reply-To: <74b64278-9789-9130-13fb-c722b06c09a9@simark.ca> (Simon Marchi's message of "Tue, 1 Sep 2020 10:41:02 -0400") Message-ID: <87d0357509.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.218.12.75 X-Source-L: No X-Exim-ID: 1kDAYi-002Q1Z-CT X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-218-12-75.hlrn.qwest.net (bapiya) [71.218.12.75]:56202 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3028.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_ABUSEAT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2020 17:59:18 -0000 >> @@ -1666,16 +1605,6 @@ add_psymbol_to_list (gdb::string_view name, bool copy_name, >> void >> init_psymbol_list (struct objfile *objfile, int total_symbols) >> { >> - if (objfile->partial_symtabs->global_psymbols.capacity () == 0 >> - && objfile->partial_symtabs->static_psymbols.capacity () == 0) >> - { >> - /* Current best guess is that approximately a twentieth of the >> - total symbols (in a debugging file) are global or static >> - oriented symbols, then multiply that by slop factor of >> - two. */ >> - objfile->partial_symtabs->global_psymbols.reserve (total_symbols / 10); >> - objfile->partial_symtabs->static_psymbols.reserve (total_symbols / 10); >> - } >> } Simon> Did you keep this empty function on purpose? I wasn't sure if I'd want to introduce some kind of psymtab builder RAII thing, and the calls to this function would mark the needed spots. That said, I do have a separate patch somewhere to remove it. I can submit it. I don't think I ended up needing the builder thing. I did experiment with sorting psymbols in the background, but on this machine at least it didn't help. However I suspect maybe it would help on a more capable machine -- I plan to try it on my work computer soon. (I've also got a bigger series to try reading each CU in parallel, but that is unfinished due to some complexity with cross-CU references.) Tom