From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D41783945C3A; Fri, 20 Mar 2020 09:06:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D41783945C3A From: "vries 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: Fri, 20 Mar 2020 09:06:06 +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: vries 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: Fri, 20 Mar 2020 09:06:06 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D23710 --- Comment #14 from Tom de Vries --- (In reply to Tom de Vries from comment #5) > (In reply to Richard Biener from comment #0) > > gdb takes ~10s to process a LTO bootstrapped cc1 binary and another two > > seconds > > when setting the first breakpoint. It also has allocated 1.6GB memory = at > > that point (compared to ~200MB for a non-LTO binary). >=20 > There's a setting "maint set/show dwarf max-cache-age" which defaults to = 5. >=20 > Using a higher setting, I get the following reduction in real execution t= ime: > - 10 : 1.5% > - 100 : 12.5% > - 316 : 16.5% > - 1000 : 16.5% > - 10000 : 16.5% > - 100000: 15.5% >=20 > Note: adding the setting to the gdb command line using -iex to make sure = it > gets set _before_ loading the exec): > ... > $ gdb -q -nw -nx -batch -iex "maint set dwarf max-cache-age $n" -ex "b > do_rpo_vn" cc1 > ... >=20 > Conversely, disabling the cache by setting the value to 0 causes a real > execution time increase of 46%. Filed PR25703 - "set dwarf max-cache-age default of 5 is slow for inter-CU-reference binaries". --=20 You are receiving this mail because: You are on the CC list for the bug.=