From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 702DA3858D28; Fri, 29 Apr 2022 19:51:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 702DA3858D28 From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug symtab/29105] New: new DWARF reader still slow Date: Fri, 29 Apr 2022 19:51:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: tromey at sourceware dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Fri, 29 Apr 2022 19:51:00 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29105 Bug ID: 29105 Summary: new DWARF reader still slow Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: symtab Assignee: unassigned at sourceware dot org Reporter: tromey at sourceware dot org Target Milestone: --- Pedro pointed out that using the index cache is still faster than the new DWARF reader. I think I found why: What happens here is that gdb does the finalization step in the background. Interactively, this helps make it seem faster. However, it's not really faster, it is just deferring some work. You can see it with an invocation like: gdb -q -batch -iex 'set debug timestamp 1' -iex 'set debug dwarf-read 1'= -ex start ./gdb Here for gdb-with-an-index I see: 0.820423 [dwarf-read] dwarf2_initialize_objfile: found gdb index from f= ile 1.699175 [dwarf-read] process_queue: Expanding one or more symtabs of objfile /tmp/gdb.idx ... But for ordinary gdb: 1.310033 [dwarf-read] dwarf2_build_psymtabs_hard: Done building psymtab= s of /tmp/gdb 4.666649 [dwarf-read] process_queue: Expanding one or more symtabs of objfile /tmp/gdb ... This is disappointing of course. It might be possible to reduce this time at the cost of a bit more complexity in the lookup code and perhaps a bit more memory use. For example, right now finalization merges the results from all the readers into a single entry table -- but maybe the table could remain sharded instead. Another possibility might be to do the work in worker threads and, instead of sharding the result, pre-sort the vectors and use a sorted merge operation to combine them. See the last messages in this thread: https://sourceware.org/pipermail/gdb-patches/2022-April/188194.html --=20 You are receiving this mail because: You are on the CC list for the bug.=