-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inspector: Track async stacks only when necessary #16308
Conversation
7e2bb44
to
feedb59
Compare
@nodejs/v8 PTAL as well. The back port adds a vtable entry. This should be ABI compatible by virtue of being the last virtual function. |
deps/v8/include/v8-version.h
Outdated
@@ -11,7 +11,7 @@ | |||
#define V8_MAJOR_VERSION 6 | |||
#define V8_MINOR_VERSION 1 | |||
#define V8_BUILD_NUMBER 534 | |||
#define V8_PATCH_LEVEL 42 | |||
#define V8_PATCH_LEVEL 43 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that V8 6.2 has landed, we can update the embedder string instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
feedb59
to
e90eced
Compare
e90eced
to
f88f7e2
Compare
f88f7e2
to
b3b4a50
Compare
Looking at the CI, the added test crashes on Windows VS2017. There is suspicion that it might be related to #15558. |
Stressing |
Curiously, in the stress test it didn't fail at all. I can reproduce this with ~50% intermittency on a vs2017 build on a local windows machine. I am fairly confident that this is related to #15558. Getting rid of the |
Stress on Windows2008 gives 64% fails - https://ci.nodejs.org/job/node-stress-single-test/1460/nodes=win2008r2-mp-vs2017/console |
I have disabled part of the test affected by flakiness from #15558. New CI: https://ci.nodejs.org/job/node-test-pull-request/10865/ |
src/inspector_agent.cc
Outdated
if (result.IsEmpty()) { | ||
FatalError( | ||
"node::inspector::Agent::ToggleAsyncHook", | ||
"Cannot toggle Inspector's AsyncHook, please report this."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Four space indent (line continuation.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
8ccad51
to
e436f44
Compare
e436f44
to
193f4ae
Compare
With this change, we do async stack tracking only when explicitly requested by the inspector client. This avoids unnecessary overhead for clients that might not be interested in async stack traces. Backport-PR-URL: #16590 PR-URL: #16308 Fixes: #16180 Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
Original commit message: [inspector] added V8InspectorClient::maxAsyncCallStackDepthChanged [email protected] Bug: none Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I0fa10978266feb3c3907ce1f3386ae7a34a33582 Reviewed-on: https://chromium-review.googlesource.com/726490 Reviewed-by: Dmitry Gozman <[email protected]> Commit-Queue: Aleksey Kozyatinskiy <[email protected]> Cr-Commit-Position: refs/heads/master@{#48705} PR-URL: nodejs/node#16308 Refs: v8/v8@b1cd96e Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
With this change, we do async stack tracking only when explicitly requested by the inspector client. This avoids unnecessary overhead for clients that might not be interested in async stack traces. PR-URL: nodejs/node#16308 Fixes: nodejs/node#16180 Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
Original commit message: [inspector] added V8InspectorClient::maxAsyncCallStackDepthChanged [email protected] Bug: none Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I0fa10978266feb3c3907ce1f3386ae7a34a33582 Reviewed-on: https://chromium-review.googlesource.com/726490 Reviewed-by: Dmitry Gozman <[email protected]> Commit-Queue: Aleksey Kozyatinskiy <[email protected]> Cr-Commit-Position: refs/heads/master@{#48705} PR-URL: nodejs/node#16308 Refs: v8/v8@b1cd96e Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
With this change, we do async stack tracking only when explicitly requested by the inspector client. This avoids unnecessary overhead for clients that might not be interested in async stack traces. PR-URL: nodejs/node#16308 Fixes: nodejs/node#16180 Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
Original commit message: [inspector] added V8InspectorClient::maxAsyncCallStackDepthChanged [email protected] Bug: none Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I0fa10978266feb3c3907ce1f3386ae7a34a33582 Reviewed-on: https://chromium-review.googlesource.com/726490 Reviewed-by: Dmitry Gozman <[email protected]> Commit-Queue: Aleksey Kozyatinskiy <[email protected]> Cr-Commit-Position: refs/heads/master@{#48705} PR-URL: nodejs/node#16308 Refs: v8/v8@b1cd96e Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
With this change, we do async stack tracking only when explicitly requested by the inspector client. This avoids unnecessary overhead for clients that might not be interested in async stack traces. PR-URL: nodejs/node#16308 Fixes: nodejs/node#16180 Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
Original commit message: [inspector] added V8InspectorClient::maxAsyncCallStackDepthChanged [email protected] Bug: none Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I0fa10978266feb3c3907ce1f3386ae7a34a33582 Reviewed-on: https://chromium-review.googlesource.com/726490 Reviewed-by: Dmitry Gozman <[email protected]> Commit-Queue: Aleksey Kozyatinskiy <[email protected]> Cr-Commit-Position: refs/heads/master@{nodejs#48705} PR-URL: nodejs#16308 Refs: v8/v8@b1cd96e Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
Original commit message: [inspector] added V8InspectorClient::maxAsyncCallStackDepthChanged [email protected] Bug: none Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I0fa10978266feb3c3907ce1f3386ae7a34a33582 Reviewed-on: https://chromium-review.googlesource.com/726490 Reviewed-by: Dmitry Gozman <[email protected]> Commit-Queue: Aleksey Kozyatinskiy <[email protected]> Cr-Commit-Position: refs/heads/master@{nodejs#48705} PR-URL: nodejs#16308 Backport-PR-URL: nodejs#16413 Refs: v8/v8@b1cd96e Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
Original commit message: [inspector] added V8InspectorClient::maxAsyncCallStackDepthChanged [email protected] Bug: none Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I0fa10978266feb3c3907ce1f3386ae7a34a33582 Reviewed-on: https://chromium-review.googlesource.com/726490 Reviewed-by: Dmitry Gozman <[email protected]> Commit-Queue: Aleksey Kozyatinskiy <[email protected]> Cr-Commit-Position: refs/heads/master@{nodejs#48705} PR-URL: nodejs#16308 Backport-PR-URL: nodejs#16413 Refs: v8/v8@b1cd96e Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
Original commit message: [inspector] added V8InspectorClient::maxAsyncCallStackDepthChanged [email protected] Bug: none Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I0fa10978266feb3c3907ce1f3386ae7a34a33582 Reviewed-on: https://chromium-review.googlesource.com/726490 Reviewed-by: Dmitry Gozman <[email protected]> Commit-Queue: Aleksey Kozyatinskiy <[email protected]> Cr-Commit-Position: refs/heads/master@{nodejs#48705} PR-URL: nodejs#16308 Refs: v8/v8@b1cd96e Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
Original commit message: [inspector] added V8InspectorClient::maxAsyncCallStackDepthChanged [email protected] Bug: none Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I0fa10978266feb3c3907ce1f3386ae7a34a33582 Reviewed-on: https://chromium-review.googlesource.com/726490 Reviewed-by: Dmitry Gozman <[email protected]> Commit-Queue: Aleksey Kozyatinskiy <[email protected]> Cr-Commit-Position: refs/heads/master@{#48705} PR-URL: #16308 Backport-PR-URL: #16413 Refs: v8/v8@b1cd96e Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
This is an alternative to #16260. It depends on a back port of an upstream fix (included), but solves the problem much more elegantly & comprehensively.
With this change, we do async stack tracking only when explicitly
requested by the inspector client. This avoids unnecessary overhead
for clients that might not be interested in async stack traces.
In practical terms, this means that we still get async stack tracking right from startup when
--inspect-brk
is used for debuggers that enable async stacks (DevTools does this by default, and I think WebStorm and others as well).When using
--inspect
, we no longer enable async stack tracking by default. The inspector client can request async stack tracking at the time of the connection. Any async resources already created will not have stack tracking. I believe this is the right behavior (see #16180). Users needing async stack tracking right from startup can use--inspect-brk
.Fixes: #16180
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
deps:v8, inspector
/cc @nodejs/v8-inspector
CI:
https://ci.nodejs.org/job/node-test-pull-request/10836/ https://ci.nodejs.org/job/node-test-pull-request/10862/ https://ci.nodejs.org/job/node-test-pull-request/10865/https://ci.nodejs.org/job/node-test-pull-request/11030/V8-CI:
https://ci.nodejs.org/view/All/job/node-test-commit-v8-linux/1000/https://ci.nodejs.org/view/All/job/node-test-commit-v8-linux/1001/