[PATCH] D49659: [gcov] Fix wrong line hit counts when multiple blocks are on the same line
calixte via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 23 02:18:35 PDT 2018
calixte created this revision.
calixte added a reviewer: marco-c.
Herald added a subscriber: llvm-commits.
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.
Repository:
rL LLVM
https://reviews.llvm.org/D49659
Files:
include/llvm/ProfileData/GCOV.h
lib/ProfileData/GCOV.cpp
test/tools/llvm-cov/Inputs/test_-a.cpp.gcov
test/tools/llvm-cov/Inputs/test_-a.h.gcov
test/tools/llvm-cov/Inputs/test_-a_-b.cpp.gcov
test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov
test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.cpp.gcov
test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.h.gcov
test/tools/llvm-cov/Inputs/test_-a_-b_-u.cpp.gcov
test/tools/llvm-cov/Inputs/test_-a_-b_-u.h.gcov
test/tools/llvm-cov/Inputs/test_missing.cpp.gcov
test/tools/llvm-cov/Inputs/test_no_options.cpp.gcov
test/tools/llvm-cov/Inputs/test_objdir.cpp.gcov
test/tools/llvm-cov/Inputs/test_paths.cpp.gcov
test/tools/llvm-cov/range_based_for.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49659.156727.patch
Type: text/x-patch
Size: 16197 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180723/ff32549b/attachment.bin>
More information about the llvm-commits
mailing list