| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/heap/BlinkGCMemoryDumpProvider.h" | 5 #include "platform/heap/BlinkGCMemoryDumpProvider.h" |
| 6 | 6 |
| 7 #include "platform/WebProcessMemoryDumpImpl.h" |
| 7 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
| 8 #include "public/platform/Platform.h" | 9 #include "public/platform/Platform.h" |
| 9 #include "public/platform/WebMemoryAllocatorDump.h" | 10 #include "public/platform/WebMemoryAllocatorDump.h" |
| 10 #include "public/platform/WebProcessMemoryDump.h" | |
| 11 #include "wtf/StdLibExtras.h" | 11 #include "wtf/StdLibExtras.h" |
| 12 #include "wtf/Threading.h" | 12 #include "wtf/Threading.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 void dumpMemoryTotals(blink::WebProcessMemoryDump* memoryDump) | 17 void dumpMemoryTotals(blink::WebProcessMemoryDump* memoryDump) |
| 18 { | 18 { |
| 19 String dumpName = String::format("blink_gc"); | 19 String dumpName = String::format("blink_gc"); |
| 20 WebMemoryAllocatorDump* allocatorDump = memoryDump->createMemoryAllocatorDum
p(dumpName); | 20 WebMemoryAllocatorDump* allocatorDump = memoryDump->createMemoryAllocatorDum
p(dumpName); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 { | 59 { |
| 60 return m_currentProcessMemoryDump->createMemoryAllocatorDump(absoluteName); | 60 return m_currentProcessMemoryDump->createMemoryAllocatorDump(absoluteName); |
| 61 } | 61 } |
| 62 | 62 |
| 63 void BlinkGCMemoryDumpProvider::clearProcessDumpForCurrentGC() | 63 void BlinkGCMemoryDumpProvider::clearProcessDumpForCurrentGC() |
| 64 { | 64 { |
| 65 m_currentProcessMemoryDump->clear(); | 65 m_currentProcessMemoryDump->clear(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 BlinkGCMemoryDumpProvider::BlinkGCMemoryDumpProvider() | 68 BlinkGCMemoryDumpProvider::BlinkGCMemoryDumpProvider() |
| 69 : m_currentProcessMemoryDump(adoptPtr(Platform::current()->createProcessMemo
ryDump())) | 69 : m_currentProcessMemoryDump(adoptPtr(new WebProcessMemoryDumpImpl())) |
| 70 { | 70 { |
| 71 } | 71 } |
| 72 | 72 |
| 73 } // namespace blink | 73 } // namespace blink |
| OLD | NEW |