Joyee Cheung
d2a3078460
src: add --heapsnapshot-near-heap-limit option
...
This patch adds a --heapsnapshot-near-heap-limit CLI option
that takes heap snapshots when the V8 heap is approaching
the heap size limit. It will try to write the snapshots
to disk before the program crashes due to OOM.
PR-URL: https://github.com/nodejs/node/pull/33010
Refs: https://github.com/nodejs/node/issues/27552
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2020-10-22 03:41:11 +08:00
Joyee Cheung
1faf6f459f
src: snapshot Environment upon instantiation
...
This includes the initial Environment (without running bootstrap
scripts) into the builtin snapshot
PR-URL: https://github.com/nodejs/node/pull/32984
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2020-07-18 11:15:57 +08:00
55360443ce
quic: initial QUIC implementation
...
Co-authored-by: Anna Henningsen <anna@addaleax.net >
Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com >
Co-authored-by: gengjiawen <technicalcute@gmail.com >
Co-authored-by: James M Snell <jasnell@gmail.com >
Co-authored-by: Lucas Pardue <lucaspardue.24.7@gmail.com >
Co-authored-by: Ouyang Yadong <oyydoibh@gmail.com >
Co-authored-by: Juan Jos<C3><A9> Arboleda <soyjuanarbol@gmail.com >
Co-authored-by: Trivikram Kamat <trivikr.dev@gmail.com >
Co-authored-by: Denys Otrishko <shishugi@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/32379
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-06-16 09:23:34 -07:00
himself65
dade90db9c
src: enhance C++ sprintf utility
...
PR-URL: https://github.com/nodejs/node/pull/32385
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com >
2020-03-25 19:46:11 -07:00
Gabriel Schulhof
c16007381f
src: add debug option to report large page stats
...
This adds the new option `HUGEPAGES` to `NODE_DEBUG_NATIVE` that
causes the code responsible for re-mapping to large pages to output
memory range and page count information to `stderr`.
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com >
PR-URL: https://github.com/nodejs/node/pull/32331
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
2020-03-20 10:43:35 -07:00
Joyee Cheung
192cb7288a
tools: use per-process native Debug() printer in mkcodecache
...
PR-URL: https://github.com/nodejs/node/pull/31884
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-03-10 05:52:39 +08:00
Joyee Cheung
51bc55f2a2
src: implement per-process native Debug() printer
...
This patch adds a per-process native Debug() printer that can be
called when an Environment is not available.
PR-URL: https://github.com/nodejs/node/pull/31884
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-03-10 05:52:38 +08:00
Joyee Cheung
a8772da54d
src: refactor debug category parsing
...
Move the debug category parsing into a new EnabledDebugList class,
so that it can be reused outside of Environment.
PR-URL: https://github.com/nodejs/node/pull/31884
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-03-10 05:52:38 +08:00
Anna Henningsen
32e7e813e9
src: use custom fprintf alike to write errors to stderr
...
This allows printing errors that contain nul characters, for example.
Fixes: https://github.com/nodejs/node/issues/28761
Fixes: https://github.com/nodejs/node/issues/31218
PR-URL: https://github.com/nodejs/node/pull/31446
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-01-23 22:39:00 +01:00
Anna Henningsen
9cc747bfce
src: add C++-style sprintf utility
...
Add an utility that handles C++-style strings and objects well.
PR-URL: https://github.com/nodejs/node/pull/31446
Fixes: https://github.com/nodejs/node/issues/28761
Fixes: https://github.com/nodejs/node/issues/31218
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-01-23 22:38:58 +01:00
Sam Roberts
60b315c064
src: remove env-inl.h from header files
...
Inline headers should only be included into the .cc files that use them.
PR-URL: https://github.com/nodejs/node/pull/27755
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-05-23 08:51:41 -07:00
gengjiawen
51079db826
src: apply clang-tidy rule modernize-use-equals-default
...
PR-URL: https://github.com/nodejs/node/pull/27264
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-04-24 13:32:43 -04:00
Anna Henningsen
46d9573c68
src: add PrintLibuvHandleInformation debug helper
...
This function is not only helpful for debugging crashes,
but can also be used as an ad-hoc debugging statement.
PR-URL: https://github.com/nodejs/node/pull/25905
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-05 21:53:18 +01:00
Joyee Cheung
1838d00eba
src: reduce includes of node_internals.h
...
PR-URL: https://github.com/nodejs/node/pull/25507
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-01-21 07:54:42 +01:00
cjihrig
c2b4269b77
src: use DCHECK_* macros where possible
...
PR-URL: https://github.com/nodejs/node/pull/25207
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-12-26 12:25:19 -05:00
Gireesh Punathil
1c52dccc54
src: add GetLoadedLibraries routine
...
Add a static function GetLoadedLibraries under
NativeSymbolDebuggingContext abstraction that provides a list of
shared objects - either the current process depended on or loaded.
PR-URL: https://github.com/nodejs/node/pull/24825
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-12-14 05:38:26 +01:00
Refael Ackermann
247b513059
src,win: informative stack traces
...
Refresh `Win32SymbolDebuggingContext::LookupSymbol` to use more APIs
PR-URL: https://github.com/nodejs/node/pull/23822
Refs: https://docs.microsoft.com/en-us/windows/desktop/Debug/retrieving-symbol-information-by-address
Refs: https://docs.microsoft.com/en-us/windows/desktop/Debug/retrieving-undecorated-symbol-names
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-10-29 21:44:17 -04:00
Anna Henningsen
aa2304b8d5
worker,src: display remaining handles if uv_loop_close fails
...
Right now, we crash the process if there are handles remaining
on the event loop when we exit (except for the main thread).
This does not provide a lot of information about causes, though;
in particular, we don’t show which handles are pending and
who own them.
This patch adds debug output to these cases to help with the
situation.
PR-URL: https://github.com/nodejs/node/pull/21238
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-06-13 12:23:36 +02:00
Anna Henningsen
8e2d33f156
src: unify native symbol inspection code
...
Use a single file, and a single interface, for inspecting
symbols in the current process for debugging.
PR-URL: https://github.com/nodejs/node/pull/21238
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-06-13 12:23:36 +02:00
Anna Henningsen
bd85844c4e
src: implement debug output utilities
...
Implement utilities for easier debugging of Node.js core code,
inspired by the HTTP/2 debugging code. Debugging is, however,
implemented at runtime rather than at compile time, controlled
through a new `NODE_DEBUG_NATIVE=categories` environment variable.
The runtime overhead in the debugging-disabled case amounts to
1 well-cachable one-byte read per debug call.
PR-URL: https://github.com/nodejs/node/pull/20987
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-31 09:54:48 +02:00