This is an archive of the discontinued LLVM Phabricator instance.

Improve check for ASAN callbacks
ClosedPublic

Authored by tberghammer on Jul 21 2015, 3:07 AM.

Details

Summary

Improve check for ASAN callbacks

The ASAN callbacks are public symbols so we can search for them
with reading only the symbol table (not the debug info). Whit this
change the attach time for a big executable with debug symbols
decreased by a factor of ~4 on Linux.

Diff Detail

Event Timeline

tberghammer retitled this revision from to Improve check for ASAN callbacks.
tberghammer updated this object.
tberghammer added a reviewer: kubamracek.
tberghammer added a subscriber: lldb-commits.
kubamracek edited edge metadata.Jul 21 2015, 4:54 AM

Nice improvement. Looks good to me, but please let Jason or Enrico review this as well.

Friendly ping

Note: The ~4x speed improvement in attach time will be spent in the later stage of the debugging if we have to parse the full dwarf info

Did you try just turning "include_inlines" to false? If we are just looking up a name and not looking for inlines we shouldn't have to go grubbing in the debug information.

I tried it, but it isn't help. Module::FindFunctions always parses the dwraf info for some reason (I haven't investigated why). Also I think "__asan_get_alloc_stack" is the name of a symbol so FindSymbol is the right function to call here.

sas accepted this revision.Aug 10 2015, 11:33 AM
sas added a reviewer: sas.
sas added a subscriber: sas.

Looks pretty good.

This revision is now accepted and ready to land.Aug 10 2015, 11:33 AM
This revision was automatically updated to reflect the committed changes.