Commit 88931804 authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

[coverage] clamp to binary before merging.

R=jgruber@chromium.org

Change-Id: Iad6f815d2476c59a498b7f580ec664417e83c675
Reviewed-on: https://chromium-review.googlesource.com/600050
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47197}
parent ee350c31
......@@ -354,6 +354,9 @@ void CollectBlockCoverage(Isolate* isolate, CoverageFunction* function,
function->has_block_coverage = true;
function->blocks = GetSortedBlockData(isolate, info);
// If in binary mode, only report counts of 0/1.
if (mode == debug::Coverage::kBlockBinary) ClampToBinary(function);
// Remove duplicate singleton ranges, keeping the max count.
MergeDuplicateSingletons(function);
......@@ -371,8 +374,6 @@ void CollectBlockCoverage(Isolate* isolate, CoverageFunction* function,
// Filter out ranges of zero length.
FilterEmptyRanges(function);
// If in binary mode, only report counts of 0/1.
if (mode == debug::Coverage::kBlockBinary) ClampToBinary(function);
// Reset all counters on the DebugInfo to zero.
ResetAllBlockCounts(info);
......
......@@ -844,16 +844,6 @@ Running test: testPreciseBinaryCoverage
startOffset : 1
}
[1] : {
count : 1
endOffset : 41
startOffset : 32
}
[2] : {
count : 1
endOffset : 71
startOffset : 41
}
[3] : {
count : 0
endOffset : 72
startOffset : 71
......@@ -938,14 +928,9 @@ Running test: testPreciseBinaryCoverage
startOffset : 1
}
[1] : {
count : 1
endOffset : 41
startOffset : 32
}
[2] : {
count : 1
endOffset : 71
startOffset : 41
startOffset : 32
}
]
}
......
......@@ -633,16 +633,6 @@ Running test: testPreciseBinaryCoverage
startOffset : 1
}
[1] : {
count : 1
endOffset : 41
startOffset : 32
}
[2] : {
count : 1
endOffset : 71
startOffset : 41
}
[3] : {
count : 0
endOffset : 72
startOffset : 71
......@@ -727,14 +717,9 @@ Running test: testPreciseBinaryCoverage
startOffset : 1
}
[1] : {
count : 1
endOffset : 41
startOffset : 32
}
[2] : {
count : 1
endOffset : 71
startOffset : 41
startOffset : 32
}
]
}
......@@ -980,4 +965,4 @@ Running test: testPreciseCountCoveragePartial
}
]
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment