Chromium Code Reviews| Index: net/spdy/spdy_session_pool.cc |
| diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc |
| index bba426920241fbaf46374819dd866e15a8138bba..59cfeca5e17731eb59e9c00d432dbeb99f7cfeba 100644 |
| --- a/net/spdy/spdy_session_pool.cc |
| +++ b/net/spdy/spdy_session_pool.cc |
| @@ -371,10 +371,6 @@ void SpdySessionPool::OnCertDBChanged(const X509Certificate* cert) { |
| 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()); |
| - base::trace_event::MemoryAllocatorDump* dump = |
| - pmd->CreateAllocatorDump(dump_name); |
| size_t total_size = 0; |
| size_t buffer_size = 0; |
| size_t cert_count = 0; |
| @@ -391,6 +387,11 @@ void SpdySessionPool::DumpMemoryStats( |
| if (is_session_active) |
| num_active_sessions++; |
| } |
| + if (sessions_.empty()) |
|
ssid
2017/01/20 21:35:58
Could do this at the start of the function. But w
xunjieli
2017/01/20 21:45:26
Done. Good point!
|
| + return; |
| + base::trace_event::MemoryAllocatorDump* dump = |
| + pmd->CreateAllocatorDump(base::StringPrintf( |
| + "%s/spdy_session_pool", parent_dump_absolute_name.c_str())); |
| dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, |
| base::trace_event::MemoryAllocatorDump::kUnitsBytes, |
| total_size); |