[llvm-dev] [DebugInfo] The current status of debug values using multiple machine locations

via llvm-dev llvm-dev at lists.llvm.org
Tue Jan 26 12:09:54 PST 2021


> when you say "more variables being emitted to DWARF with 0% coverage" - what do you mean by that? Are we counting a variable with no location attribute as being 100% covered, because it isn't partially covered? Could we instead count such variables as 0% covered?

Not exactly, it's that we aren't considering them at all. If we have 2 variables a​ and b​ with 100% and 50% coverage respectively, we'd have 75% total coverage (assuming they both occupy identically sized scopes). If a new optimization causes us to drop b​'s coverage to 0%, then we would expect the overall coverage to drop to 50%. However, we may end up dropping b​ entirely from the DWARF, in which case the dwarfdump​ statistics see that we only have 1 variable and it has 100% coverage, giving us 100% overall coverage. While it would be accurate to count these missing variables as 0% covered, if there's no mention of them in the DWARF then there is no way for dwarfdump​ to know they exist.

I'm not actually sure what causes variables to be dropped from the DWARF entirely, as opposed to them existing but having an unknown location for their entire scope; however, outside of our desire to use dwarfdump​ to analyze our debug info it's simply more efficient to omit variables with no location, since they inflate the debug info size and I don't believe there's any practical value in having them.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210126/dc0ba619/attachment.html>


More information about the llvm-dev mailing list