All *-gen.cc (and torque files for that matter) use the "CodeStubAssembler" or CSA (https://v8.dev/blog/csa). During build time a program called "mksnapshot" runs these *-gen.cc files. They generate some platform specific assembly which in turn is stored in a snapshot. This snapshot is deserialized everytime V8 starts up and contains, among other things, builtins.
As these *-gen.cc files generate code themselves, the term "coverage" becomes ambiguous here. You can either have coverage of *-gen.cc files at build time when "mksnapshot" runs. Or, you can have coverage at runtime for the CSA generated code itself. Getting coverage for mksnapshot should be doable or even work, while coverage for CSA generated code is a whole other topic and currently not (really) implemented. On Saturday, May 18, 2019 at 12:44:30 PM UTC+2, Joe Smith wrote: > > builtins-array-gen.cc (and others) is missing from the coverage report. Is > there a way to get it included? > > On Saturday, May 18, 2019 at 10:55:25 AM UTC+1, Ben Noordhuis wrote: >> >> On Sat, May 18, 2019 at 11:29 AM Joe Smith <iexplo...@gmail.com> wrote: >> > Script: >> > >> > ``` >> > var arr = [1,2,3,4,5]; >> > arr.push(10); >> > arr.push("HELLO"); >> > ``` >> > >> > Using d8.cc with v8 compiled with coverage tracking I can see that the >> following functions are not hit when executing the above script. >> > >> > >> https://github.com/v8/v8/blob/master/src/builtins/builtins-array.cc#L299 >> > >> https://github.com/v8/v8/blob/master/src/builtins/builtins-array.cc#L365 >> > >> > Where is array.push executed if it isn't these functions within >> v8/src/builtins/builtins-array.cc? >> >> You're looking at the fallback path for Array#push() calls for >> irregular arrays or non-array objects. >> >> The fast path is generated ahead of time[0]. It's C++ code that >> generates machine code at V8 build time and it's that machine code >> that is executed at run-time. >> >> [0] >> https://github.com/v8/v8/blob/c93858abcd73a4632db955392232ba1d1d21c3af/src/builtins/builtins-array-gen.cc#L411-L536 >> >> > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/ab1c62f0-52cd-4d6f-84cb-ef3f705ab178%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.