From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org 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 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=3Z+hKSTqaqJfhOSxxbatwZ4Y4rBakBsfwEkOPJYRIyQ=; b=S6DgB7HzBBp2 O/IRLUnDpsjiXP0i3h1fmL5MOfIABjwbqcAMzm3WVvG5bb589/hpuQGlt8uJWI4lfiu8tLq3WSLOZ pa79Tq3jMW0r0fpXA0XmPV5Xp4IrkiCBUqZb1iy1NCJlFfFtjd/s6Pk6JC6BvDMSuQvAKGZksgJoH tMfq1jUDsFPc1iIVoEFGp+dJpa2VcKw1syaHeig8UeTCtWG7KnDmpWM0y+M7d/kAeKd6yMFMaQPvN wpPW7cQe4vtg/JyyrAv2UyvVADtNhCt27PYpY8Z+1j2rmQsQtLSQSIaGkXZkIOH3O0Q5qnMoA//ni SBaVe+wGBk1usFjg2XwI9A==; 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> From: Eli Zaretskii 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-Spam-Status: No, score=1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > 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.