5e0c178fe6
If the top-level function cannot be found, we previously assumed an invocation count of 1. This is wrong when we expect the invocation counts to be reset for precise coverage. TBR=jgruber@chromium.org R=caseq@chromium.org,pfeldman@chromium.org BUG=v8:5808 Review-Url: https://codereview.chromium.org/2723003007 Cr-Commit-Position: refs/heads/master@{#43620}
386 lines
11 KiB
Plaintext
386 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 : 0
|
|
endColumnNumber : 1
|
|
endLineNumber : 4
|
|
startColumnNumber : 0
|
|
startLineNumber : 1
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url : 0
|
|
}
|
|
]
|
|
}
|
|
}
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : [
|
|
[0] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName : fib
|
|
ranges : [
|
|
[0] : {
|
|
count : 0
|
|
endColumnNumber : 1
|
|
endLineNumber : 4
|
|
startColumnNumber : 0
|
|
startLineNumber : 1
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url : 0
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
Running test: testPreciseCoverage
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
}
|
|
}
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : [
|
|
[0] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName :
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endColumnNumber : 0
|
|
endLineNumber : 9
|
|
startColumnNumber : 0
|
|
startLineNumber : 0
|
|
}
|
|
]
|
|
}
|
|
[1] : {
|
|
functionName : fib
|
|
ranges : [
|
|
[0] : {
|
|
count : 15
|
|
endColumnNumber : 1
|
|
endLineNumber : 4
|
|
startColumnNumber : 0
|
|
startLineNumber : 1
|
|
}
|
|
]
|
|
}
|
|
[2] : {
|
|
functionName : iife
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endColumnNumber : 1
|
|
endLineNumber : 7
|
|
startColumnNumber : 1
|
|
startLineNumber : 5
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url : 1
|
|
}
|
|
[1] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName :
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endColumnNumber : 11
|
|
endLineNumber : 0
|
|
startColumnNumber : 0
|
|
startLineNumber : 0
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url :
|
|
}
|
|
]
|
|
}
|
|
}
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : [
|
|
[0] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName :
|
|
ranges : [
|
|
[0] : {
|
|
count : 0
|
|
endColumnNumber : 0
|
|
endLineNumber : 9
|
|
startColumnNumber : 0
|
|
startLineNumber : 0
|
|
}
|
|
]
|
|
}
|
|
[1] : {
|
|
functionName : fib
|
|
ranges : [
|
|
[0] : {
|
|
count : 0
|
|
endColumnNumber : 1
|
|
endLineNumber : 4
|
|
startColumnNumber : 0
|
|
startLineNumber : 1
|
|
}
|
|
]
|
|
}
|
|
[2] : {
|
|
functionName : iife
|
|
ranges : [
|
|
[0] : {
|
|
count : 0
|
|
endColumnNumber : 1
|
|
endLineNumber : 7
|
|
startColumnNumber : 1
|
|
startLineNumber : 5
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url : 1
|
|
}
|
|
[1] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName :
|
|
ranges : [
|
|
[0] : {
|
|
count : 0
|
|
endColumnNumber : 11
|
|
endLineNumber : 0
|
|
startColumnNumber : 0
|
|
startLineNumber : 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
|
|
endColumnNumber : 0
|
|
endLineNumber : 9
|
|
startColumnNumber : 0
|
|
startLineNumber : 0
|
|
}
|
|
]
|
|
}
|
|
[1] : {
|
|
functionName : fib
|
|
ranges : [
|
|
[0] : {
|
|
count : 15
|
|
endColumnNumber : 1
|
|
endLineNumber : 4
|
|
startColumnNumber : 0
|
|
startLineNumber : 1
|
|
}
|
|
]
|
|
}
|
|
[2] : {
|
|
functionName : iife
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endColumnNumber : 1
|
|
endLineNumber : 7
|
|
startColumnNumber : 1
|
|
startLineNumber : 5
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url : 4
|
|
}
|
|
[1] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName :
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endColumnNumber : 11
|
|
endLineNumber : 0
|
|
startColumnNumber : 0
|
|
startLineNumber : 0
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url :
|
|
}
|
|
]
|
|
}
|
|
}
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : [
|
|
[0] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName :
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endColumnNumber : 0
|
|
endLineNumber : 9
|
|
startColumnNumber : 0
|
|
startLineNumber : 0
|
|
}
|
|
]
|
|
}
|
|
[1] : {
|
|
functionName : fib
|
|
ranges : [
|
|
[0] : {
|
|
count : 15
|
|
endColumnNumber : 1
|
|
endLineNumber : 4
|
|
startColumnNumber : 0
|
|
startLineNumber : 1
|
|
}
|
|
]
|
|
}
|
|
[2] : {
|
|
functionName : iife
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endColumnNumber : 1
|
|
endLineNumber : 7
|
|
startColumnNumber : 1
|
|
startLineNumber : 5
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url : 4
|
|
}
|
|
[1] : {
|
|
functions : [
|
|
[0] : {
|
|
functionName :
|
|
ranges : [
|
|
[0] : {
|
|
count : 1
|
|
endColumnNumber : 11
|
|
endLineNumber : 0
|
|
startColumnNumber : 0
|
|
startLineNumber : 0
|
|
}
|
|
]
|
|
}
|
|
]
|
|
scriptId : <scriptId>
|
|
url :
|
|
}
|
|
]
|
|
}
|
|
}
|