diff options
author | Calixte Denizet <cdenizet@mozilla.com> | 2018-09-20 16:09:30 +0000 |
---|---|---|
committer | Calixte Denizet <cdenizet@mozilla.com> | 2018-09-20 16:09:30 +0000 |
commit | 0b1fe47e22e69f9507ee57aece722969f2e7e695 (patch) | |
tree | a2bf10f618f86039e1378d5766535d9221de6113 /llvm/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov | |
parent | cfa1d499f92d52c2ac2443c52fb77ad2fc64591d (diff) | |
download | bcm5719-llvm-0b1fe47e22e69f9507ee57aece722969f2e7e695.tar.gz bcm5719-llvm-0b1fe47e22e69f9507ee57aece722969f2e7e695.zip |
[gcov] Fix wrong line hit counts when multiple blocks are on the same line
Summary:
The goal of this patch is to have the same behaviour than gcc-gcov.
Currently the hit counts for a line is the sum of the counts for each block on that line.
The idea is to detect the cycles in the graph of blocks in using the algorithm by Hawick & James.
The count for a cycle is the min of the counts for each edge in the cycle.
Once we've the count for each cycle, we can sum them and add the transition counts of those cycles.
Fix both https://bugs.llvm.org/show_bug.cgi?id=38065 and https://bugs.llvm.org/show_bug.cgi?id=38066
Reviewers: marco-c, davidxl
Reviewed By: marco-c
Subscribers: vsk, lebedev.ri, sylvestre.ledru, dblaikie, llvm-commits
Differential Revision: https://reviews.llvm.org/D49659
llvm-svn: 342657
Diffstat (limited to 'llvm/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov')
-rw-r--r-- | llvm/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov b/llvm/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov index f3dabcb727c..d85b56239d1 100644 --- a/llvm/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov +++ b/llvm/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov @@ -5,7 +5,7 @@ -: 0:Programs:1 function _ZN1AC1Ev called 2 returned 100% blocks executed 100% function _ZN1AC2Ev called 2 returned 100% blocks executed 100% - 2: 1:struct A { + 4: 1:struct A { 2: 1-block 0 2: 1-block 1 -: 2: virtual void B(); |