<div dir="ltr">I'm fixing the tests to avoid such a situation in the future.<br></div><br><div class="gmail_quote"><div dir="ltr">Le mar. 25 sept. 2018 à 11:51, Calixte Denizet <<a href="mailto:cdenizet@mozilla.com">cdenizet@mozilla.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">In looking at the logs it seems that number of Runs is wrong. It should be fixed in removing directory ./projects/compiler-rt/test/profile/Profile-x86_64/Output/.</div><div>I've the same issue locally, when a test in test/profile is failing I need to update the test and rm this dir else the Runs is wrong.</div><div><br></div><div>C<br></div></div><br><div class="gmail_quote"><div dir="ltr">Le lun. 24 sept. 2018 à 23:41, Vitaly Buka <<a href="mailto:vitalybuka@google.com" target="_blank">vitalybuka@google.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">Ping. I'd like to revert this patch to fix the bot.<div><br></div><div><a href="http://lab.llvm.org:8011/builders/clang-ppc64le-linux-lnt/builds/14504" target="_blank">http://lab.llvm.org:8011/builders/clang-ppc64le-linux-lnt/builds/14504</a><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Sep 21, 2018 at 11:44 AM Evgenii Stepanov via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>since this patch, gcov tests are failing on ppc64 bot:</div><div><a href="http://lab.llvm.org:8011/builders/clang-ppc64le-linux-lnt?numbuilds=200" target="_blank">http://lab.llvm.org:8011/builders/clang-ppc64le-linux-lnt?numbuilds=200</a><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 20, 2018 at 9:09 AM, Calixte Denizet via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: calixte<br>
Date: Thu Sep 20 09:09:30 2018<br>
New Revision: 342657<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=342657&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=342657&view=rev</a><br>
Log:<br>
[gcov] Fix wrong line hit counts when multiple blocks are on the same line<br>
<br>
Summary:<br>
The goal of this patch is to have the same behaviour than gcc-gcov.<br>
Currently the hit counts for a line is the sum of the counts for each block on that line.<br>
The idea is to detect the cycles in the graph of blocks in using the algorithm by Hawick & James.<br>
The count for a cycle is the min of the counts for each edge in the cycle.<br>
Once we've the count for each cycle, we can sum them and add the transition counts of those cycles.<br>
<br>
Fix both <a href="https://bugs.llvm.org/show_bug.cgi?id=38065" rel="noreferrer" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=38065</a> and <a href="https://bugs.llvm.org/show_bug.cgi?id=38066" rel="noreferrer" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=38066</a><br>
<br>
Reviewers: marco-c, davidxl<br>
<br>
Reviewed By: marco-c<br>
<br>
Subscribers: vsk, lebedev.ri, sylvestre.ledru, dblaikie, llvm-commits<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D49659" rel="noreferrer" target="_blank">https://reviews.llvm.org/D49659</a><br>
<br>
Modified:<br>
llvm/trunk/include/llvm/ProfileData/GCOV.h<br>
llvm/trunk/lib/ProfileData/GCOV.cpp<br>
llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.cpp.gcov<br>
llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.h.gcov<br>
llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.cpp.gcov<br>
llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov<br>
llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.cpp.gcov<br>
llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.h.gcov<br>
llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.cpp.gcov<br>
llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.h.gcov<br>
llvm/trunk/test/tools/llvm-cov/Inputs/test_missing.cpp.gcov<br>
llvm/trunk/test/tools/llvm-cov/Inputs/test_no_options.cpp.gcov<br>
llvm/trunk/test/tools/llvm-cov/Inputs/test_objdir.cpp.gcov<br>
llvm/trunk/test/tools/llvm-cov/Inputs/test_paths.cpp.gcov<br>
llvm/trunk/test/tools/llvm-cov/range_based_for.cpp<br>
<br>
Modified: llvm/trunk/include/llvm/ProfileData/GCOV.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/GCOV.h?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/GCOV.h?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ProfileData/GCOV.h (original)<br>
+++ llvm/trunk/include/llvm/ProfileData/GCOV.h Thu Sep 20 09:09:30 2018<br>
@@ -24,9 +24,11 @@<br>
#include "llvm/ADT/iterator_range.h"<br>
#include "llvm/Support/MemoryBuffer.h"<br>
#include "llvm/Support/raw_ostream.h"<br>
+#include <algorithm><br>
#include <cassert><br>
#include <cstddef><br>
#include <cstdint><br>
+#include <limits><br>
#include <memory><br>
#include <string><br>
#include <utility><br>
@@ -266,13 +268,14 @@ struct GCOVEdge {<br>
GCOVBlock &Src;<br>
GCOVBlock &Dst;<br>
uint64_t Count = 0;<br>
+ uint64_t CyclesCount = 0;<br>
};<br>
<br>
/// GCOVFunction - Collects function information.<br>
class GCOVFunction {<br>
public:<br>
- using BlockIterator = pointee_iterator<SmallVectorImpl<<br>
- std::unique_ptr<GCOVBlock>>::const_iterator>;<br>
+ using BlockIterator = pointee_iterator<<br>
+ SmallVectorImpl<std::unique_ptr<GCOVBlock>>::const_iterator>;<br>
<br>
GCOVFunction(GCOVFile &P) : Parent(P) {}<br>
<br>
@@ -322,6 +325,9 @@ class GCOVBlock {<br>
<br>
public:<br>
using EdgeIterator = SmallVectorImpl<GCOVEdge *>::const_iterator;<br>
+ using BlockVector = SmallVector<const GCOVBlock *, 4>;<br>
+ using BlockVectorLists = SmallVector<BlockVector, 4>;<br>
+ using Edges = SmallVector<GCOVEdge *, 4>;<br>
<br>
GCOVBlock(GCOVFunction &P, uint32_t N) : Parent(P), Number(N) {}<br>
~GCOVBlock();<br>
@@ -365,6 +371,16 @@ public:<br>
void dump() const;<br>
void collectLineCounts(FileInfo &FI);<br>
<br>
+ static uint64_t getCycleCount(const Edges &Path);<br>
+ static void unblock(const GCOVBlock *U, BlockVector &Blocked,<br>
+ BlockVectorLists &BlockLists);<br>
+ static bool lookForCircuit(const GCOVBlock *V, const GCOVBlock *Start,<br>
+ Edges &Path, BlockVector &Blocked,<br>
+ BlockVectorLists &BlockLists,<br>
+ const BlockVector &Blocks, uint64_t &Count);<br>
+ static void getCyclesCount(const BlockVector &Blocks, uint64_t &Count);<br>
+ static uint64_t getLineCount(const BlockVector &Blocks);<br>
+<br>
private:<br>
GCOVFunction &Parent;<br>
uint32_t Number;<br>
<br>
Modified: llvm/trunk/lib/ProfileData/GCOV.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/GCOV.cpp?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/GCOV.cpp?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ProfileData/GCOV.cpp (original)<br>
+++ llvm/trunk/lib/ProfileData/GCOV.cpp Thu Sep 20 09:09:30 2018<br>
@@ -111,9 +111,7 @@ void GCOVFile::print(raw_ostream &OS) co<br>
<br>
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)<br>
/// dump - Dump GCOVFile content to dbgs() for debugging purposes.<br>
-LLVM_DUMP_METHOD void GCOVFile::dump() const {<br>
- print(dbgs());<br>
-}<br>
+LLVM_DUMP_METHOD void GCOVFile::dump() const { print(dbgs()); }<br>
#endif<br>
<br>
/// collectLineCounts - Collect line counts. This must be used after<br>
@@ -359,9 +357,7 @@ void GCOVFunction::print(raw_ostream &OS<br>
<br>
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)<br>
/// dump - Dump GCOVFunction content to dbgs() for debugging purposes.<br>
-LLVM_DUMP_METHOD void GCOVFunction::dump() const {<br>
- print(dbgs());<br>
-}<br>
+LLVM_DUMP_METHOD void GCOVFunction::dump() const { print(dbgs()); }<br>
#endif<br>
<br>
/// collectLineCounts - Collect line counts. This must be used after<br>
@@ -437,12 +433,135 @@ void GCOVBlock::print(raw_ostream &OS) c<br>
<br>
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)<br>
/// dump - Dump GCOVBlock content to dbgs() for debugging purposes.<br>
-LLVM_DUMP_METHOD void GCOVBlock::dump() const {<br>
- print(dbgs());<br>
-}<br>
+LLVM_DUMP_METHOD void GCOVBlock::dump() const { print(dbgs()); }<br>
#endif<br>
<br>
//===----------------------------------------------------------------------===//<br>
+// Cycles detection<br>
+//<br>
+// The algorithm in GCC is based on the algorihtm by Hawick & James:<br>
+// "Enumerating Circuits and Loops in Graphs with Self-Arcs and Multiple-Arcs"<br>
+// <a href="http://complexity.massey.ac.nz/cstn/013/cstn-013.pdf" rel="noreferrer" target="_blank">http://complexity.massey.ac.nz/cstn/013/cstn-013.pdf</a>.<br>
+<br>
+/// Get the count for the detected cycle.<br>
+uint64_t GCOVBlock::getCycleCount(const Edges &Path) {<br>
+ uint64_t CycleCount = std::numeric_limits<uint64_t>::max();<br>
+ for (auto E : Path) {<br>
+ CycleCount = std::min(E->CyclesCount, CycleCount);<br>
+ }<br>
+ for (auto E : Path) {<br>
+ E->CyclesCount -= CycleCount;<br>
+ }<br>
+ return CycleCount;<br>
+}<br>
+<br>
+/// Unblock a vertex previously marked as blocked.<br>
+void GCOVBlock::unblock(const GCOVBlock *U, BlockVector &Blocked,<br>
+ BlockVectorLists &BlockLists) {<br>
+ auto it = find(Blocked, U);<br>
+ if (it == Blocked.end()) {<br>
+ return;<br>
+ }<br>
+<br>
+ const size_t index = it - Blocked.begin();<br>
+ Blocked.erase(it);<br>
+<br>
+ const BlockVector ToUnblock(BlockLists[index]);<br>
+ BlockLists.erase(BlockLists.begin() + index);<br>
+ for (auto GB : ToUnblock) {<br>
+ GCOVBlock::unblock(GB, Blocked, BlockLists);<br>
+ }<br>
+}<br>
+<br>
+bool GCOVBlock::lookForCircuit(const GCOVBlock *V, const GCOVBlock *Start,<br>
+ Edges &Path, BlockVector &Blocked,<br>
+ BlockVectorLists &BlockLists,<br>
+ const BlockVector &Blocks, uint64_t &Count) {<br>
+ Blocked.push_back(V);<br>
+ BlockLists.emplace_back(BlockVector());<br>
+ bool FoundCircuit = false;<br>
+<br>
+ for (auto E : V->dsts()) {<br>
+ const GCOVBlock *W = &E->Dst;<br>
+ if (W < Start || find(Blocks, W) == Blocks.end()) {<br>
+ continue;<br>
+ }<br>
+<br>
+ Path.push_back(E);<br>
+<br>
+ if (W == Start) {<br>
+ // We've a cycle.<br>
+ Count += GCOVBlock::getCycleCount(Path);<br>
+ FoundCircuit = true;<br>
+ } else if (find(Blocked, W) == Blocked.end() && // W is not blocked.<br>
+ GCOVBlock::lookForCircuit(W, Start, Path, Blocked, BlockLists,<br>
+ Blocks, Count)) {<br>
+ FoundCircuit = true;<br>
+ }<br>
+<br>
+ Path.pop_back();<br>
+ }<br>
+<br>
+ if (FoundCircuit) {<br>
+ GCOVBlock::unblock(V, Blocked, BlockLists);<br>
+ } else {<br>
+ for (auto E : V->dsts()) {<br>
+ const GCOVBlock *W = &E->Dst;<br>
+ if (W < Start || find(Blocks, W) == Blocks.end()) {<br>
+ continue;<br>
+ }<br>
+ const size_t index = find(Blocked, W) - Blocked.begin();<br>
+ BlockVector &List = BlockLists[index];<br>
+ if (find(List, V) == List.end()) {<br>
+ List.push_back(V);<br>
+ }<br>
+ }<br>
+ }<br>
+<br>
+ return FoundCircuit;<br>
+}<br>
+<br>
+/// Get the count for the list of blocks which lie on the same line.<br>
+void GCOVBlock::getCyclesCount(const BlockVector &Blocks, uint64_t &Count) {<br>
+ for (auto Block : Blocks) {<br>
+ Edges Path;<br>
+ BlockVector Blocked;<br>
+ BlockVectorLists BlockLists;<br>
+<br>
+ GCOVBlock::lookForCircuit(Block, Block, Path, Blocked, BlockLists, Blocks,<br>
+ Count);<br>
+ }<br>
+}<br>
+<br>
+/// Get the count for the list of blocks which lie on the same line.<br>
+uint64_t GCOVBlock::getLineCount(const BlockVector &Blocks) {<br>
+ uint64_t Count = 0;<br>
+<br>
+ for (auto Block : Blocks) {<br>
+ if (Block->getNumSrcEdges() == 0) {<br>
+ // The block has no predecessors and a non-null counter<br>
+ // (can be the case with entry block in functions).<br>
+ Count += Block->getCount();<br>
+ } else {<br>
+ // Add counts from predecessors that are not on the same line.<br>
+ for (auto E : Block->srcs()) {<br>
+ const GCOVBlock *W = &E->Src;<br>
+ if (find(Blocks, W) == Blocks.end()) {<br>
+ Count += E->Count;<br>
+ }<br>
+ }<br>
+ }<br>
+ for (auto E : Block->dsts()) {<br>
+ E->CyclesCount = E->Count;<br>
+ }<br>
+ }<br>
+<br>
+ GCOVBlock::getCyclesCount(Blocks, Count);<br>
+<br>
+ return Count;<br>
+}<br>
+<br>
+//===----------------------------------------------------------------------===//<br>
// FileInfo implementation.<br>
<br>
// Safe integer division, returns 0 if numerator is 0.<br>
@@ -578,8 +697,8 @@ FileInfo::openCoveragePath(StringRef Cov<br>
return llvm::make_unique<raw_null_ostream>();<br>
<br>
std::error_code EC;<br>
- auto OS = llvm::make_unique<raw_fd_ostream>(CoveragePath, EC,<br>
- sys::fs::F_Text);<br>
+ auto OS =<br>
+ llvm::make_unique<raw_fd_ostream>(CoveragePath, EC, sys::fs::F_Text);<br>
if (EC) {<br>
errs() << EC.message() << "\n";<br>
return llvm::make_unique<raw_null_ostream>();<br>
@@ -628,17 +747,7 @@ void FileInfo::print(raw_ostream &InfoOS<br>
<br>
// Add up the block counts to form line counts.<br>
DenseMap<const GCOVFunction *, bool> LineExecs;<br>
- uint64_t LineCount = 0;<br>
for (const GCOVBlock *Block : Blocks) {<br>
- if (Options.AllBlocks) {<br>
- // Only take the highest block count for that line.<br>
- uint64_t BlockCount = Block->getCount();<br>
- LineCount = LineCount > BlockCount ? LineCount : BlockCount;<br>
- } else {<br>
- // Sum up all of the block counts.<br>
- LineCount += Block->getCount();<br>
- }<br>
-<br>
if (Options.FuncCoverage) {<br>
// This is a slightly convoluted way to most accurately gather line<br>
// statistics for functions. Basically what is happening is that we<br>
@@ -674,6 +783,7 @@ void FileInfo::print(raw_ostream &InfoOS<br>
}<br>
}<br>
<br>
+ const uint64_t LineCount = GCOVBlock::getLineCount(Blocks);<br>
if (LineCount == 0)<br>
CovOS << " #####:";<br>
else {<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.cpp.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.cpp.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.cpp.gcov Thu Sep 20 09:09:30 2018<br>
@@ -49,7 +49,7 @@<br>
4: 34-block 0<br>
12: 34-block 1<br>
8: 34-block 2<br>
- 8: 35: assign(ii, jj);<br>
+ 12: 35: assign(ii, jj);<br>
8: 35-block 0<br>
4: 35-block 1<br>
2: 36:}<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.h.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.h.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.h.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.h.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.h.gcov Thu Sep 20 09:09:30 2018<br>
@@ -3,7 +3,7 @@<br>
-: 0:Data:test.gcda<br>
-: 0:Runs:2<br>
-: 0:Programs:1<br>
- 2: 1:struct A {<br>
+ 4: 1:struct A {<br>
2: 1-block 0<br>
2: 1-block 1<br>
-: 2: virtual void B();<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.cpp.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.cpp.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.cpp.gcov Thu Sep 20 09:09:30 2018<br>
@@ -60,7 +60,7 @@ branch 1 taken 33%<br>
branch 0 taken 67%<br>
branch 1 taken 33%<br>
8: 34-block 2<br>
- 8: 35: assign(ii, jj);<br>
+ 12: 35: assign(ii, jj);<br>
8: 35-block 0<br>
4: 35-block 1<br>
2: 36:}<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov Thu Sep 20 09:09:30 2018<br>
@@ -5,7 +5,7 @@<br>
-: 0:Programs:1<br>
function _ZN1AC1Ev called 2 returned 100% blocks executed 100%<br>
function _ZN1AC2Ev called 2 returned 100% blocks executed 100%<br>
- 2: 1:struct A {<br>
+ 4: 1:struct A {<br>
2: 1-block 0<br>
2: 1-block 1<br>
-: 2: virtual void B();<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.cpp.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.cpp.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.cpp.gcov Thu Sep 20 09:09:30 2018<br>
@@ -70,7 +70,7 @@ branch 1 taken 8<br>
branch 2 taken 4<br>
8: 34-block 2<br>
unconditional 3 taken 8<br>
- 8: 35: assign(ii, jj);<br>
+ 12: 35: assign(ii, jj);<br>
8: 35-block 0<br>
unconditional 0 taken 8<br>
4: 35-block 1<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.h.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.h.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.h.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.h.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.h.gcov Thu Sep 20 09:09:30 2018<br>
@@ -5,7 +5,7 @@<br>
-: 0:Programs:1<br>
function _ZN1AC1Ev called 2 returned 100% blocks executed 100%<br>
function _ZN1AC2Ev called 2 returned 100% blocks executed 100%<br>
- 2: 1:struct A {<br>
+ 4: 1:struct A {<br>
2: 1-block 0<br>
unconditional 0 taken 2<br>
2: 1-block 1<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.cpp.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.cpp.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.cpp.gcov Thu Sep 20 09:09:30 2018<br>
@@ -70,7 +70,7 @@ branch 1 taken 67%<br>
branch 2 taken 33%<br>
8: 34-block 2<br>
unconditional 3 taken 100%<br>
- 8: 35: assign(ii, jj);<br>
+ 12: 35: assign(ii, jj);<br>
8: 35-block 0<br>
unconditional 0 taken 100%<br>
4: 35-block 1<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.h.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.h.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.h.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.h.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.h.gcov Thu Sep 20 09:09:30 2018<br>
@@ -5,7 +5,7 @@<br>
-: 0:Programs:1<br>
function _ZN1AC1Ev called 2 returned 100% blocks executed 100%<br>
function _ZN1AC2Ev called 2 returned 100% blocks executed 100%<br>
- 2: 1:struct A {<br>
+ 4: 1:struct A {<br>
2: 1-block 0<br>
unconditional 0 taken 100%<br>
2: 1-block 1<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_missing.cpp.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_missing.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_missing.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_missing.cpp.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_missing.cpp.gcov Thu Sep 20 09:09:30 2018<br>
@@ -35,8 +35,8 @@<br>
12: 30:/*EOF*/<br>
-: 31:/*EOF*/<br>
-: 32:/*EOF*/<br>
- 21: 33:/*EOF*/<br>
- 36: 34:/*EOF*/<br>
+ 9: 33:/*EOF*/<br>
+ 18: 34:/*EOF*/<br>
18: 35:/*EOF*/<br>
3: 36:/*EOF*/<br>
-: 37:/*EOF*/<br>
@@ -53,7 +53,7 @@<br>
#####: 48:/*EOF*/<br>
-: 49:/*EOF*/<br>
-: 50:/*EOF*/<br>
- 66: 51:/*EOF*/<br>
+ 33: 51:/*EOF*/<br>
30: 52:/*EOF*/<br>
-: 53:/*EOF*/<br>
6: 54:/*EOF*/<br>
@@ -71,7 +71,7 @@<br>
30: 66:/*EOF*/<br>
-: 67:/*EOF*/<br>
3: 68:/*EOF*/<br>
-25769803782: 69:/*EOF*/<br>
+12884901891: 69:/*EOF*/<br>
12884901888: 70:/*EOF*/<br>
-: 71:/*EOF*/<br>
3: 72:/*EOF*/<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_no_options.cpp.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_no_options.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_no_options.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_no_options.cpp.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_no_options.cpp.gcov Thu Sep 20 09:09:30 2018<br>
@@ -35,8 +35,8 @@<br>
8: 30:}<br>
-: 31:<br>
-: 32:void initialize_grid() {<br>
- 12: 33: for (int ii = 0; ii < 2; ii++)<br>
- 24: 34: for (int jj = 0; jj < 2; jj++)<br>
+ 6: 33: for (int ii = 0; ii < 2; ii++)<br>
+ 12: 34: for (int jj = 0; jj < 2; jj++)<br>
12: 35: assign(ii, jj);<br>
2: 36:}<br>
-: 37:<br>
@@ -53,7 +53,7 @@<br>
#####: 48: a += rand();<br>
-: 49: }<br>
-: 50:<br>
- 44: 51: for (int ii = 0; ii < 10; ++ii) {<br>
+ 22: 51: for (int ii = 0; ii < 10; ++ii) {<br>
20: 52: switch (rand() % 5) {<br>
-: 53: case 0:<br>
4: 54: a += rand();<br>
@@ -71,7 +71,7 @@<br>
20: 66: }<br>
-: 67:<br>
2: 68: A thing;<br>
-17179869188: 69: for (uint64_t ii = 0; ii < 4294967296; ++ii)<br>
+8589934594: 69: for (uint64_t ii = 0; ii < 4294967296; ++ii)<br>
8589934592: 70: thing.B();<br>
-: 71:<br>
2: 72: return a + 8 + grid[2][3] + len;<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_objdir.cpp.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_objdir.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_objdir.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_objdir.cpp.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_objdir.cpp.gcov Thu Sep 20 09:09:30 2018<br>
@@ -35,8 +35,8 @@<br>
8: 30:}<br>
-: 31:<br>
-: 32:void initialize_grid() {<br>
- 12: 33: for (int ii = 0; ii < 2; ii++)<br>
- 24: 34: for (int jj = 0; jj < 2; jj++)<br>
+ 6: 33: for (int ii = 0; ii < 2; ii++)<br>
+ 12: 34: for (int jj = 0; jj < 2; jj++)<br>
12: 35: assign(ii, jj);<br>
2: 36:}<br>
-: 37:<br>
@@ -53,7 +53,7 @@<br>
#####: 48: a += rand();<br>
-: 49: }<br>
-: 50:<br>
- 44: 51: for (int ii = 0; ii < 10; ++ii) {<br>
+ 22: 51: for (int ii = 0; ii < 10; ++ii) {<br>
20: 52: switch (rand() % 5) {<br>
-: 53: case 0:<br>
4: 54: a += rand();<br>
@@ -71,7 +71,7 @@<br>
20: 66: }<br>
-: 67:<br>
2: 68: A thing;<br>
-17179869188: 69: for (uint64_t ii = 0; ii < 4294967296; ++ii)<br>
+8589934594: 69: for (uint64_t ii = 0; ii < 4294967296; ++ii)<br>
8589934592: 70: thing.B();<br>
-: 71:<br>
2: 72: return a + 8 + grid[2][3] + len;<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_paths.cpp.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_paths.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_paths.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_paths.cpp.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_paths.cpp.gcov Thu Sep 20 09:09:30 2018<br>
@@ -35,8 +35,8 @@<br>
12: 30:}<br>
-: 31:<br>
-: 32:void initialize_grid() {<br>
- 21: 33: for (int ii = 0; ii < 2; ii++)<br>
- 36: 34: for (int jj = 0; jj < 2; jj++)<br>
+ 9: 33: for (int ii = 0; ii < 2; ii++)<br>
+ 18: 34: for (int jj = 0; jj < 2; jj++)<br>
18: 35: assign(ii, jj);<br>
3: 36:}<br>
-: 37:<br>
@@ -53,7 +53,7 @@<br>
#####: 48: a += rand();<br>
-: 49: }<br>
-: 50:<br>
- 66: 51: for (int ii = 0; ii < 10; ++ii) {<br>
+ 33: 51: for (int ii = 0; ii < 10; ++ii) {<br>
30: 52: switch (rand() % 5) {<br>
-: 53: case 0:<br>
6: 54: a += rand();<br>
@@ -71,7 +71,7 @@<br>
30: 66: }<br>
-: 67:<br>
3: 68: A thing;<br>
-25769803782: 69: for (uint64_t ii = 0; ii < 4294967296; ++ii)<br>
+12884901891: 69: for (uint64_t ii = 0; ii < 4294967296; ++ii)<br>
12884901888: 70: thing.B();<br>
-: 71:<br>
3: 72: return a + 8 + grid[2][3] + len;<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/range_based_for.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/range_based_for.cpp?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/range_based_for.cpp?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/range_based_for.cpp (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/range_based_for.cpp Thu Sep 20 09:09:30 2018<br>
@@ -20,7 +20,7 @@<br>
<br>
int main(int argc, const char *argv[]) { // GCOV: 1: [[@LINE]]:int main(<br>
int V[] = {1, 2}; // GCOV: 1: [[@LINE]]: int V[]<br>
- for (int &I : V) { // GCOV: 10: [[@LINE]]: for (<br>
+ for (int &I : V) { // GCOV: 5: [[@LINE]]: for (<br>
} // GCOV: 2: [[@LINE]]: }<br>
return 0; // GCOV: 1: [[@LINE]]: return<br>
} // GCOV: -: [[@LINE]]:}<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>