public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/17604] New: Stop demangling ELF symbols, at least by default when we have DWARF
@ 2014-11-14 23:59 dje at google dot com
  2014-11-15  0:02 ` [Bug symtab/17604] " dje at google dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dje at google dot com @ 2014-11-14 23:59 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 17604
           Summary: Stop demangling ELF symbols, at least by default when
                    we have DWARF
           Product: gdb
           Version: 7.8
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: dje at google dot com

PR 17603 made me want to try an experiment of measuring gdb startup time on my
monster benchmark if we stop demangling ELF symbols.

I did a quick experiment, but the data is promising.

In the past I've measured 12 seconds of the 13 seconds of gdb startup time
being due to reading ELF symbols (measured by just #if 0-ing out the code to
read them).

If I #if 0 out the code to generate and store demangled copies of ELF symbols
then the 13 seconds goes down to 2.5 seconds.

Nice.

So maybe we can generate demangled copies of ELF symbols lazily.

One question I'd like to see answered is under what conditions do we *need*
demangled ELF symbols *when* we have DWARF.

Having demangled copies of ELF symbols can hide bugs in reading DWARF.
E.g., PR 17602.

I'm filing this separately from 17603 as this PR addresses the performance of
reading ELF symbols.  PR 17603 addresses the related issue where usage of
minsyms hides bugs in the DWARF reader.

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


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

* [Bug symtab/17604] Stop demangling ELF symbols, at least by default when we have DWARF
  2014-11-14 23:59 [Bug symtab/17604] New: Stop demangling ELF symbols, at least by default when we have DWARF dje at google dot com
@ 2014-11-15  0:02 ` dje at google dot com
  2014-11-15  0:10 ` dje at google dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dje at google dot com @ 2014-11-15  0:02 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from dje at google dot com ---
See PR 12707 for further discussion.

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


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

* [Bug symtab/17604] Stop demangling ELF symbols, at least by default when we have DWARF
  2014-11-14 23:59 [Bug symtab/17604] New: Stop demangling ELF symbols, at least by default when we have DWARF dje at google dot com
  2014-11-15  0:02 ` [Bug symtab/17604] " dje at google dot com
@ 2014-11-15  0:10 ` dje at google dot com
  2014-11-18 15:17 ` gbenson at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dje at google dot com @ 2014-11-15  0:10 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from dje at google dot com ---
Re: when do we need ELF symbols:
A program could be linked with a mix of -g and -g0 code, which we still want to
support.

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


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

* [Bug symtab/17604] Stop demangling ELF symbols, at least by default when we have DWARF
  2014-11-14 23:59 [Bug symtab/17604] New: Stop demangling ELF symbols, at least by default when we have DWARF dje at google dot com
  2014-11-15  0:02 ` [Bug symtab/17604] " dje at google dot com
  2014-11-15  0:10 ` dje at google dot com
@ 2014-11-18 15:17 ` gbenson at redhat dot com
  2014-11-19 19:48 ` dje at google dot com
  2015-06-19 16:50 ` dje at google dot com
  4 siblings, 0 replies; 6+ messages in thread
From: gbenson at redhat dot com @ 2014-11-18 15:17 UTC (permalink / raw)
  To: gdb-prs

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

Gary Benson <gbenson at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gbenson at redhat dot com

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


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

* [Bug symtab/17604] Stop demangling ELF symbols, at least by default when we have DWARF
  2014-11-14 23:59 [Bug symtab/17604] New: Stop demangling ELF symbols, at least by default when we have DWARF dje at google dot com
                   ` (2 preceding siblings ...)
  2014-11-18 15:17 ` gbenson at redhat dot com
@ 2014-11-19 19:48 ` dje at google dot com
  2015-06-19 16:50 ` dje at google dot com
  4 siblings, 0 replies; 6+ messages in thread
From: dje at google dot com @ 2014-11-19 19:48 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from dje at google dot com ---
Additional data.
The memory measurement used here is just gdb's internal one, which uses the brk
line, so take into account fairly large error bars here.
Still, I think the numbers are educational.

With my standard monster benchmark:

Without demangled ELF syms:

(gdb) mt set per on
(gdb) file foo
[...]
Command execution time: 2.530785 (cpu), 3.364821 (wall)
Space used: 241299456 (+237711360 for this command)
#symtabs: 5695 (+5695), #primary symtabs: 86 (+86), #blocks: 1061 (+1061)

With demangled ELF syms:

(gdb) mt set per on
(gdb) file foo
[...]
Command execution time: 11.107160 (cpu), 11.104109 (wall)
Space used: 722186240 (+718598144 for this command)
#symtabs: 5695 (+5695), #primary symtabs: 86 (+86), #blocks: 1061 (+1061)

-> ~480MB increase

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


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

* [Bug symtab/17604] Stop demangling ELF symbols, at least by default when we have DWARF
  2014-11-14 23:59 [Bug symtab/17604] New: Stop demangling ELF symbols, at least by default when we have DWARF dje at google dot com
                   ` (3 preceding siblings ...)
  2014-11-19 19:48 ` dje at google dot com
@ 2015-06-19 16:50 ` dje at google dot com
  4 siblings, 0 replies; 6+ messages in thread
From: dje at google dot com @ 2015-06-19 16:50 UTC (permalink / raw)
  To: gdb-prs

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

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] 6+ messages in thread

end of thread, other threads:[~2015-06-19 16:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-14 23:59 [Bug symtab/17604] New: Stop demangling ELF symbols, at least by default when we have DWARF dje at google dot com
2014-11-15  0:02 ` [Bug symtab/17604] " dje at google dot com
2014-11-15  0:10 ` dje at google dot com
2014-11-18 15:17 ` gbenson at redhat dot com
2014-11-19 19:48 ` dje at google dot com
2015-06-19 16:50 ` 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).