This is the mail archive of the gdb@sources.redhat.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]
Other format: [Raw text]

Symbol lookup performance


parse.c has this bit of code:

  if (SYMBOLS_CAN_START_WITH_DOLLAR)
    {
      struct symbol *sym = NULL;
      struct minimal_symbol *msym = NULL;

      /* On HP-UX, certain system routines (millicode) have names beginning
         with $ or $$, e.g. $$dyncall, which handles inter-space procedure
         calls on PA-RISC. Check for those, first. */

      /* This code is not enabled on non HP-UX systems, since worst case
         symbol table lookup performance is awful, to put it mildly. */

      sym = lookup_symbol (copy_name (str), (struct block *) NULL,
                           VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL);


Is that comment about worst case symbol lookup performance still valid?
Looking at some of list archives it seems like this problem has been
tackled a bit before, and if i'm reading the code right lookup_symbol
uses reasonably efficient algorithms to do the lookup. If so, can we
remove the hppa-only  SYMBOLS_CAN_START_WITH_DOLLAR check?

randolph
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/


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