[PATCH] D71070: [llvm-dwarfdump][Statistics] Don't count coverage less than 1% as 0%

Kristina Bessonova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 5 09:38:01 PST 2019


krisb created this revision.
krisb added reviewers: djtodoro, aprantl, dblaikie, avl.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is a follow up for D70548 <https://reviews.llvm.org/D70548>.
Currently, variables with debug info coverage between 0% and 1% are put into
zero-bucket. D70548 <https://reviews.llvm.org/D70548> changed the way statistics calculate a variable's coverage:
we began to use enclosing scope rather than a possible variable life range.
Thus more variables might be moved to zero-bucket despite they have some debug
info coverage.
The patch is to distinguish between a variable that has location info but
it's significantly less than its enclosing scope and a variable that doesn't
have it at all.

The patch also changed the 'name' of the second bucket from '1-9%' to '>0-9%',
but the new 'name' doesn't look good to me, so suggestions are highly appreciated.

I didn't add a test cause I believe it is not really necessary here.
And it should contain some large code to represent variables with coverage
less than 1%. Please, let me know if a test is needed.

The patch is based on D70548 <https://reviews.llvm.org/D70548>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71070

Files:
  llvm/test/tools/llvm-dwarfdump/X86/locstats.ll
  llvm/test/tools/llvm-locstats/locstats.ll
  llvm/tools/llvm-dwarfdump/Statistics.cpp
  llvm/utils/llvm-locstats/llvm-locstats.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71070.232369.patch
Type: text/x-patch
Size: 6333 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191205/94cc453c/attachment.bin>


More information about the llvm-commits mailing list