clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

Symbols are the #1 most expensive item memory wise in LLDB right now. We remove 
many symbols in Mach-O and we set the m_uid of each symbol to the original 
symbol table index. There is a binary search for a symbol by lldb::user_id_t 
that is efficient:

Symbol *
Symtab::FindSymbolByID (lldb::user_id_t symbol_uid) const
{

  Mutex::Locker locker (m_mutex);
  
  Symbol *symbol = (Symbol*)::bsearch (&symbol_uid, 
                                       &m_symbols[0], 
                                       m_symbols.size(), 
                                       sizeof(m_symbols[0]),
                                       CompareSymbolID);
  return symbol;

}

So just make sure to make your symbols have the correct lldb::user_id_t (the 
original symbol table index) and don't add empty useless symbols.


http://reviews.llvm.org/D14536



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to