mirror of https://github.com/nodejs/node.git
cli: add --node-memory-debug option
Add a public switch that turns on features for debugging memory leaks inside of Node.js core. PR-URL: https://github.com/nodejs/node/pull/35537 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>pull/35537/head
parent
936ce85c0b
commit
1d5fa88eb8
|
@ -546,6 +546,14 @@ added: v6.0.0
|
||||||
|
|
||||||
Silence all process warnings (including deprecations).
|
Silence all process warnings (including deprecations).
|
||||||
|
|
||||||
|
### `--node-memory-debug`
|
||||||
|
<!-- YAML
|
||||||
|
added: REPLACEME
|
||||||
|
-->
|
||||||
|
|
||||||
|
Enable extra debug checks for memory leaks in Node.js internals. This is
|
||||||
|
usually only useful for developers debugging Node.js itself.
|
||||||
|
|
||||||
### `--openssl-config=file`
|
### `--openssl-config=file`
|
||||||
<!-- YAML
|
<!-- YAML
|
||||||
added: v6.9.0
|
added: v6.9.0
|
||||||
|
@ -1282,6 +1290,7 @@ Node.js options that are allowed are:
|
||||||
* `--no-deprecation`
|
* `--no-deprecation`
|
||||||
* `--no-force-async-hooks-checks`
|
* `--no-force-async-hooks-checks`
|
||||||
* `--no-warnings`
|
* `--no-warnings`
|
||||||
|
* `--node-memory-debug`
|
||||||
* `--openssl-config`
|
* `--openssl-config`
|
||||||
* `--pending-deprecation`
|
* `--pending-deprecation`
|
||||||
* `--policy-integrity`
|
* `--policy-integrity`
|
||||||
|
|
|
@ -278,6 +278,10 @@ These will still be enabled dynamically when `async_hooks` is enabled.
|
||||||
.It Fl -no-warnings
|
.It Fl -no-warnings
|
||||||
Silence all process warnings (including deprecations).
|
Silence all process warnings (including deprecations).
|
||||||
.
|
.
|
||||||
|
.It Fl -node-memory-debug
|
||||||
|
Enable extra debug checks for memory leaks in Node.js internals. This is
|
||||||
|
usually only useful for developers debugging Node.js itself.
|
||||||
|
.
|
||||||
.It Fl -openssl-config Ns = Ns Ar file
|
.It Fl -openssl-config Ns = Ns Ar file
|
||||||
Load an OpenSSL configuration file on startup.
|
Load an OpenSSL configuration file on startup.
|
||||||
Among other uses, this can be used to enable FIPS-compliant crypto if Node.js is built with
|
Among other uses, this can be used to enable FIPS-compliant crypto if Node.js is built with
|
||||||
|
|
|
@ -762,6 +762,12 @@ PerProcessOptionsParser::PerProcessOptionsParser(
|
||||||
kAllowedInEnvironment);
|
kAllowedInEnvironment);
|
||||||
|
|
||||||
Insert(iop, &PerProcessOptions::get_per_isolate_options);
|
Insert(iop, &PerProcessOptions::get_per_isolate_options);
|
||||||
|
|
||||||
|
AddOption("--node-memory-debug",
|
||||||
|
"Run with extra debug checks for memory leaks in Node.js itself",
|
||||||
|
NoOp{}, kAllowedInEnvironment);
|
||||||
|
Implies("--node-memory-debug", "--debug-arraybuffer-allocations");
|
||||||
|
Implies("--node-memory-debug", "--verify-base-objects");
|
||||||
}
|
}
|
||||||
|
|
||||||
inline std::string RemoveBrackets(const std::string& host) {
|
inline std::string RemoveBrackets(const std::string& host) {
|
||||||
|
|
Loading…
Reference in New Issue