From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6C6F23858299; Mon, 20 Jun 2022 06:59:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C6F23858299 From: "rguenth at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/23710] gdb is slow and memory hungry consuming debug generated with LTO by GCC Date: Mon, 20 Jun 2022 06:59:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 8.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.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: 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: Mon, 20 Jun 2022 06:59:59 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D23710 --- Comment #26 from Richard Biener --- (In reply to Tom Tromey from comment #25) > Changing the full reader to read DIEs on demand is almost doable. > The major problem I see here is that some code looks at a DIE's > parent -- but due to the nature of DWARF, this requires a more > full scan of the DIE tree (there are no parent links in the > .debug_info itself) That's indeed an issue. Still even here scanning for the parent chain up to the CU header shouldn't be too expensive if you do not materialize all other objects (maybe avoid redundant work by having 'placeholder' DIEs read-in with just TAG and sibling info, not populating any of its actual content to avoid reading other DIEs). mmap vs. read might be another thing to consider here (I also wonder if the actual DWARF might be good enough of a data format to work with for most parts of a DIE to avoid duplicating/exploding this already large data in memory). > Longer term I would like to have gdb make a symtab directly > from the index, and then lazily instantiate symbol contents > when needed. I think this would be much faster. --=20 You are receiving this mail because: You are on the CC list for the bug.=