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 targos committed Dec 9, 2019
1 parent 8a9f57d commit d17ea8f
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
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,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
Original file line number Diff line number Diff line change
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 d17ea8f

Please sign in to comment.