[Lldb-commits] [PATCH] D14536: Add empty symbols to symtab for skipped symbols
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 11 10:18:04 PST 2015
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:
Symtab::FindSymbolByID (lldb::user_id_t symbol_uid) const
Mutex::Locker locker (m_mutex);
Symbol *symbol = (Symbol*)::bsearch (&symbol_uid,
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.
More information about the lldb-commits