From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QJwFBOYyq2PxLAoAWB0awg (envelope-from ) for ; Tue, 27 Dec 2022 13:01:10 -0500 Received: by simark.ca (Postfix, from userid 112) id F2D5D1E222; Tue, 27 Dec 2022 13:01:09 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=bfAvlRPl; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 7BDD91E0D3 for ; Tue, 27 Dec 2022 13:01:09 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AB8E13858C78 for ; Tue, 27 Dec 2022 18:01:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB8E13858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1672164067; bh=3Z+hKSTqaqJfhOSxxbatwZ4Y4rBakBsfwEkOPJYRIyQ=; h=Date:To:Cc:In-Reply-To:Subject:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=bfAvlRPlUq+To3Q/EbsPVopOVTPr2HPQfn0bUWiLJuNsATkmugFmC7Utgry2bhH4n h66SkFyElBh0lIl5b6wQPUBDqMCdNgkmCxdj2jTodaKROsEqYCCaJJYZDjpsaXtmZP 2Bwr+u/bO+us4VQDIwMaC0PBqNurfTn6LnvoxFnY= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 4ADBA3858D37 for ; Tue, 27 Dec 2022 18:00:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4ADBA3858D37 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAEFr-0004V3-3r; Tue, 27 Dec 2022 13:00:47 -0500 Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAEFp-00061B-0J; Tue, 27 Dec 2022 13:00:46 -0500 Date: Tue, 27 Dec 2022 20:00:51 +0200 Message-Id: <835ydw20bw.fsf@gnu.org> To: Tom Tromey Cc: gdb-patches@sourceware.org, luis.machado@arm.com In-Reply-To: <87cz84dasj.fsf@tromey.com> (message from Tom Tromey on Tue, 27 Dec 2022 10:19:24 -0700) Subject: Re: Two observations using GDB 13 snapshot References: <83h6xugc5v.fsf@gnu.org> <58b64bf8-90b6-d080-c060-d03761501199@arm.com> <83k02neezy.fsf@gnu.org> <835ye7e9jw.fsf@gnu.org> <87h6xrks77.fsf@tromey.com> <83mt7idacj.fsf@gnu.org> <87fsd4elb2.fsf@tromey.com> <83o7rs4qmg.fsf@gnu.org> <87cz84dasj.fsf@tromey.com> 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: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > From: Tom Tromey > Cc: Tom Tromey , gdb-patches@sourceware.org, > luis.machado@arm.com > Date: Tue, 27 Dec 2022 10:19:24 -0700 > > Eli> All I'm interested in is to help you and others understand what could > Eli> be the reason for slow reading of debug info at startup, so that it > Eli> could be sped up at some point. > > Ok. I re-read the thread and I see that at the beginning you didn't > mention -readnow. So, assuming that the -readnow stuff was a > distraction... Right. When it was brought up, I thought -readnow was indicative of what I see, but then you said it doesn't use the new DWARF reader code, so it is not relevant. > The new indexer should not be significantly slower even when > single-threaded. On my machine, if I "maint set worker-threads 0" and > then use a -O2 build of gdb, it's about as fast as the system /bin/gdb > (which uses the old code). > > Old: > > (gdb) file ./gdb > [...] > Command execution time: 2.408843 (cpu), 2.130013 (wall) > > New: > > (gdb) file ./gdb > [...] > Command execution time: 2.858222 (cpu), 2.865426 (wall) > > This is only slightly worse. My numbers are very different: . with GDB-12.1: elapsed: 8.39 sec, CPU: 6.25 sec . with gdb-13.0.50.20221217-git: elapsed: 135.8 sec, CPU: 130.5 sec No significant difference in memory consumption: 453MB for GDB 12.1, 441MB for GDB 13. (Interestingly, when reading symbols from Emacs on the same system, the times are almost identical: 2.593 for GDB 12 vs 2.671 for GDB 13.) Other details which might be important: GCC 9.2.0 Binutils 2.39 GDB compilation switches: -O2 -gdwarf-4 -g3 And one more thing: this is a native 32-bit Windows build of GDB, so it has DWARF2 info in PE-COFF file, not in ELF. Maybe this could explain the difference? Or maybe the C++ code is a factor? Thanks.