worst case symbol lookup performance

J.T. Conklin jtc@redback.com
Thu Aug 12 13:45:00 GMT 1999


>>>>> "Jim" == Jim Blandy <jimb@cygnus.com> writes:
Jim> How many object files do you have?  That is, how many entries are
Jim> there in your objfile's psymtab list?  I don't see why lookup_symbol
Jim> should be calling lookup_partial_symbol once per symbol.  Twice per
Jim> psymtab, yes.

We have ~1100 object files, with ~19,000 symbols.  

Note that my complaint was against worst case lookup performance
(looking up non-existant symbols).  write_dollar_variable() will
currently lookup all the gdb internal variables (whether this is
desirable on non HPUX/HPPA systems is another question) which 
will never be found.

Before I removed that lookup, my show process script took 135 seconds
to execute.  After, it still took 25 seconds, with the bulk of the
time spent in symbol lookups.

83.2      21.04    21.04   554112     0.04     0.04  _lookup_partial_symbol [7]
13.1      24.36     3.32      523     6.35     6.40  _lookup_minimal_symbol [14]
 1.0      24.61     0.25      470     0.53    52.88  _lookup_symbol [6]
 0.6      24.75     0.14   249133     0.00     0.00  _strrchr [20]
 0.5      24.88     0.13      209     0.62     1.29  _lookup_partial_symtab [19]

Still pretty pathetic in my book.

        --jtc

-- 
J.T. Conklin
RedBack Networks


More information about the Gdb mailing list