Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-12-01 03:40:55 +0300
committerMichaƫl Zasso <targos@protonmail.com>2019-12-09 12:23:15 +0300
commitd17ea8f58487242ce5f77737f170cb66d6f54e1c (patch)
tree3240101d3b735efec81d37d76f8dc0ca852e58c9
parent8a9f57d0d5cdb47c7e73f68e5677a0bd53975066 (diff)
http2: track nghttp2-allocated memory in heap snapshot
PR-URL: https://github.com/nodejs/node/pull/30745 Refs: https://github.com/nodejs/quic/blob/34ee0bc96f804c73cb22b2945a1a78f780938492/src/node_mem.h Refs: https://github.com/nodejs/quic/pull/126 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-rw-r--r--src/node_http2.h1
-rw-r--r--test/pummel/test-heapdump-http2.js1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/node_http2.h b/src/node_http2.h
index 1812cba51f4..07febd7da40 100644
--- a/src/node_http2.h
+++ b/src/node_http2.h
@@ -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)
diff --git a/test/pummel/test-heapdump-http2.js b/test/pummel/test-heapdump-http2.js
index caece96d01c..b3d819edaef 100644
--- a/test/pummel/test-heapdump-http2.js
+++ b/test/pummel/test-heapdump-http2.js
@@ -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'
}