| Index: net/spdy/spdy_session_pool.cc
|
| diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
|
| index 904edae945cb90cded6fa377f38bc55c41f441af..1892ed4b20e6f5f2ac0cb2c10f0a6b1e67d52354 100644
|
| --- a/net/spdy/spdy_session_pool.cc
|
| +++ b/net/spdy/spdy_session_pool.cc
|
| @@ -372,10 +372,42 @@ void SpdySessionPool::DumpMemoryStats(
|
| 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);
|
| + base::trace_event::MemoryAllocatorDump* dump =
|
| + pmd->CreateAllocatorDump(dump_name);
|
| + size_t total_size = 0;
|
| + size_t buffer_size = 0;
|
| + size_t cert_count = 0;
|
| + size_t serialized_cert_size = 0;
|
| + size_t num_active_sessions = 0;
|
| for (const auto& session : sessions_) {
|
| - session->DumpMemoryStats(pmd, dump_name);
|
| + StreamSocket::SocketMemoryStats stats;
|
| + bool is_session_active = false;
|
| + session->DumpMemoryStats(&stats, &is_session_active);
|
| + total_size += stats.total_size;
|
| + buffer_size += stats.buffer_size;
|
| + cert_count += stats.cert_count;
|
| + serialized_cert_size += stats.serialized_cert_size;
|
| + if (is_session_active)
|
| + num_active_sessions++;
|
| }
|
| + dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
|
| + base::trace_event::MemoryAllocatorDump::kUnitsBytes,
|
| + total_size);
|
| + dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameObjectCount,
|
| + base::trace_event::MemoryAllocatorDump::kUnitsObjects,
|
| + sessions_.size());
|
| + dump->AddScalar("active_session_count",
|
| + base::trace_event::MemoryAllocatorDump::kUnitsObjects,
|
| + num_active_sessions);
|
| + dump->AddScalar("buffer_size",
|
| + base::trace_event::MemoryAllocatorDump::kUnitsBytes,
|
| + buffer_size);
|
| + dump->AddScalar("cert_count",
|
| + base::trace_event::MemoryAllocatorDump::kUnitsObjects,
|
| + cert_count);
|
| + dump->AddScalar("serialized_cert_size",
|
| + base::trace_event::MemoryAllocatorDump::kUnitsBytes,
|
| + serialized_cert_size);
|
| }
|
|
|
| bool SpdySessionPool::IsSessionAvailable(
|
|
|