Commit 6cd99b38 authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

[coverage] clear call counts for precise coverage.

This is so that precise coverage starts with a clean slate.
The old behavior can be emulated by calling getBestEffortCoverage
before starting precise coverage.

R=jgruber@chromium.org

Bug: chromium:757998
Change-Id: Ib3ee2316966f676456198159bdcf8ba8b9d3896f
Reviewed-on: https://chromium-review.googlesource.com/635084
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47629}
parent e2ebb2be
...@@ -544,6 +544,7 @@ void Coverage::SelectMode(Isolate* isolate, debug::Coverage::Mode mode) { ...@@ -544,6 +544,7 @@ void Coverage::SelectMode(Isolate* isolate, debug::Coverage::Mode mode) {
FeedbackVector* vector = FeedbackVector::cast(current_obj); FeedbackVector* vector = FeedbackVector::cast(current_obj);
SharedFunctionInfo* shared = vector->shared_function_info(); SharedFunctionInfo* shared = vector->shared_function_info();
if (!shared->IsSubjectToDebugging()) continue; if (!shared->IsSubjectToDebugging()) continue;
vector->clear_invocation_count();
vectors.emplace_back(vector, isolate); vectors.emplace_back(vector, isolate);
} }
} }
......
...@@ -5,23 +5,6 @@ Running test: testPreciseCountBaseline ...@@ -5,23 +5,6 @@ Running test: testPreciseCountBaseline
id : <messageId> id : <messageId>
result : { result : {
result : [ result : [
[0] : {
functions : [
[0] : {
functionName : fib
isBlockCoverage : false
ranges : [
[0] : {
count : 15
endOffset : 73
startOffset : 1
}
]
}
]
scriptId : <scriptId>
url : testPreciseCountBaseline
}
] ]
} }
} }
...@@ -736,56 +719,6 @@ Running test: testEnablePreciseCountCoverageAtPause ...@@ -736,56 +719,6 @@ Running test: testEnablePreciseCountCoverageAtPause
result : { result : {
result : [ result : [
[0] : { [0] : {
functions : [
[0] : {
functionName :
isBlockCoverage : false
ranges : [
[0] : {
count : 1
endOffset : 114
startOffset : 0
}
]
}
[1] : {
functionName : g
isBlockCoverage : false
ranges : [
[0] : {
count : 1
endOffset : 29
startOffset : 1
}
]
}
[2] : {
functionName : f
isBlockCoverage : false
ranges : [
[0] : {
count : 4
endOffset : 83
startOffset : 30
}
]
}
[3] : {
functionName : h
isBlockCoverage : false
ranges : [
[0] : {
count : 0
endOffset : 107
startOffset : 84
}
]
}
]
scriptId : <scriptId>
url : testEnablePreciseCountCoverageAtPause
}
[1] : {
functions : [ functions : [
[0] : { [0] : {
functionName : functionName :
......
...@@ -5,23 +5,6 @@ Running test: testPreciseCountBaseline ...@@ -5,23 +5,6 @@ Running test: testPreciseCountBaseline
id : <messageId> id : <messageId>
result : { result : {
result : [ result : [
[0] : {
functions : [
[0] : {
functionName : fib
isBlockCoverage : false
ranges : [
[0] : {
count : 15
endOffset : 73
startOffset : 1
}
]
}
]
scriptId : <scriptId>
url : testPreciseCountBaseline
}
] ]
} }
} }
...@@ -505,56 +488,6 @@ Running test: testEnablePreciseCountCoverageAtPause ...@@ -505,56 +488,6 @@ Running test: testEnablePreciseCountCoverageAtPause
result : { result : {
result : [ result : [
[0] : { [0] : {
functions : [
[0] : {
functionName :
isBlockCoverage : false
ranges : [
[0] : {
count : 1
endOffset : 114
startOffset : 0
}
]
}
[1] : {
functionName : g
isBlockCoverage : false
ranges : [
[0] : {
count : 1
endOffset : 29
startOffset : 1
}
]
}
[2] : {
functionName : f
isBlockCoverage : false
ranges : [
[0] : {
count : 4
endOffset : 83
startOffset : 30
}
]
}
[3] : {
functionName : h
isBlockCoverage : false
ranges : [
[0] : {
count : 0
endOffset : 107
startOffset : 84
}
]
}
]
scriptId : <scriptId>
url : testEnablePreciseCountCoverageAtPause
}
[1] : {
functions : [ functions : [
[0] : { [0] : {
functionName : functionName :
......
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