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

Unified Diff: net/spdy/spdy_session_pool.cc

Issue 2565523002: Instrument SpdySessionPool using MemoryDumpProvider (Closed)
Patch Set: Address comments Created 4 years 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/spdy_session_pool.h ('k') | net/spdy/spdy_session_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session_pool.cc
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
index 4688c6346a9334daede43643f37c2576a3bc760e..d694ab54fc1159fa3beaa5278441bd4ae58ee562 100644
--- a/net/spdy/spdy_session_pool.cc
+++ b/net/spdy/spdy_session_pool.cc
@@ -10,6 +10,9 @@
#include "base/metrics/histogram_macros.h"
#include "base/profiler/scoped_tracker.h"
#include "base/stl_util.h"
+#include "base/strings/stringprintf.h"
+#include "base/trace_event/memory_allocator_dump.h"
+#include "base/trace_event/process_memory_dump.h"
#include "base/trace_event/trace_event.h"
#include "base/values.h"
#include "net/base/address_list.h"
@@ -363,6 +366,17 @@ void SpdySessionPool::OnCertDBChanged(const X509Certificate* cert) {
CloseCurrentSessions(ERR_CERT_DATABASE_CHANGED);
}
+void SpdySessionPool::DumpMemoryStats(
+ base::trace_event::ProcessMemoryDump* pmd,
+ const std::string& parent_dump_absolute_name) const {
+ std::string dump_name = base::StringPrintf("%s/spdy_session_pool",
+ parent_dump_absolute_name.c_str());
+ pmd->CreateAllocatorDump(dump_name);
+ for (const auto& session : sessions_) {
+ session->DumpMemoryStats(pmd, dump_name);
+ }
+}
+
bool SpdySessionPool::IsSessionAvailable(
const base::WeakPtr<SpdySession>& session) const {
for (AvailableSessionMap::const_iterator it = available_sessions_.begin();
« no previous file with comments | « net/spdy/spdy_session_pool.h ('k') | net/spdy/spdy_session_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698