You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
VTune breaking Node.JS issue has been fixed in V8 repo, but the fix patch was not cherry-picked by Node.JS repo #29060
Platform:
4.18.0-25-generic GitHub issue management #26~18.04.1-Ubuntu SMP Thu Jun 27 07:28:31 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Subsystem:
JIT
Issue:
VTune profiling is removed from Node.js due to its broken support (commit: 88bac02).
This problem has been fixed in V8 (commit: f044f91d87f80d59b4a65799149fa38fa6d67cd7). However Node didn’t cherry-pick this patch.
The root cause of this issue was that, when VTune JIT support is enabled, the WasmEngine of an Isolate tries to enable code logging by EnableCodeLogging() method. This multithreaded method requires a Mutex for safety. However, as the WasmEngine is not created, the Mutex of it is not initialized. An attempt of acquiring this Mutex results in an error. The bug is fixed by creating WasmEngine before it enables code logging.
The fix was that,
if (event_handler) {
- isolate_->wasm_engine()->EnableCodeLogging(isolate_);
+ if (isolate_->wasm_engine() != nullptr) {
+ isolate_->wasm_engine()->EnableCodeLogging(isolate_);
+ }
jit_logger_.reset(new JitLogger(isolate_, event_handler));
AddCodeEventListener(jit_logger_.get());
if (options & kJitCodeEventEnumExisting) {
Tracked by:
Change-Id: I59e749190288ec412f6661233e8f62b0dff3cd7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1337376
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60060}
VTune is a useful tool to profile Node app performance bottleneck and microarchitecture breakdown. Could you please review this issue and cherry-pick the patch to re-enable VTune profiling in Node.JS? Thank you.
The reason I opted for removing instead of fixing it is that it had been broken (as in: didn't build) for quite some time without anyone complaining, suggesting no one actually uses it.
v8/v8@f044f91 fixes a run-time error, not a build-time error.
Activity
bnoordhuis commentedon Aug 9, 2019
You're welcome to open a pull request.
The reason I opted for removing instead of fixing it is that it had been broken (as in: didn't build) for quite some time without anyone complaining, suggesting no one actually uses it.
v8/v8@f044f91 fixes a run-time error, not a build-time error.
bnoordhuis commentedon Aug 14, 2019
I'll close this out. You're still welcome to file a pull request if you want.
build,src: fix Intel VTune profiling support