public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/15412] New: Performance regression in "info {func,var,types} foo" (mostly info types).
@ 2013-04-27 21:34 dje at google dot com
  2013-05-17 10:09 ` [Bug symtab/15412] " tobias.hunger at digia dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: dje at google dot com @ 2013-04-27 21:34 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15412

             Bug #: 15412
           Summary: Performance regression in "info {func,var,types} foo"
                    (mostly info types).
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
        AssignedTo: unassigned@sourceware.org
        ReportedBy: dje@google.com
    Classification: Unclassified


In a large program I'm seeing a performance regression in
info {func,var,types} ^foo::(anonymous namespace)

For example, in 7.5 it takes 2 seconds, in 7.6 and cvs head it takes ~300
seconds.

I think there are multiple factors here because a comparison of gdb
before/after the type-pretty-printing patches of ~2012-11-12 I only see a perf
degradation from 2 seconds to 150 seconds.  So something after that is then
slowing things down from 150s to 300s.

Data point: If I hack "info {func,var,type}" to set type_print_options.raw = 1,
I get most (maybe all) the performance back.

It seems like we want type-pretty-printing for info types, but the performance
cost can be high.  Thus I'm thinking "info {func,var,types}" should have a /r
(raw) option.

OTOH, a lot of the cost can be reduced, I think, by caching lookups: the same
symbol is processed many(!!!) times.  The caching could be at multiple levels
(e.g., more than just simple symbol lookups), I'm not sure what's the best one
yet.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug symtab/15412] Performance regression in "info {func,var,types} foo" (mostly info types).
  2013-04-27 21:34 [Bug symtab/15412] New: Performance regression in "info {func,var,types} foo" (mostly info types) dje at google dot com
@ 2013-05-17 10:09 ` tobias.hunger at digia dot com
  2013-05-19 13:50 ` xunxun1982 at gmail dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tobias.hunger at digia dot com @ 2013-05-17 10:09 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15412

Tobias Hunger <tobias.hunger at digia dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tobias.hunger at digia dot
                   |                            |com

--- Comment #1 from Tobias Hunger <tobias.hunger at digia dot com> 2013-05-17 10:09:22 UTC ---
I see the same issue debugging C++ applications using GDB 7.6 with Qt Creator. 

Getting a list of local variables and their values after hitting a breakpoint
takes at least 10s where it is almost instantaneous in GDB 7.5.

This time can increase dramatically (> 2 min!) with the complexity of the code
containing the breakpoint.

GDB 7.6 is not usable in this setup, I had to revert back to GDB 7.5. I would
seriously consider raising the importance of this regression.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug symtab/15412] Performance regression in "info {func,var,types} foo" (mostly info types).
  2013-04-27 21:34 [Bug symtab/15412] New: Performance regression in "info {func,var,types} foo" (mostly info types) dje at google dot com
  2013-05-17 10:09 ` [Bug symtab/15412] " tobias.hunger at digia dot com
@ 2013-05-19 13:50 ` xunxun1982 at gmail dot com
  2013-05-24 13:49 ` asmwarrior at gmail dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: xunxun1982 at gmail dot com @ 2013-05-19 13:50 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15412

xunxun <xunxun1982 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xunxun1982 at gmail dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug symtab/15412] Performance regression in "info {func,var,types} foo" (mostly info types).
  2013-04-27 21:34 [Bug symtab/15412] New: Performance regression in "info {func,var,types} foo" (mostly info types) dje at google dot com
  2013-05-17 10:09 ` [Bug symtab/15412] " tobias.hunger at digia dot com
  2013-05-19 13:50 ` xunxun1982 at gmail dot com
@ 2013-05-24 13:49 ` asmwarrior at gmail dot com
  2013-05-24 14:33 ` asmwarrior at gmail dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: asmwarrior at gmail dot com @ 2013-05-24 13:49 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15412

asmwarrior <asmwarrior at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |asmwarrior at gmail dot com

--- Comment #2 from asmwarrior <asmwarrior at gmail dot com> 2013-05-24 13:49:03 UTC ---
I see the same regression here under MinGW GDB CVS 2013-05-24, when I try to
run the command "ptype wxEvent", then GDB goes to hang/loop for a long time(I
just kill it), but for a GDB cvs build 2012-08-17, the response is less than a
second.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug symtab/15412] Performance regression in "info {func,var,types} foo" (mostly info types).
  2013-04-27 21:34 [Bug symtab/15412] New: Performance regression in "info {func,var,types} foo" (mostly info types) dje at google dot com
                   ` (2 preceding siblings ...)
  2013-05-24 13:49 ` asmwarrior at gmail dot com
@ 2013-05-24 14:33 ` asmwarrior at gmail dot com
  2013-05-29 12:23 ` andre.poenitz at digia dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: asmwarrior at gmail dot com @ 2013-05-24 14:33 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15412

