Skip to content

Commit b2a2c6c

Browse files
addaleaxBethGriggs
authored andcommitted
http2: track nghttp2-allocated memory in heap snapshot
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>
1 parent 9be789e commit b2a2c6c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/node_http2.h

+1
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,7 @@ class Http2Session : public AsyncWrap,
794794
tracker->TrackFieldWithSize("outgoing_storage", outgoing_storage_.size());
795795
tracker->TrackFieldWithSize("pending_rst_streams",
796796
pending_rst_streams_.size() * sizeof(int32_t));
797+
tracker->TrackFieldWithSize("nghttp2_memory", current_nghttp2_memory_);
797798
}
798799

799800
SET_MEMORY_INFO_NAME(Http2Session)

test/pummel/test-heapdump-http2.js

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ server.listen(0, () => {
6969
{
7070
children: [
7171
{ node_name: 'Http2Session', edge_name: 'wrapped' },
72+
{ node_name: 'Node / nghttp2_memory', edge_name: 'nghttp2_memory' },
7273
{
7374
node_name: 'Node / streams', edge_name: 'streams'
7475
}

0 commit comments

Comments
 (0)