| 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/PartitionAllocMemoryDumpProvider.h" | 5 #include "platform/PartitionAllocMemoryDumpProvider.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "base/trace_event/heap_profiler_allocation_context.h" | 8 #include "base/trace_event/heap_profiler_allocation_context.h" |
| 9 #include "base/trace_event/heap_profiler_allocation_context_tracker.h" | 9 #include "base/trace_event/heap_profiler_allocation_context_tracker.h" |
| 10 #include "base/trace_event/heap_profiler_allocation_register.h" | 10 #include "base/trace_event/heap_profiler_allocation_register.h" |
| 11 #include "base/trace_event/process_memory_dump.h" | 11 #include "base/trace_event/process_memory_dump.h" |
| 12 #include "base/trace_event/trace_event_memory_overhead.h" | 12 #include "base/trace_event/trace_event_memory_overhead.h" |
| 13 #include "wtf/allocator/Partitions.h" | 13 #include "platform/wtf/allocator/Partitions.h" |
| 14 #include "wtf/text/WTFString.h" | 14 #include "platform/wtf/text/WTFString.h" |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 using namespace WTF; | 20 using namespace WTF; |
| 21 | 21 |
| 22 void ReportAllocation(void* address, size_t size, const char* type_name) { | 22 void ReportAllocation(void* address, size_t size, const char* type_name) { |
| 23 PartitionAllocMemoryDumpProvider::Instance()->insert(address, size, | 23 PartitionAllocMemoryDumpProvider::Instance()->insert(address, size, |
| 24 type_name); | 24 type_name); |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 allocation_register_->Insert(address, size, context); | 215 allocation_register_->Insert(address, size, context); |
| 216 } | 216 } |
| 217 | 217 |
| 218 void PartitionAllocMemoryDumpProvider::Remove(void* address) { | 218 void PartitionAllocMemoryDumpProvider::Remove(void* address) { |
| 219 MutexLocker locker(allocation_register_mutex_); | 219 MutexLocker locker(allocation_register_mutex_); |
| 220 if (allocation_register_) | 220 if (allocation_register_) |
| 221 allocation_register_->Remove(address); | 221 allocation_register_->Remove(address); |
| 222 } | 222 } |
| 223 | 223 |
| 224 } // namespace blink | 224 } // namespace blink |
| OLD | NEW |