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

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

Issue 2665283003: Improve memory estimate of SpdySessionPool in net/ MemoryDumpProvider. (Closed)
Patch Set: Address Bence comments 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
Index: net/spdy/hpack/hpack_header_table.cc
diff --git a/net/spdy/hpack/hpack_header_table.cc b/net/spdy/hpack/hpack_header_table.cc
index b005559415044107d25639885b6c8da303b85471..4da293c4d00140b3ca5956a01939cb5771844717 100644
--- a/net/spdy/hpack/hpack_header_table.cc
+++ b/net/spdy/hpack/hpack_header_table.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include "base/logging.h"
+#include "base/trace_event/memory_usage_estimator.h"
#include "net/spdy/hpack/hpack_constants.h"
#include "net/spdy/hpack/hpack_static_table.h"
#include "net/spdy/spdy_flags.h"
@@ -274,4 +275,10 @@ void HpackHeaderTable::DebugLogTableState() const {
}
}
+size_t HpackHeaderTable::EstimateMemoryUsage() const {
+ return base::trace_event::EstimateMemoryUsage(dynamic_entries_) +
+ base::trace_event::EstimateMemoryUsage(dynamic_index_) +
+ base::trace_event::EstimateMemoryUsage(dynamic_name_index_);
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698