This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: worst case symbol lookup performance



   From: jtc@redback.com (J.T. Conklin)
   Date: 10 Aug 1999 08:41:20 -0700

   It appears that write_dollar_variable() calls lookup_symbol() in order
   to expand HPUX/HPPA millicode functions ($$dyncall, etc.).  In my run,
   write_dollar_variable() called lookup_symbol() ~1000 times, which in
   turn called lookup_partial_symbol ~2,000,000 times (we have ~20,000
   symbols in our system).  But since the $ variables use in my script
   will never be found in the symbol tables, I'm encountering worst case
   behavior for each lookup.

Yow!  I'm pretty sure we shouldn't be looking for millicode functions
on anything besides HPUX native. :-)  At the very least, the bit of
code should be conditionalized to not affect anybody else.

   I'm not familiar with the symbol handling portions of GDB, so I'm
   looking for ideas.  Removing the symbol lookups from write_dollar_-
   variable() significantly improves performance, but doesn't solve the
   underlying problem.

Presumably you get a ~8 times speedup by removing the symbol lookup.
What does profiling say is the most expensive operation now?
Srikanth, did you ever look at this issue?

								Stan

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]