Skip to content

Commit

Permalink
http2: track nghttp2-allocated memory in heap snapshot
Browse files Browse the repository at this point in the history
PR-URL: #30745
Refs: https://github.com/nodejs/quic/blob/34ee0bc96f804c73cb22b2945a1a78f780938492/src/node_mem.h
Refs: nodejs/quic#126
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
addaleax authored and BethGriggs committed Feb 6, 2020
1 parent 9be789e commit b2a2c6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/node_http2.h
Expand Up @@ -794,6 +794,7 @@ class Http2Session : public AsyncWrap,
tracker->TrackFieldWithSize("outgoing_storage", outgoing_storage_.size());
tracker->TrackFieldWithSize("pending_rst_streams",
pending_rst_streams_.size() * sizeof(int32_t));
tracker->TrackFieldWithSize("nghttp2_memory", current_nghttp2_memory_);
}

SET_MEMORY_INFO_NAME(Http2Session)
Expand Down
1 change: 1 addition & 0 deletions test/pummel/test-heapdump-http2.js
Expand Up @@ -69,6 +69,7 @@ server.listen(0, () => {
{
children: [
{ node_name: 'Http2Session', edge_name: 'wrapped' },
{ node_name: 'Node / nghttp2_memory', edge_name: 'nghttp2_memory' },
{
node_name: 'Node / streams', edge_name: 'streams'
}
Expand Down

0 comments on commit b2a2c6c

Please sign in to comment.