public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/14125] New: Performance issue with .gdb_index and large numbers of shared libs
@ 2012-05-20 14:50 dje at google dot com
  2012-05-20 14:58 ` [Bug symtab/14125] " dje at google dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dje at google dot com @ 2012-05-20 14:50 UTC (permalink / raw)
  To: gdb-prs

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

             Bug #: 14125
           Summary: Performance issue with .gdb_index and large numbers of
                    shared libs
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
        AssignedTo: unassigned@sourceware.org
        ReportedBy: dje@google.com
    Classification: Unclassified


When .gdb_index is in use there isn't a bit that specifies GLOBAL_BLOCK vs
STATIC_BLOCK, so if something is in STATIC_BLOCK (say "int") it matches so gdb
will expand the symbol table, but the match doesn't take into account the block
kind. So gdb will proceed to expand one symbol table from every objfile looking
for "int" in GLOBAL_BLOCK, finding it, but not using it.
Only after that is done will GDB try STATIC_BLOCK.
In a large enough app (e.g., >1000 shared libs) this is painful.

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

* [Bug symtab/14125] Performance issue with .gdb_index and large numbers of shared libs
  2012-05-20 14:50 [Bug symtab/14125] New: Performance issue with .gdb_index and large numbers of shared libs dje at google dot com
@ 2012-05-20 14:58 ` dje at google dot com
  2012-05-21  1:20 ` dje at google dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dje at google dot com @ 2012-05-20 14:58 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from dje at google dot com 2012-05-20 14:57:41 UTC ---
For this my plan is to indicate in the index whether a symbol is in
GLOBAL_BLOCK or STATIC_BLOCK.

Another thing that I've been wondering about is adding an indication of whether
a symbol is a type, function, variable, etc.  IIRC there's a performance issue
where that would help (I need to try to find it - IWBN to only change the index
format once).

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

* [Bug symtab/14125] Performance issue with .gdb_index and large numbers of shared libs
  2012-05-20 14:50 [Bug symtab/14125] New: Performance issue with .gdb_index and large numbers of shared libs dje at google dot com
  2012-05-20 14:58 ` [Bug symtab/14125] " dje at google dot com
@ 2012-05-21  1:20 ` dje at google dot com
  2012-05-21  1:21 ` dje at google dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dje at google dot com @ 2012-05-21  1:20 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from dje at google dot com 2012-05-21 01:19:57 UTC ---
Hmmm,

write_psymbols:

      /* We only want to add a given psymbol once.  However, we also            
         want to account for whether it is global or static.  So, we            
         may add it twice, using slightly different values.  */
      if (is_static)
        {
          uintptr_t val = 1 | (uintptr_t) *psymp;

          lookup = (void *) val;
        }
      else
        lookup = *psymp;

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

* [Bug symtab/14125] Performance issue with .gdb_index and large numbers of shared libs
  2012-05-20 14:50 [Bug symtab/14125] New: Performance issue with .gdb_index and large numbers of shared libs dje at google dot com
  2012-05-20 14:58 ` [Bug symtab/14125] " dje at google dot com
  2012-05-21  1:20 ` dje at google dot com
@ 2012-05-21  1:21 ` dje at google dot com
  2012-06-23 22:24 ` cvs-commit at gcc dot gnu.org
  2012-06-23 22:27 ` dje at google dot com
  4 siblings, 0 replies; 6+ messages in thread
From: dje at google dot com @ 2012-05-21  1:21 UTC (permalink / raw)
  To: gdb-prs

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

dje at google dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at sourceware    |dje at google dot com
                   |dot org                     |

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

* [Bug symtab/14125] Performance issue with .gdb_index and large numbers of shared libs
  2012-05-20 14:50 [Bug symtab/14125] New: Performance issue with .gdb_index and large numbers of shared libs dje at google dot com
                   ` (2 preceding siblings ...)
  2012-05-21  1:21 ` dje at google dot com
@ 2012-06-23 22:24 ` cvs-commit at gcc dot gnu.org
  2012-06-23 22:27 ` dje at google dot com
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2012-06-23 22:24 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2012-06-23 22:23:53 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    devans@sourceware.org    2012-06-23 22:23:48

Modified files:
    gdb            : ChangeLog NEWS dwarf2read.c 
    gdb/doc        : ChangeLog gdb.texinfo 

Log message:
    PR 14125
    * NEWS: Document additions to .gdb_index.
    * dwarf2read.c: #include "gdb/gdb-index.h".
    (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): New macro.
    (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): New macro.
    (DW2_GDB_INDEX_CU_SET_VALUE): New macro.
    (dwarf2_read_index): Recognize version 7.
    (dw2_do_expand_symtabs_matching): New args want_specific_block,
    block_kind, domain): All callers updated.
    (dw2_find_symbol_file): Handle new index CU values.
    (dw2_expand_symtabs_matching): Match symbol kind if requested.
    (add_index_entry): New args is_static, kind.  All callers updated.
    (offset_type_compare, uniquify_cu_indices): New functions
    (symbol_kind): New function.
    (write_psymtabs_to_index): Remove duplicate CU values.
    (write_psymtabs_to_index): Write .gdb_index version 7.

    doc/
    * gdb.texinfo (Index Section Format): Document version 7 format.

    include/gdb/
    * gdb-index.h: New file.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.14390&r2=1.14391
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/NEWS.diff?cvsroot=src&r1=1.527&r2=1.528
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/dwarf2read.c.diff?cvsroot=src&r1=1.665&r2=1.666
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/ChangeLog.diff?cvsroot=src&r1=1.1333&r2=1.1334
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/gdb.texinfo.diff?cvsroot=src&r1=1.978&r2=1.979

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

* [Bug symtab/14125] Performance issue with .gdb_index and large numbers of shared libs
  2012-05-20 14:50 [Bug symtab/14125] New: Performance issue with .gdb_index and large numbers of shared libs dje at google dot com
                   ` (3 preceding siblings ...)
  2012-06-23 22:24 ` cvs-commit at gcc dot gnu.org
@ 2012-06-23 22:27 ` dje at google dot com
  4 siblings, 0 replies; 6+ messages in thread
From: dje at google dot com @ 2012-06-23 22:27 UTC (permalink / raw)
  To: gdb-prs

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

dje at google dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from dje at google dot com 2012-06-23 22:27:05 UTC ---
Patch committed.

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

end of thread, other threads:[~2012-06-23 22:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-20 14:50 [Bug symtab/14125] New: Performance issue with .gdb_index and large numbers of shared libs dje at google dot com
2012-05-20 14:58 ` [Bug symtab/14125] " dje at google dot com
2012-05-21  1:20 ` dje at google dot com
2012-05-21  1:21 ` dje at google dot com
2012-06-23 22:24 ` cvs-commit at gcc dot gnu.org
2012-06-23 22: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).