From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C36123858427; Wed, 18 May 2022 16:12:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C36123858427 From: "simon.marchi at polymtl dot ca" To: gdb-prs@sourceware.org Subject: [Bug symtab/29105] new DWARF reader still slow Date: Wed, 18 May 2022 16:12:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simon.marchi at polymtl dot ca X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tromey at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2022 16:12:14 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29105 Simon Marchi changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simon.marchi at polymtl do= t ca --- Comment #4 from Simon Marchi --- Hi Tom, I'm not sure why I am starting to see this only today, but I see a lot of t= ests timing out. gdb.base/sizeof.exp is one of them. It looks like it's due to= a slowdown that started with the new DWARF reader patches. My build uses -O0 and all the sanitizer and glibcxx debug stuff, so it does= n't help, but I see the same relative slowdown without that. I copied the test program of gdb.base/sizeof.exp to /tmp/sizeof so it could= be reused easily across builds. The command I use is: time ./gdb -q --data-directory=3Ddata-directory -nx /tmp/sizeof -ex "star= t"=20 -iex "set debug dwarf-read 0" -ex "p/d sizeof(short)" -batch This replicates the first steps of the test. Using 3d20b8d99a5: ./gdb -q --data-directory=3Ddata-directory -nx /tmp/sizeof -ex "start" -ex = -e=20 1.18s user 0.17s system 116% cpu 1.157 total Using 3d20b8d99a5^: ./gdb -q --data-directory=3Ddata-directory -nx /tmp/sizeof -ex "start" -ex = -e=20 0.40s user 0.07s system 109% cpu 0.427 total By toggling "set debug dwarf-read" to 1, I noticed that we are now expandin= g a lot of CUs from libc's debug info when doing the "print sizeof": [dwarf-read] process_queue: Expanding one or more symtabs of objfile /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so ... [dwarf-read] process_queue: Expanding symtab of CU at offset 0xd3cbe [dwarf-read] process_queue: Done expanding CU at offset 0xd3cbe [dwarf-read] process_queue: Done expanding symtabs of /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so. [dwarf-read] process_queue: Expanding one or more symtabs of objfile /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so ... [dwarf-read] process_queue: Expanding symtab of CU at offset 0x22bf6f [dwarf-read] process_queue: Done expanding CU at offset 0x22bf6f [dwarf-read] process_queue: Done expanding symtabs of /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so. [dwarf-read] process_queue: Expanding one or more symtabs of objfile /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so ... [dwarf-read] process_queue: Expanding symtab of CU at offset 0x7ef56e [dwarf-read] process_queue: Done expanding CU at offset 0x7ef56e [dwarf-read] process_queue: Done expanding symtabs of /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so. ... We expand ~1500 CUs. Before, we didn't do that. So having debug info for libc is important for reproducing this, and a GDB configured with --prefix/usr or some other swit= ch that makes it find separate debug info in /usr/lib/debug (by default a local build would look in /usr/local/lib/debug). I am reproducing this on Ubuntu 20.04. --=20 You are receiving this mail because: You are on the CC list for the bug.=