[llvm-dwarfdump][Statistics] Change the coverage buckets representation. NFC
Summary:
This changes the representation of 'coverage buckets' in llvm-dwarfdump and
llvm-locstats to one that makes more clear what the buckets contain.
See some related details in D71070.
Reviewers: djtodoro, aprantl, cmtice, jhenderson
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71366
diff --git a/llvm/utils/llvm-locstats/llvm-locstats.py b/llvm/utils/llvm-locstats/llvm-locstats.py
index 408513c..2bbc3f1 100755
--- a/llvm/utils/llvm-locstats/llvm-locstats.py
+++ b/llvm/utils/llvm-locstats/llvm-locstats.py
@@ -15,9 +15,9 @@
def coverage_buckets():
yield '0%'
- yield '1-9%'
+ yield '[1%,10%)'
for start in range(10, 91, 10):
- yield '{0}-{1}%'.format(start, start + 9)
+ yield '[{0}%,{1}%)'.format(start, start + 10)
yield '100%'
def locstats_output(
@@ -44,10 +44,10 @@
print (' =================================================')
print (' Debug Location Statistics ')
print (' =================================================')
- print (' cov% samples percentage(~) ')
+ print (' cov% samples percentage(~) ')
print (' -------------------------------------------------')
for cov_bucket in coverage_buckets():
- print (' {0:6} {1:8d} {2:3d}%'. \
+ print (' {0:10} {1:8d} {2:3d}%'. \
format(cov_bucket, variables_coverage_map[cov_bucket], \
variables_coverage_per_map[cov_bucket]))
print (' =================================================')