llvm.org GIT mirror llvm / 4387550
[DWARF parser] Respect address ranges specified in compile unit DIE. When address ranges for compile unit are specified in compile unit DIE itself, there is no need to collect ranges from children subprogram DIEs. This change speeds up llvm-symbolizer on Clang-produced binaries with full debug info. For instance, symbolizing a first address in a 1Gb binary is now 2x faster (1s vs. 2s). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206641 91177308-0d34-0410-b5e6-96231b3b80d8 Alexey Samsonov 6 years ago
1 changed file(s) with 7 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
298298 }
299299
300300 void DWARFUnit::collectAddressRanges(DWARFAddressRangesVector &CURanges) {
301 // First, check if CU DIE describes address ranges for the unit.
302 const auto &CUDIERanges = getCompileUnitDIE()->getAddressRanges(this);
303 if (!CUDIERanges.empty()) {
304 CURanges.insert(CURanges.end(), CUDIERanges.begin(), CUDIERanges.end());
305 return;
306 }
307
301308 // This function is usually called if there in no .debug_aranges section
302309 // in order to produce a compile unit level set of address ranges that
303310 // is accurate. If the DIEs weren't parsed, then we don't want all dies for