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 "config.h" | 5 #include "config.h" |
6 #include "platform/PartitionAllocMemoryDumpProvider.h" | 6 #include "platform/PartitionAllocMemoryDumpProvider.h" |
7 | 7 |
8 #include "public/platform/WebMemoryAllocatorDump.h" | 8 #include "public/platform/WebMemoryAllocatorDump.h" |
9 #include "public/platform/WebProcessMemoryDump.h" | 9 #include "public/platform/WebProcessMemoryDump.h" |
10 #include "wtf/Partitions.h" | 10 #include "wtf/Partitions.h" |
| 11 #include "wtf/text/WTFString.h" |
11 | 12 |
12 namespace blink { | 13 namespace blink { |
13 | 14 |
14 namespace { | 15 namespace { |
15 | 16 |
16 using namespace WTF; | 17 using namespace WTF; |
17 | 18 |
18 const char kPartitionAllocDumpName[] = "partition_alloc"; | 19 const char kPartitionAllocDumpName[] = "partition_alloc"; |
19 const char kPartitionsDumpName[] = "partitions"; | 20 const char kPartitionsDumpName[] = "partitions"; |
20 | 21 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 118 |
118 void PartitionAllocMemoryDumpProvider::onHeapProfilingEnabled(AllocationHook* al
locationHook, FreeHook* freeHook) | 119 void PartitionAllocMemoryDumpProvider::onHeapProfilingEnabled(AllocationHook* al
locationHook, FreeHook* freeHook) |
119 { | 120 { |
120 // Make PartitionAlloc call |allocationHook| and |freeHook| for every | 121 // Make PartitionAlloc call |allocationHook| and |freeHook| for every |
121 // subsequent allocation and free (or not if the pointers are null). | 122 // subsequent allocation and free (or not if the pointers are null). |
122 PartitionAllocHooks::setAllocationHook(allocationHook); | 123 PartitionAllocHooks::setAllocationHook(allocationHook); |
123 PartitionAllocHooks::setFreeHook(freeHook); | 124 PartitionAllocHooks::setFreeHook(freeHook); |
124 } | 125 } |
125 | 126 |
126 } // namespace blink | 127 } // namespace blink |
OLD | NEW |