-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
src: implement runtime option --no-node-snapshot for debugging #28567
Conversation
17cc0a8
to
0253097
Compare
src/node_options.cc
Outdated
@@ -368,6 +368,11 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { | |||
"silence all process warnings", | |||
&EnvironmentOptions::no_warnings, | |||
kAllowedInEnvironment); | |||
AddOption("--no-node-snapshot", | |||
"Launch Node.js without deserializing from the Node.js custom " |
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.
Might want to mention it's an undocumented debug flag here.
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.
I think the warnings are alphabetical so this should go above --no-warnings
?
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.
Er, well, they aren't alphabetical, but they're mostly alphabetical?
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.
… if this is supposed to be undocumented, I’d prefer not documenting it at all (i.e. no help text) over documenting that it’s undocumented, because the latter is pretty self-contradictory.
Is |
@Trott That can be somewhat ambiguous because there is also the v8 default snapshot, we use |
src/node_options.cc
Outdated
@@ -368,6 +368,11 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { | |||
"silence all process warnings", | |||
&EnvironmentOptions::no_warnings, | |||
kAllowedInEnvironment); | |||
AddOption("--no-node-snapshot", | |||
"Launch Node.js without deserializing from the Node.js custom " |
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.
… if this is supposed to be undocumented, I’d prefer not documenting it at all (i.e. no help text) over documenting that it’s undocumented, because the latter is pretty self-contradictory.
src/node.cc
Outdated
std::vector<intptr_t> external_references; | ||
|
||
bool force_no_snapshot = | ||
per_process::cli_options->per_isolate->per_env->no_node_snapshot; |
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.
This doesn’t really make sense as a per_env option though, right? More as a per-Isolate one?
8d84560
to
c4f6ab4
Compare
Removed the help text and moved it into per-isolate options |
Landed in 581bddc |
Refs: #28558
I did not add any documentation for this flag - the intention is to dedicate it to debugging Node.js core, somewhat similar to
--expose-internals
and--inspect-brk-node
.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes