| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This patch moves the dispatch of `Profiler.takePreciseCoverage` to a point before the bootstrap scripts are run to ensure that we can collect coverage data for all the scripts run after the inspector agent is ready. Before this patch `lib/internal/bootstrap/primordials.js` was not covered by `make coverage`, after this patch it is.
|
@joyeecheung build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/2546/pipeline |
Sorry, something went wrong.
|
This also seems to fix the async-hooks/test-callback-error error in make coverage for me - probably because it no longer triggers the creation of an additional JSBindingsConnection (AsyncWrap) anymore. |
Sorry, something went wrong.
|
Addressed reviews from @addaleax and fixed the quotes in the warning. Also I notice that sometimes undefined could be written to the file, so I've restored to an approach similar to the previous one and always overwrite the file in the callback once the callback is set. |
Sorry, something went wrong.
| })); | ||
| const coverageInfo = JSON.parse(msg).result; | ||
| writeFileSync(target, JSON.stringify(coverageInfo)); | ||
| internalBinding('coverage').end((msg) => { |
There was a problem hiding this comment.
this seems to be async now? should the try/catch be moved to the callback?
Sorry, something went wrong.
There was a problem hiding this comment.
this looks good to me, and I'm excited that we'll be able to collect coverage for a few of the internal libraries we're missing right now.
Before we land this, I'd like to test the branch with a few user-land modules, paying special attention to how subprocesses are handled. I will have cycles to do so this weekend.
Sorry, something went wrong.
| explicit V8CoverageSessionDelegate(V8CoverageConnection* connection) | ||
| : connection_(connection) {} | ||
|
|
||
| void SendMessageToFrontend( |
There was a problem hiding this comment.
nice, seems like a huge benefit to move coverage standup and teardown into C++.
Sorry, something went wrong.
|
Looks like there are related failures in CI: AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
134 !== 0
at Object.<anonymous> (c:\workspace\node-test-binary-windows\test\parallel\test-v8-coverage.js:92:10)
/home/iojs/build/workspace/node-test-commit-linux-containered/out/Release/obj.target/node_lib/src/node_binding.o: In function `node::binding::RegisterBuiltinModules()': node_binding.cc:(.text+0x14ae): undefined reference to `_register_coverage()' collect2: error: ld returned 1 exit status |
Sorry, something went wrong.
|
The failures on Windows: C:\Users\joyee\projects\node>C:\Users\joyee\projects\node\Release\node.exe C:\Users\joyee\projects\node\test\parallel\test-v8-coverage.js
uv loop at [000001D549520AD0] has 2 active handles
[000001D54AF20CE0] async
Close callback: 00007FF6CDFC2C40 <lambda_1e91a1e10c4ec4799db2c780f02b0099>::<lambda_invoker_cdecl> [c:\users\joyee\projects\node\src\node_platform.cc]:L275
Data: 000001D54AEE2830
(First field): 00019A740001A116
[000001D54AF21730] async
Close callback: 00007FF6CDF4D1A0 node::inspector::`anonymous namespace'::DisposePairCallback [c:\users\joyee\projects\node\src\inspector\main_thread_interface.cc]:L99
Data: 0000000000000000
Command Prompt - C:\Users\joyee\projects\node\Release\node.exe C:\Users\joyee\projects\node\test\parallel\test-v8-coverage.js[7760]: c:\users\joyee\projects\node\src\debug_utils.cc:290: Assertion `0 && "uv_loop_close() while having open handles"' failed.
1: 00007FF6CE0A723F node::DumpBacktrace+143 [c:\users\joyee\projects\node\src\debug_utils.cc]:L276
2: 00007FF6CE047BD6 node::Abort+22 [c:\users\joyee\projects\node\src\node_errors.cc]:L166
3: 00007FF6CE0481A3 node::Assert+131 [c:\users\joyee\projects\node\src\node_errors.cc]:L183
4: 00007FF6CE0A6E28 node::CheckedUvLoopClose+216 [c:\users\joyee\projects\node\src\debug_utils.cc]:L290
5: 00007FF6CDFA251E node::worker::Worker::`scalar deleting destructor'+126
6: 00007FF6CE0A008D node::Environment::RunCleanup+701 [c:\users\joyee\projects\node\src\env.cc]:L524
7: 00007FF6CE073836 node::Start+1334 [c:\users\joyee\projects\node\src\node.cc]:L831
8: 00007FF6CE0731EE node::Start+382 [c:\users\joyee\projects\node\src\node.cc]:L877
9: 00007FF6CE072D30 node::Start+1040 [c:\users\joyee\projects\node\src\node.cc]:L937
10: 00007FF6CDECC58C wmain+444 [c:\users\joyee\projects\node\src\node_main.cc]:L72
11: 00007FF6CEFE819C __scrt_common_main_seh+268 [d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl]:L288
12: 00007FF8B5643034 BaseThreadInitThunk+20
13: 00007FF8B7F13691 RtlUserThreadStart+33
I'll try looking into it later. (Meanwhile the test probably needs to reverse the order of checks to print something more helpful on failures..) |
Sorry, something went wrong.
|
quick update, haven't tested on any user-land modules yet; compiling the branch right now and will test tomorrow. |
Sorry, something went wrong.
This is redundant to the platform notification mechanism, and the handle may not be cleaned up util we attempt to close the loop. Refs: nodejs#26089 Refs: nodejs#26006
On Windows, the Platform’s `uv_async_t` may need two iterations before closing when it was previously in use. Refs: nodejs#26089 Refs: nodejs#26006
Sorry, something went wrong.
|
@addaleax @joyeecheung I apologize for the slow turnaround, I've tested this change on a few user-land modules and it's working great 👍 as soon as tests pass, +1 from me. |
Sorry, something went wrong.
|
Added HAVE_INSPECTOR guard for the coverage binding. |
Sorry, something went wrong.
This patch moves the dispatch of `Profiler.takePreciseCoverage` to a point before the bootstrap scripts are run to ensure that we can collect coverage data for all the scripts run after the inspector agent is ready. Before this patch `lib/internal/bootstrap/primordials.js` was not covered by `make coverage`, after this patch it is. PR-URL: #26006 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This patch moves the dispatch of `Profiler.takePreciseCoverage` to a point before the bootstrap scripts are run to ensure that we can collect coverage data for all the scripts run after the inspector agent is ready. Before this patch `lib/internal/bootstrap/primordials.js` was not covered by `make coverage`, after this patch it is. PR-URL: #26006 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This patch moves the dispatch of `Profiler.takePreciseCoverage` to a point before the bootstrap scripts are run to ensure that we can collect coverage data for all the scripts run after the inspector agent is ready. Before this patch `lib/internal/bootstrap/primordials.js` was not covered by `make coverage`, after this patch it is. PR-URL: #26006 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
This patch moves the dispatch of Profiler.takePreciseCoverage
to a point before the bootstrap scripts are run to ensure that
we can collect coverage data for all the scripts run after
the inspector agent is ready.
Before this patch lib/internal/bootstrap/primordials.js was not
covered by make coverage, after this patch it is.
Checklist