ed93e7c27b
We used to clear invocation counts when enabling precise coverage. This is not necessary, and we could continue to use the existing invocation counts on the heap. The old behavior can be achieved by explicitly resetting the counts by polling coverage data. R=jgruber@chromium.org,caseq@chromium.org BUG=v8:5808 Review-Url: https://codereview.chromium.org/2768453002 Cr-Commit-Position: refs/heads/master@{#43964}
429 lines
11 KiB
Plaintext
429 lines
11 KiB
Plaintext
Test collecting code coverage data with Profiler.collectCoverage.
|
|
|
|
Running test: testPreciseBaseline
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : [
|
|
[0] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName : fib
|
|
ranges : [
|
|
[0] : {
|
|
count : 15
|
|
endOffset : 73
|
|
startOffset : 1
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url : 0
|
|
}
|
|
]
|
|
}
|
|
}
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : [
|
|
[0] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName : fib
|
|
ranges : [
|
|
[0] : {
|
|
count : 0
|
|
endOffset : 73
|
|
startOffset : 1
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url : 0
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
Running test: testPreciseCoverage
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
}
|
|
}
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : [
|
|
[0] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName :
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endOffset : 119
|
|
startOffset : 0
|
|
}
|
|
]
|
|
}
|
|
[1] : {
|
|
functionName : fib
|
|
ranges : [
|
|
[0] : {
|
|
count : 15
|
|
endOffset : 73
|
|
startOffset : 1
|
|
}
|
|
]
|
|
}
|
|
[2] : {
|
|
functionName : iife
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endOffset : 106
|
|
startOffset : 75
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url : 1
|
|
}
|
|
[1] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName :
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endOffset : 11
|
|
startOffset : 0
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url :
|
|
}
|
|
]
|
|
}
|
|
}
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : [
|
|
[0] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName :
|
|
ranges : [
|
|
[0] : {
|
|
count : 0
|
|
endOffset : 119
|
|
startOffset : 0
|
|
}
|
|
]
|
|
}
|
|
[1] : {
|
|
functionName : fib
|
|
ranges : [
|
|
[0] : {
|
|
count : 0
|
|
endOffset : 73
|
|
startOffset : 1
|
|
}
|
|
]
|
|
}
|
|
[2] : {
|
|
functionName : iife
|
|
ranges : [
|
|
[0] : {
|
|
count : 0
|
|
endOffset : 106
|
|
startOffset : 75
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url : 1
|
|
}
|
|
[1] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName :
|
|
ranges : [
|
|
[0] : {
|
|
count : 0
|
|
endOffset : 11
|
|
startOffset : 0
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url :
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
Running test: testPreciseCoverageFail
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : {
|
|
description : 8
|
|
type : number
|
|
value : 8
|
|
}
|
|
}
|
|
}
|
|
{
|
|
error : {
|
|
code : -32000
|
|
message : Precise coverage has not been started.
|
|
}
|
|
id : <messageId>
|
|
}
|
|
|
|
Running test: testBestEffortCoverage
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : {
|
|
description : 8
|
|
type : number
|
|
value : 8
|
|
}
|
|
}
|
|
}
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : [
|
|
]
|
|
}
|
|
}
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : [
|
|
]
|
|
}
|
|
}
|
|
|
|
Running test: testBestEffortCoveragePrecise
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : {
|
|
description : 8
|
|
type : number
|
|
value : 8
|
|
}
|
|
}
|
|
}
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : [
|
|
[0] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName :
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endOffset : 119
|
|
startOffset : 0
|
|
}
|
|
]
|
|
}
|
|
[1] : {
|
|
functionName : fib
|
|
ranges : [
|
|
[0] : {
|
|
count : 15
|
|
endOffset : 73
|
|
startOffset : 1
|
|
}
|
|
]
|
|
}
|
|
[2] : {
|
|
functionName : iife
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endOffset : 106
|
|
startOffset : 75
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url : 4
|
|
}
|
|
[1] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName :
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endOffset : 11
|
|
startOffset : 0
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url :
|
|
}
|
|
]
|
|
}
|
|
}
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : [
|
|
[0] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName :
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endOffset : 119
|
|
startOffset : 0
|
|
}
|
|
]
|
|
}
|
|
[1] : {
|
|
functionName : fib
|
|
ranges : [
|
|
[0] : {
|
|
count : 15
|
|
endOffset : 73
|
|
startOffset : 1
|
|
}
|
|
]
|
|
}
|
|
[2] : {
|
|
functionName : iife
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endOffset : 106
|
|
startOffset : 75
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url : 4
|
|
}
|
|
[1] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName :
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endOffset : 11
|
|
startOffset : 0
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url :
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
Running test: testEnablePreciseCoverageAtPause
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : {
|
|
type : undefined
|
|
}
|
|
}
|
|
}
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : [
|
|
[0] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName :
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endOffset : 114
|
|
startOffset : 0
|
|
}
|
|
]
|
|
}
|
|
[1] : {
|
|
functionName : g
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endOffset : 29
|
|
startOffset : 1
|
|
}
|
|
]
|
|
}
|
|
[2] : {
|
|
functionName : f
|
|
ranges : [
|
|
[0] : {
|
|
count : 4
|
|
endOffset : 83
|
|
startOffset : 30
|
|
}
|
|
]
|
|
}
|
|
[3] : {
|
|
functionName : h
|
|
ranges : [
|
|
[0] : {
|
|
count : 0
|
|
endOffset : 107
|
|
startOffset : 84
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url : 5
|
|
}
|
|
[1] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName :
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endOffset : 11
|
|
startOffset : 0
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url :
|
|
}
|
|
]
|
|
}
|
|
}
|