| 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 "base/trace_event/heap_profiler_allocation_context_tracker.h" | 7 #include "base/trace_event/heap_profiler_allocation_context_tracker.h" |
| 8 #include "base/trace_event/heap_profiler_allocation_register.h" | 8 #include "base/trace_event/heap_profiler_allocation_register.h" |
| 9 #include "base/trace_event/memory_allocator_dump.h" | 9 #include "base/trace_event/memory_allocator_dump.h" |
| 10 #include "base/trace_event/process_memory_dump.h" | 10 #include "base/trace_event/process_memory_dump.h" |
| 11 #include "base/trace_event/trace_event_memory_overhead.h" | 11 #include "base/trace_event/trace_event_memory_overhead.h" |
| 12 #include "platform/WebMemoryAllocatorDump.h" |
| 12 #include "platform/heap/Handle.h" | 13 #include "platform/heap/Handle.h" |
| 13 #include "platform/web_process_memory_dump_impl.h" | 14 #include "platform/web_process_memory_dump_impl.h" |
| 14 #include "public/platform/Platform.h" | 15 #include "public/platform/Platform.h" |
| 15 #include "public/platform/WebMemoryAllocatorDump.h" | |
| 16 #include "wtf/StdLibExtras.h" | 16 #include "wtf/StdLibExtras.h" |
| 17 #include "wtf/Threading.h" | 17 #include "wtf/Threading.h" |
| 18 | 18 |
| 19 namespace blink { | 19 namespace blink { |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 void dumpMemoryTotals(base::trace_event::ProcessMemoryDump* memoryDump) | 22 void dumpMemoryTotals(base::trace_event::ProcessMemoryDump* memoryDump) |
| 23 { | 23 { |
| 24 base::trace_event::MemoryAllocatorDump* allocatorDump = memoryDump->CreateAl
locatorDump("blink_gc"); | 24 base::trace_event::MemoryAllocatorDump* allocatorDump = memoryDump->CreateAl
locatorDump("blink_gc"); |
| 25 allocatorDump->AddScalar("size", "bytes", ProcessHeap::totalAllocatedSpace()
); | 25 allocatorDump->AddScalar("size", "bytes", ProcessHeap::totalAllocatedSpace()
); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 } | 131 } |
| 132 | 132 |
| 133 void BlinkGCMemoryDumpProvider::remove(Address address) | 133 void BlinkGCMemoryDumpProvider::remove(Address address) |
| 134 { | 134 { |
| 135 MutexLocker locker(m_allocationRegisterMutex); | 135 MutexLocker locker(m_allocationRegisterMutex); |
| 136 if (m_allocationRegister) | 136 if (m_allocationRegister) |
| 137 m_allocationRegister->Remove(address); | 137 m_allocationRegister->Remove(address); |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace blink | 140 } // namespace blink |
| OLD | NEW |