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

Unified Diff: net/spdy/spdy_stream.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/spdy_stream.cc
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index 126176d342f89539d55535127d60f2e2ac233774..3ae90e07417485d681ec11b277384f16090a94b3 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -18,6 +18,7 @@
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "base/trace_event/memory_usage_estimator.h"
#include "base/values.h"
#include "net/log/net_log.h"
#include "net/log/net_log_capture_mode.h"
@@ -819,6 +820,11 @@ bool SpdyStream::GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const {
return result;
}
+size_t SpdyStream::EstimateMemoryUsage() const {
+ return base::trace_event::EstimateMemoryUsage(url_) +
+ base::trace_event::EstimateMemoryUsage(request_headers_);
DmitrySkiba 2017/02/02 18:16:27 Please also estimate url_from_header_block_ and pe
xunjieli 2017/02/03 22:25:10 Done.
+}
+
void SpdyStream::UpdateHistograms() {
// We need at least the receive timers to be filled in, as otherwise
// metrics can be bogus.

Powered by Google App Engine
This is Rietveld 408576698