From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A88053889801; Tue, 1 Jun 2021 08:30:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A88053889801 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/27937] New: Performance regression of 8% due to assert in dwarf/read/attribute.h Date: Tue, 01 Jun 2021 08:30: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: 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: 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: Tue, 01 Jun 2021 08:30:01 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27937 Bug ID: 27937 Summary: Performance regression of 8% due to assert in dwarf/read/attribute.h Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: symtab Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- PR23710 is about gdb being slow for executables produced using gcc and LTO. A cc1 exec is mentioned, and this gdb invocation using it as being slow: ... $ gdb -q -batch cc1 -ex "b do_rpo_vn" ... I've measured performance using recent releases build with -O2 on openSUSE = Leap 15.2, as well as HEAD@3633d4fb446 (2021-05-28): ... +----------+-------+---------+ | version | real | maxrss | +----------+-------+---------+ | 8.1.1 | 9.42s | 1443980 | | 8.2.1 | - | - | | 8.3.1 | 9.31s | 1460376 | | 9.2 | 8.50s | 1495064 | | 10.2 | 5.86s | 872584 | | HEAD | 6.36s | 871960 | +----------+-------+---------+ ... [ No results in 8.2.1 due to PR23712. ] There's clear progress going towards 10.2, but after 10.2 we regress, with 8.5%. I've bisected this to: ... commit 1bc397c561f55c1cf67a5e02f5c9305a54155a2e Author: Tom Tromey Date: Tue Sep 29 18:49:08 2020 -0600 Remove DW_SND This removes DW_SND in favor of accessors on struct attribute. These accessors check that the form is appropriate. ... Commenting out this assert: ... $ git diff diff --git a/gdb/dwarf2/attribute.h b/gdb/dwarf2/attribute.h index 91782769689..83caef8e92d 100644 --- a/gdb/dwarf2/attribute.h +++ b/gdb/dwarf2/attribute.h @@ -69,7 +69,7 @@ struct attribute form. */ LONGEST as_signed () const { - gdb_assert (form =3D=3D DW_FORM_sdata || form =3D=3D DW_FORM_implicit_= const); + //gdb_assert (form =3D=3D DW_FORM_sdata || form =3D=3D DW_FORM_implici= t_const); return u.snd; } ... gets me to 5.90s. --=20 You are receiving this mail because: You are on the CC list for the bug.=