diff options
| author | Kristina Bessonova <kbessonova@accesssoftek.com> | 2019-11-19 13:28:21 +0300 |
|---|---|---|
| committer | Kristina Bessonova <kbessonova@accesssoftek.com> | 2019-12-08 15:46:49 +0300 |
| commit | 68f464ac2ef5de8cb2e8beaeee43c435c536539e (patch) | |
| tree | 208497fed8cee60aebac645bf2c0cafde70a63e2 /llvm/test/tools/llvm-dwarfdump/X86 | |
| parent | 792fab343ba9029dd155f3ae5da30e12ed518c8a (diff) | |
| download | bcm5719-llvm-68f464ac2ef5de8cb2e8beaeee43c435c536539e.tar.gz bcm5719-llvm-68f464ac2ef5de8cb2e8beaeee43c435c536539e.zip | |
[llvm-dwarfdump][Statistics] Unify coverage statistic computation
Summary:
The patch removes OffsetToFirstDefinition in the 'scope bytes total'
statistic computation. Thus it unifies the way the scope and the coverage
buckets are computed. The rationals behind that are the following:
1. OffsetToFirstDefinition was used to calculate the variable's life range.
However, there is no simple way to do it accurately, so the scope calculated
this way might be misleading. See D69027 for more details on the subject.
2. Both 'scope bytes total' and coverage buckets seem to be intended
to represent the same data in different ways. Otherwise, the statistics
might be controversial and confusing.
Note that the approach gives up a thorough evaluation of debug information
completeness (i.e. coverage buckets by themselves doesn't tell how good
the debug information is). Only changes in coverage over time make
a 'physical' sense.
Reviewers: djtodoro, aprantl, vsk, dblaikie, avl
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70548
Diffstat (limited to 'llvm/test/tools/llvm-dwarfdump/X86')
5 files changed, 9 insertions, 9 deletions
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/locstats.ll b/llvm/test/tools/llvm-dwarfdump/X86/locstats.ll index 89119326780..e13d1b71278 100644 --- a/llvm/test/tools/llvm-dwarfdump/X86/locstats.ll +++ b/llvm/test/tools/llvm-dwarfdump/X86/locstats.ll @@ -5,7 +5,7 @@ ; CHECK: "formal params scope bytes total":20 ; CHECK: "formal params scope bytes covered":20 ; CHECK: "formal params entry value scope bytes covered":5 -; CHECK: "vars scope bytes total":78 +; CHECK: "vars scope bytes total":90 ; CHECK: "vars scope bytes covered":60 ; CHECK: "vars entry value scope bytes covered":0 ; CHECK: "total variables procesed by location statistics":6 diff --git a/llvm/test/tools/llvm-dwarfdump/X86/statistics-base-address.s b/llvm/test/tools/llvm-dwarfdump/X86/statistics-base-address.s index 9d6b762c726..1a933f5a099 100644 --- a/llvm/test/tools/llvm-dwarfdump/X86/statistics-base-address.s +++ b/llvm/test/tools/llvm-dwarfdump/X86/statistics-base-address.s @@ -5,7 +5,7 @@ # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj -o %t # RUN: llvm-dwarfdump --statistics %t | FileCheck %s -# CHECK: "vars scope bytes total":8 +# CHECK: "vars scope bytes total":12 # CHECK: "vars scope bytes covered":8 .text diff --git a/llvm/test/tools/llvm-dwarfdump/X86/statistics-dwo.test b/llvm/test/tools/llvm-dwarfdump/X86/statistics-dwo.test index 6f9c5ee8dbb..1ca1503f4e7 100644 --- a/llvm/test/tools/llvm-dwarfdump/X86/statistics-dwo.test +++ b/llvm/test/tools/llvm-dwarfdump/X86/statistics-dwo.test @@ -1,5 +1,5 @@ # Test of the llmv-dwarfdump --statistics with split dwarf (dwo files) -# (version 3). +# (version >= 3). # # Create a directory in which to put all files, so .o file can find .dwo file. RUN: rm -rf %t && mkdir -p %t @@ -69,7 +69,7 @@ RUN: llvm-dwarfdump --statistics statistics-fib.split-dwarf.o | FileCheck %s # } # -CHECK: "version":3 +CHECK: "version":4 CHECK: "source functions":3 CHECK: "source functions with location":3 CHECK: "inlined functions":7 @@ -80,7 +80,7 @@ CHECK: "source variables":30 # Ideally the value below would be 33 but currently it's not. CHECK: "variables with location":22 CHECK: "call site entries":7 -CHECK: "scope bytes total":2702 +CHECK: "scope bytes total":2817 CHECK: "scope bytes covered":1160 CHECK: "total function size":594 CHECK: "total inlined function size":345 diff --git a/llvm/test/tools/llvm-dwarfdump/X86/statistics-v3.test b/llvm/test/tools/llvm-dwarfdump/X86/statistics-v3.test index 4b9d2f215cc..a16ae8c30ce 100644 --- a/llvm/test/tools/llvm-dwarfdump/X86/statistics-v3.test +++ b/llvm/test/tools/llvm-dwarfdump/X86/statistics-v3.test @@ -1,4 +1,4 @@ -# Test of the llmv-dwarfdump --statistics newly added stats (version 3). +# Test of the llmv-dwarfdump --statistics newly added stats (version >= 3). # RUN: llvm-mc -triple x86_64-unknown-linux-gnu %S/Inputs/statistics-fib.s -filetype=obj -o %t-statistics-fib.o RUN: llvm-dwarfdump --statistics %t-statistics-fib.o | FileCheck %s @@ -64,7 +64,7 @@ RUN: llvm-dwarfdump --statistics %t-statistics-fib.o | FileCheck %s # } # -CHECK: "version":3 +CHECK: "version":4 CHECK: "source functions":3 CHECK: "source functions with location":3 CHECK: "inlined functions":8 @@ -75,7 +75,7 @@ CHECK: "source variables":33 # Ideally the value below would be 33 but currently it's not. CHECK: "variables with location":24 CHECK: "call site entries":8 -CHECK: "scope bytes total":2958 +CHECK: "scope bytes total":3072 CHECK: "scope bytes covered":1188 CHECK: "total function size":636 CHECK: "total inlined function size":388 diff --git a/llvm/test/tools/llvm-dwarfdump/X86/statistics.ll b/llvm/test/tools/llvm-dwarfdump/X86/statistics.ll index 221ef6022f2..f8d9326ff8e 100644 --- a/llvm/test/tools/llvm-dwarfdump/X86/statistics.ll +++ b/llvm/test/tools/llvm-dwarfdump/X86/statistics.ll @@ -1,6 +1,6 @@ ; RUN: llc -O0 %s -o - -filetype=obj \ ; RUN: | llvm-dwarfdump -statistics - | FileCheck %s -; CHECK: "version":3 +; CHECK: "version":4 ; int GlobalConst = 42; ; int Global; |

