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

Unified Diff: net/spdy/spdy_session.cc

Issue 2623803002: Avoid creating MemoryAllocatorDump for individual sockets (Closed)
Patch Set: self review 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_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 9ad1cb3e076ef15c9cb646d0af361341038d901f..49666cf3d8296a96de8e719192c025bb1bce1e41 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -25,8 +25,6 @@
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.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 "crypto/ec_private_key.h"
@@ -1031,15 +1029,10 @@ bool SpdySession::CloseOneIdleConnection() {
return false;
}
-void SpdySession::DumpMemoryStats(
- base::trace_event::ProcessMemoryDump* pmd,
- const std::string& parent_absolute_name) const {
- std::string name =
- base::StringPrintf("%s/session_%p", parent_absolute_name.c_str(), this);
- base::trace_event::MemoryAllocatorDump* session_dump =
- pmd->CreateAllocatorDump(name);
- session_dump->AddString("active", "", is_active() ? "1" : "0");
- connection_->DumpMemoryStats(pmd, name);
+void SpdySession::DumpMemoryStats(StreamSocket::SocketMemoryStats* stats,
+ bool* is_session_active) const {
+ *is_session_active = is_active();
+ connection_->DumpMemoryStats(stats);
}
void SpdySession::EnqueueStreamWrite(

Powered by Google App Engine
This is Rietveld 408576698