From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway23.websitewelcome.com (gateway23.websitewelcome.com [192.185.50.107]) by sourceware.org (Postfix) with ESMTPS id 39BCB3858D34 for ; Thu, 26 Aug 2021 02:19:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 39BCB3858D34 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tromey.com Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway23.websitewelcome.com (Postfix) with ESMTP id 8CB39D8C2 for ; Wed, 25 Aug 2021 21:19:39 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id J4zTm2XUFLjoRJ4zTm3uVV; Wed, 25 Aug 2021 21:19:39 -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-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject: To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=GNCRzNzSUp1t9XCqQ8mEog/QlRjIuPik2KbiLpO3kuY=; b=KjNWnAfcha5ENFvVoxD9AtpEfE qqMLgoxayrhmEzhe5UXB/u+pohScm/kzrWNz9CQR9HjEixqsyO/Q1jSFXBIj6WwHNSN4s5swD8YbB Hu9N+DwcHmk1zqz1P7fPC40cD; Received: from 97-122-86-84.hlrn.qwest.net ([97.122.86.84]:46876 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mJ4zT-003LSg-Aa for gdb-patches@sourceware.org; Wed, 25 Aug 2021 20:19:39 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Subject: [PATCH 00/30] Rewrite the DWARF "partial" reader Date: Wed, 25 Aug 2021 20:19:07 -0600 Message-Id: <20210826021937.1490292-1-tom@tromey.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: 97.122.86.84 X-Source-L: No X-Exim-ID: 1mJ4zT-003LSg-Aa X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-86-84.hlrn.qwest.net (localhost.localdomain) [97.122.86.84]:46876 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3023.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SBL_CSS, SPF_HELO_PASS, SPF_NEUTRAL, TXREP, URIBL_CSS_A autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Thu, 26 Aug 2021 02:19:50 -0000 This series removes the DWARF partial symbol reader, replacing it with a new indexer which is significantly -- about an order of magnitude -- faster. The new indexer is roughly based on the DWARF .debug_names approach. That is, rather than construct full names for all interesting DIEs, it instead records the name given in the DWARF. Note, though, that this series does not actually update gdb's .debug_names writer to be correct. The new index is constructed so that this should be easy to do, but the series is long enough, and complicated enough, that I did not want to add this on. (It's not enough to update the writer -- the reader must also be updated, and one must decide how much backward compatibility to keep.) Why write a new indexer, rather than simply fix the psymtab reader? I have tried that multiple times over the years, without success. I believe that parallelism is the key to increased performance, and this is just too hard to retrofit onto the existing reader. This series starts with a number of refactorings. I've already landed a number of these, but the ones that remain are specific to this series, so I didn't try to submit them separately. The new code is also broken into separate patches for simpler review. Some of the performance gains are actually just an illusion -- some work is moved to the background, and if the main part of gdb needs the information, it will once again appear to be slow. However, this is still an improvement for some common situations, for example simply starting gdb on a large program. My preferred long-term fix here would be to replace DWARF with something that's less terrible for reading; but failing that we can maybe eke out some small incremental gains through further micro-optimization, or by farming out this scanning to something like debuginfod. I've regression tested each patch in this series. Only the patch to enable the new indexer is intended to affect operation at all. Tom