llvm-project
9e50ddc0 - [lldb] Count the .debug_names fallback index in debugInfoIndexTime (#245086)

Commit
5 days ago
[lldb] Count the .debug_names fallback index in debugInfoIndexTime (#245086) When `.debug_names` does not cover every unit, `DebugNamesDWARFIndex` indexes the remaining units with a `ManualDWARFIndex`. That fallback records its time in its own timer, but `DWARFIndex::GetIndexTime()` and `ResetStatistics()` only use the timer of the index they are called on, and nothing advances the one in `DebugNamesDWARFIndex`. As a result `debugInfoIndexTime` and `totalDebugInfoIndexTime` in `statistics dump` left out the fallback, and a binary that mixes indexed and unindexed units could spend minutes indexing while reporting close to zero. This change makes `DebugNamesDWARFIndex` add its fallback's timer. The test links a unit that has `.debug_names` with one that does not, then checks that the index time is nonzero after a lookup and zero again after `SBTarget::ResetStatistics`.
Author
Parents
Loading