Thanks Jakob:
I'll give this a try and add any additional information I find to the bug 
report.

On Wednesday, September 21, 2022 at 2:27:24 AM UTC-4 [email protected] 
wrote:

> Hi Cecil,
>
> it's hard to say much without a repro. I'd start by trying the V8 flag 
> --trace-block-coverage (
> https://source.chromium.org/chromium/chromium/src/+/main:v8/src/debug/debug-coverage.cc;l=481;drc=5f2ed43ac6add2683505e130be73826cbb3dddfd).
>  
> If that doesn't help, the next step would be to debug more around 
> Coverage::Collect. 
>
> Also, I'd suggest to file a report at crbug.com/v8/new to continue the 
> conversation since bug reports are easier to track than mails :)
>
> On Tue, Sep 20, 2022 at 9:39 PM 'Cecil King' via v8-dev <
> [email protected]> wrote:
>
>> Hello.
>>
>> My first post here. I'm looking for advice on debugging an issue with the 
>> v8 code coverage.
>>
>> I'm using startPreciseCoverage / takePreciseCoverage to extract code 
>> coverage data from Chrome (i.e. v8).
>>
>> My issue: data from uncovered functions are missing from the dumped data.
>> For example, assume the handleSubmit function in authors.js is not 
>> called. I expect to see this:
>> {
>>     "scriptId": "16",
>>     "url": 
>> "file:///home/<user>/v8-chrome-coverage-wdio-sync/public/js/authors.js",
>>     "functions": [
>>         {
>>             "functionName": "",
>>             "ranges": [{ "startOffset": 0, "endOffset": 828, "count": 1 
>> }],
>>             "isBlockCoverage": true },
>>         {
>>             "functionName": "showContent",
>>             "ranges": [{ "startOffset": 71, "endOffset": 448, "count": 1 
>> }],
>>             "isBlockCoverage": true
>>         },
>>         {
>>             "functionName": "",
>>             "ranges": [{ "startOffset": 274, "endOffset": 444, "count": 3 
>> }],
>>             "isBlockCoverage": true
>>         },
>>         {
>>             "functionName": "handleSubmit",
>>             "ranges": [{ "startOffset": 450, "endOffset": 703, "count": 0 
>> }],
>>             "isBlockCoverage": false
>>         }
>>     ]
>> }, 
>>
>> but instead I get this:
>> {
>>     "scriptId": "16",
>>     "url": 
>> "file:///home/<user>/v8-chrome-coverage-wdio-sync/public/js/authors.js",
>>     "functions": [
>>         {
>>             "functionName": "",
>>             "ranges": [{ "startOffset": 0, "endOffset": 828, "count": 1 
>> }],
>>             "isBlockCoverage": true },
>>         {
>>             "functionName": "showContent",
>>             "ranges": [{ "startOffset": 71, "endOffset": 448, "count": 1 
>> }],
>>             "isBlockCoverage": true
>>         },
>>         {
>>             "functionName": "",
>>             "ranges": [{ "startOffset": 274, "endOffset": 444, "count": 3 
>> }],
>>             "isBlockCoverage": true
>>         }
>>     ]
>> }, 
>>
>> i.e. there is no data at all on the uncovered function. This causes the c8 
>> report tool to generate an invalid report.
>>
>> The above is what I observe on my company's codebase. I tried to create 
>> simple reproductions that I could share, however all my simple projects are 
>> working fine.
>>
>> Any suggestions or tips on what I could try to debug the problem would be 
>> appreciated.
>>
>> (FYI ... here's a working version of the flow on a smaller project: 
>> https://github.com/cek333/v8-chrome-coverage-wdio-sync)
>>
>> Thanks.
>>
>> -- 
>> -- 
>> v8-dev mailing list
>> [email protected]
>> http://groups.google.com/group/v8-dev
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "v8-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/v8-dev/22d16033-590f-4de3-86de-a6aa6ebcbb74n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/v8-dev/22d16033-590f-4de3-86de-a6aa6ebcbb74n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/b38cffc1-2011-4b47-8147-67ab7288a255n%40googlegroups.com.

Reply via email to