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

Unified Diff: net/spdy/hpack/hpack_huffman_table.cc

Issue 2665283003: Improve memory estimate of SpdySessionPool in net/ MemoryDumpProvider. (Closed)
Patch Set: address bnc comments Created 3 years, 11 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
Index: net/spdy/hpack/hpack_huffman_table.cc
diff --git a/net/spdy/hpack/hpack_huffman_table.cc b/net/spdy/hpack/hpack_huffman_table.cc
index 0e3ca1b060eb5f49178ab881724dc6da60bf5b57..e4431f5affa1772f9344bc7a97f569f914cb9d15 100644
--- a/net/spdy/hpack/hpack_huffman_table.cc
+++ b/net/spdy/hpack/hpack_huffman_table.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
+#include "base/trace_event/memory_usage_estimator.h"
#include "net/spdy/hpack/hpack_input_stream.h"
#include "net/spdy/hpack/hpack_output_stream.h"
@@ -318,4 +319,11 @@ bool HpackHuffmanTable::GenericDecodeString(HpackInputStream* in,
return false;
}
+size_t HpackHuffmanTable::EstimateMemoryUsage() const {
+ return base::trace_event::EstimateMemoryUsage(decode_tables_) +
+ base::trace_event::EstimateMemoryUsage(decode_entries_) +
+ base::trace_event::EstimateMemoryUsage(code_by_id_) +
+ base::trace_event::EstimateMemoryUsage(length_by_id_);
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698