Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Unified Diff: net/spdy/http2_frame_decoder_adapter.cc

Issue 2665283003: Improve memory estimate of SpdySessionPool in net/ MemoryDumpProvider. (Closed)
Patch Set: rebased Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/hpack/hpack_static_table.cc ('k') | net/spdy/http2_priority_dependencies.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/http2_frame_decoder_adapter.cc
diff --git a/net/spdy/http2_frame_decoder_adapter.cc b/net/spdy/http2_frame_decoder_adapter.cc
index 475ef17d45b3bb8fd324bf2a38f46f2d27ef20f1..64d6b6d5d43fb50201cbb710d0e38c42165a1812 100644
--- a/net/spdy/http2_frame_decoder_adapter.cc
+++ b/net/spdy/http2_frame_decoder_adapter.cc
@@ -28,6 +28,7 @@
#include "net/http2/http2_structures.h"
#include "net/spdy/hpack/hpack_decoder_interface.h"
#include "net/spdy/hpack/hpack_header_table.h"
+#include "net/spdy/platform/api/spdy_estimate_memory_usage.h"
#include "net/spdy/spdy_alt_svc_wire_format.h"
#include "net/spdy/spdy_bug_tracker.h"
#include "net/spdy/spdy_frame_builder.h"
@@ -143,6 +144,12 @@ class Http2DecoderAdapter : public SpdyFramerDecoderAdapter,
return latched_probable_http_response_;
}
+ size_t EstimateMemoryUsage() const override {
+ // Skip |frame_decoder_|, |frame_header_| and |hpack_first_frame_header_| as
+ // they don't allocate.
+ return SpdyEstimateMemoryUsage(alt_svc_origin_) +
+ SpdyEstimateMemoryUsage(alt_svc_value_);
+ }
// ===========================================================================
// Implementations of the methods declared by Http2FrameDecoderListener.
« no previous file with comments | « net/spdy/hpack/hpack_static_table.cc ('k') | net/spdy/http2_priority_dependencies.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698