--- Comment #3 from asmwarrior <asmwarrior at gmail dot com> 2013-05-24 14:33:41 UTC ---
As DJE said, the workaround looks like below:
 gdb/typeprint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index 4e70593..6e62922 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -62,7 +62,7 @@ const struct type_print_options type_print_raw_options =

 static struct type_print_options default_ptype_flags =
 {
-  0,                /* raw */
+  1,                /* raw */
   1,                /* print_methods */
   1,                /* print_typedefs */
   NULL,                /* local_typedefs */

Adding a command like below should be better I think:
"show print type raw"
"set print type raw"

We have already "set print type method" and "set print type typedef"

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug symtab/15412] Performance regression in "info {func,var,types} foo" (mostly info types).
  2013-04-27 21:34 [Bug symtab/15412] New: Performance regression in "info {func,var,types} foo" (mostly info types) dje at google dot com
                   ` (3 preceding siblings ...)
  2013-05-24 14:33 ` asmwarrior at gmail dot com
@ 2013-05-29 12:23 ` andre.poenitz at digia dot com
  2013-06-05  4:52 ` flq at live dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: andre.poenitz at digia dot com @ 2013-05-29 12:23 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15412

Andre Poenitz <andre.poenitz at digia dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andre.poenitz at digia dot com

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


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

* [Bug symtab/15412] Performance regression in "info {func,var,types} foo" (mostly info types).
  2013-04-27 21:34 [Bug symtab/15412] New: Performance regression in "info {func,var,types} foo" (mostly info types) dje at google dot com
                   ` (4 preceding siblings ...)
  2013-05-29 12:23 ` andre.poenitz at digia dot com
@ 2013-06-05  4:52 ` flq at live dot com
  2014-01-25 21:02 ` altsysrq at gmail dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: flq at live dot com @ 2013-06-05  4:52 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15412

Linqing Feng <flq at live dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |flq at live dot com

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


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

* [Bug symtab/15412] Performance regression in "info {func,var,types} foo" (mostly info types).
  2013-04-27 21:34 [Bug symtab/15412] New: Performance regression in "info {func,var,types} foo" (mostly info types) dje at google dot com
                   ` (5 preceding siblings ...)
  2013-06-05  4:52 ` flq at live dot com
@ 2014-01-25 21:02 ` altsysrq at gmail dot com
  2014-06-16  1:39 ` asmwarrior at gmail dot com
  2015-02-21 14:27 ` dje at google dot com
  8 siblings, 0 replies; 10+ messages in thread
From: altsysrq at gmail dot com @ 2014-01-25 21:02 UTC (permalink / raw)
  To: gdb-prs

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

Vladimir Rutsky <altsysrq at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |altsysrq at gmail dot com

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


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

* [Bug symtab/15412] Performance regression in "info {func,var,types} foo" (mostly info types).
  2013-04-27 21:34 [Bug symtab/15412] New: Performance regression in "info {func,var,types} foo" (mostly info types) dje at google dot com
                   ` (6 preceding siblings ...)
  2014-01-25 21:02 ` altsysrq at gmail dot com
@ 2014-06-16  1:39 ` asmwarrior at gmail dot com
  2015-02-21 14:27 ` dje at google dot com
  8 siblings, 0 replies; 10+ messages in thread
From: asmwarrior at gmail dot com @ 2014-06-16  1:39 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 from asmwarrior <asmwarrior at gmail dot com> ---
Some test result: GDB GIT HEAD 7.7.50.20140611-cvs(with python enabled, but
without the hack patch of comment 3). When debugging a large Codeblocks project
with debug wxWidgets library. "ptype wxEvent" returned instantly, and "info
types wxEvent" takes about 60 seconds. But compared with my comment 2, it looks
like the performance has improved.

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


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

* [Bug symtab/15412] Performance regression in "info {func,var,types} foo" (mostly info types).
  2013-04-27 21:34 [Bug symtab/15412] New: Performance regression in "info {func,var,types} foo" (mostly info types) dje at google dot com
                   ` (7 preceding siblings ...)
  2014-06-16  1:39 ` asmwarrior at gmail dot com
@ 2015-02-21 14:27 ` dje at google dot com
  8 siblings, 0 replies; 10+ messages in thread
From: dje at google dot com @ 2015-02-21 14:27 UTC (permalink / raw)
  To: gdb-prs

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

dje at google dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |performance

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


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

end of thread, other threads:[~2015-02-20 23:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-27 21:34 [Bug symtab/15412] New: Performance regression in "info {func,var,types} foo" (mostly info types) dje at google dot com
2013-05-17 10:09 ` [Bug symtab/15412] " tobias.hunger at digia dot com
2013-05-19 13:50 ` xunxun1982 at gmail dot com
2013-05-24 13:49 ` asmwarrior at gmail dot com
2013-05-24 14:33 ` asmwarrior at gmail dot com
2013-05-29 12:23 ` andre.poenitz at digia dot com
2013-06-05  4:52 ` flq at live dot com
2014-01-25 21:02 ` altsysrq at gmail dot com
2014-06-16  1:39 ` asmwarrior at gmail dot com
2015-02-21 14:27 ` dje at google dot com

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).