Adrien Foulon
1fdaa15226
report: fix network queries in getReport libuv with exclude-network
...
PR-URL: https://github.com/nodejs/node/pull/55602
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2024-11-27 11:03:35 -05:00
Anna Henningsen
b85b5ba10c
src: use string_view for report and related code
...
Use `std::string_view` for process.report code and related
code, drop a few unnecessary `std::to_string` calls,
and use `MaybeStackBuffer` instead of `MallocedBuffer`,
all in order to avoid unnecessary heap allocations.
PR-URL: https://github.com/nodejs/node/pull/46723
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2023-02-20 22:01:45 +00:00
theanarkh
d9b2d2c0dd
report: add queue info for udp
...
PR-URL: https://github.com/nodejs/node/pull/44345
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2022-08-24 16:37:53 +00:00
legendecas
edba8a4015
src: nest namespace report in namespace node
...
PR-URL: https://github.com/nodejs/node/pull/44069
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Feng Yu <F3n67u@outlook.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-08-03 01:00:21 +08:00
Michael Dawson
3026ca0bf2
src: fix coverity report
...
Fix coverity report about possibly dereferencing
a null. If the the buffer.data != nullptr
check indicates that the buffer was null, then
relying on the value in buffer_size is no longer
safe. The later call to uv_pipe_getpeername
depends on the buffer_size being correct to
avoid deferencing buffer.data if it is not
big enough.
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/42663
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-04-13 15:07:31 -04:00
legendecas
50f076c4f5
src: write named pipe info in diagnostic report
...
Writes pipe handles with `uv_pipe_getsockname()`
and `uv_pipe_getpeername()`.
PR-URL: https://github.com/nodejs/node/pull/38637
Fixes: https://github.com/nodejs/node/issues/38625
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2021-05-21 11:41:33 +08:00
Anna Henningsen
72e521f5e8
src: move JSONWriter into its own file
...
The JSONWriter feature is not inherently related to the report
feature in any way.
As a drive-by fix, remove a number of unused header includes.
PR-URL: https://github.com/nodejs/node/pull/32552
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2020-04-02 17:25:57 +02:00
Anna Henningsen
2606e1ed25
report: add support for Workers
...
Include a report for each sub-Worker of the current Node.js instance.
This adds a feature that is necessary for eventually making the report
feature stable, as was discussed during the last collaborator summit.
Refs: https://github.com/openjs-foundation/summit/pull/240
PR-URL: https://github.com/nodejs/node/pull/31386
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-01-21 23:51:38 +01:00
Sam Roberts
02f9a0fe27
src: move DiagnosticFilename inlines into a -inl.h
...
DiagnosticFilename's constructor default values use inlines from
env-inl.h, causing the many users of node_internals.h to include
env-inl.h, even if they never use DiagnosticFilename.
PR-URL: https://github.com/nodejs/node/pull/27839
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-26 17:09:45 +02: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
Sam Roberts
b6bfc19378
src: remove util-inl.h from header files
...
Its intended that *-inl.h header files are only included into the src
files that call the inline methods. Explicitly include it into the files
that need it.
PR-URL: https://github.com/nodejs/node/pull/27631
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-05-13 13:43:26 -07:00
gengjiawen
38f3526f27
report: print common items first for readability
...
PR-URL: https://github.com/nodejs/node/pull/27367
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-04-27 12:04:36 +02:00
gengjiawen
ee7daf76c0
src: remove redundant string initialization
...
PR-URL: https://github.com/nodejs/node/pull/27152
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-11 11:15:07 -04:00
gengjiawen
845a6214f8
src: use macro instead of magic number for fd
...
PR-URL: https://github.com/nodejs/node/pull/27152
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-11 11:15:01 -04:00
Richard Lau
e3032708e0
report: add support for UDP connected sockets
...
PR-URL: https://github.com/nodejs/node/pull/27072
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2019-04-05 13:24:06 -04:00
Richard Lau
fc4c0de92f
report: add fallback for uv_getnameinfo() failures
...
Attempt to report the host and port in the case that uv_getnameinfo()
fails.
PR-URL: https://github.com/nodejs/node/pull/26140
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-03-02 00:02:05 +01:00
Anna Henningsen
2c84f6e75c
report: make more items programmatically accessible
...
Prefer structured output over stringified information
for libuv handles and the native stack trace.
PR-URL: https://github.com/nodejs/node/pull/26019
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-12 00:55:46 +01:00
cjihrig
679c23f2ae
report: use uv_getnameinfo() for socket endpoints
...
PR-URL: https://github.com/nodejs/node/pull/25962
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-02-08 11:32:08 -05:00
cjihrig
39171d755d
report: widen scope of #ifndef
...
This commit moves a #ifndef _WIN32 to contain the entire if
statement that inspects file descriptors. Prior to this commit,
the #ifndef was inside the if, making it essentially dead code
on Windows.
PR-URL: https://github.com/nodejs/node/pull/25960
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-02-08 09:11:15 -05:00
cjihrig
4b4d46539d
report: remove unnecessary case block scopes
...
PR-URL: https://github.com/nodejs/node/pull/25960
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-02-08 09:11:10 -05:00
cjihrig
e49040bd11
report: remove empty string stream insertion
...
PR-URL: https://github.com/nodejs/node/pull/25960
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-02-08 09:10:35 -05:00
Anna Henningsen
91adbe14b4
report: include information about event loop itself
...
PR-URL: https://github.com/nodejs/node/pull/25906
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-06 15:36:24 +01:00
cjihrig
2ed556c11f
report: print libuv handle addresses as hex
...
PR-URL: https://github.com/nodejs/node/pull/25910
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-05 12:09:45 -05:00
Anna Henningsen
accd674c9a
report: represent numbers as numbers
...
Do not stringify numbers and boolean values when writing JSON.
PR-URL: https://github.com/nodejs/node/pull/25651
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2019-01-27 20:38:42 +01:00
Denys Otrishko
80441c8086
src,test: fix JSON escaping in node-report
...
Previously only simple escape sequences were handled
(i.e. \n, \t, r etc.). This commit adds escaping of other control
symbols in the range of 0x00 to 0x20.
Also, this replaces multiple find+replace calls with a single pass
replacer.
PR-URL: https://github.com/nodejs/node/pull/25626
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-01-25 08:19:11 +01:00
Anna Henningsen
58606140b5
report: use uv_handle_type_name() to get handle type
...
PR-URL: https://github.com/nodejs/node/pull/25610
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-01-24 20:36:34 +01:00
Anna Henningsen
69ce113a7c
report: downgrade reinterpret_cast to static_cast
...
PR-URL: https://github.com/nodejs/node/pull/25610
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-01-24 20:36:33 +01:00
cjihrig
04c9f8404b
report: remove unnecessary includes
...
PR-URL: https://github.com/nodejs/node/pull/25597
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2019-01-22 17:58:51 -05:00
cjihrig
ad2b42e3b6
report: remove unnecessary intermediate variable
...
PR-URL: https://github.com/nodejs/node/pull/25597
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2019-01-22 17:58:50 -05:00
+2
4f6797378e
src: merge into core
...
Make node-report part of core runtime because:
1. When enabled, node-report significantly helps root cause various
types of problems, including support issues sent to the various repos
of the Node.js organization.
2. The requirement of explicitly adding the dependency to node-report
in user applications often represents a blocker to adoption.
Major deviation from the module version of the node-report is that the
report is generated in JSON format, as opposed to human readable text.
No new functionalities have been added, changes that are required for
melding it as a built-in capability has been affected on the module
version of node-report (https://github.com/nodejs/node-report )
Co-authored-by: Bidisha Pyne <bidipyne@in.ibm.com >
Co-authored-by: Howard Hellyer <hhellyer@uk.ibm.com >
Co-authored-by: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Co-authored-by: Julian Alimin <dmastag@yahoo.com >
Co-authored-by: Lakshmi Swetha Gopireddy <lakshmigopireddy@in.ibm.com >
Co-authored-by: Manusaporn Treerungroj <m.treerungroj@gmail.com >
Co-authored-by: Michael Dawson <michael_dawson@ca.ibm.com >
Co-authored-by: Richard Chamberlain <richard_chamberlain@uk.ibm.com >
Co-authored-by: Richard Lau <riclau@uk.ibm.com >
Co-authored-by: Sam Roberts <vieuxtech@gmail.com >
Co-authored-by: Vipin Menon <vipinmv1@in.ibm.com >
PR-URL: https://github.com/nodejs/node/pull/22712
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <Michael_Dawson@ca.ibm.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2019-01-18 10:34:04 +05:30