public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/27937] New: Performance regression of 8% due to assert in dwarf/read/attribute.h
@ 2021-06-01  8:30 vries at gcc dot gnu.org
  2021-06-01  8:30 ` [Bug symtab/27937] " vries at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2021-06-01  8:30 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=27937

            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 <tom@tromey.com>
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 == DW_FORM_sdata || form == DW_FORM_implicit_const);
+    //gdb_assert (form == DW_FORM_sdata || form == DW_FORM_implicit_const);
     return u.snd;
   }

...
gets me to 5.90s.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-04-15 13:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01  8:30 [Bug symtab/27937] New: Performance regression of 8% due to assert in dwarf/read/attribute.h vries at gcc dot gnu.org
2021-06-01  8:30 ` [Bug symtab/27937] " vries at gcc dot gnu.org
2021-06-01 15:26 ` ssbssa at sourceware dot org
2021-06-01 16:36 ` simark at simark dot ca
2021-06-01 21:12 ` tromey at sourceware dot org
2021-06-04 15:28 ` tromey at sourceware dot org
2022-04-15 13:31 ` tromey at sourceware dot org
2022-04-15 13:58 ` tromey at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).