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 #ifndef BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ | 5 #ifndef BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ |
6 #define BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ | 6 #define BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/base_export.h" | 10 #include "base/base_export.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 // it will be automatically generated. | 57 // it will be automatically generated. |
58 // ProcessMemoryDump handles the memory ownership of its MemoryAllocatorDumps. | 58 // ProcessMemoryDump handles the memory ownership of its MemoryAllocatorDumps. |
59 MemoryAllocatorDump* CreateAllocatorDump(const std::string& absolute_name); | 59 MemoryAllocatorDump* CreateAllocatorDump(const std::string& absolute_name); |
60 MemoryAllocatorDump* CreateAllocatorDump(const std::string& absolute_name, | 60 MemoryAllocatorDump* CreateAllocatorDump(const std::string& absolute_name, |
61 const MemoryAllocatorDumpGuid& guid); | 61 const MemoryAllocatorDumpGuid& guid); |
62 | 62 |
63 // Looks up a MemoryAllocatorDump given its allocator and heap names, or | 63 // Looks up a MemoryAllocatorDump given its allocator and heap names, or |
64 // nullptr if not found. | 64 // nullptr if not found. |
65 MemoryAllocatorDump* GetAllocatorDump(const std::string& absolute_name) const; | 65 MemoryAllocatorDump* GetAllocatorDump(const std::string& absolute_name) const; |
66 | 66 |
67 MemoryAllocatorDump* GetOrCreateAllocatorDump( | |
ericrk
2015/10/02 18:30:11
Can we remove the similar function from SkTraceMem
Primiano Tucci (use gerrit)
2015/10/05 14:24:25
OK I'll do that in a separate CL (at this point be
| |
68 const std::string& absolute_name); | |
69 | |
67 // Creates a shared MemoryAllocatorDump, to express cross-process sharing. | 70 // Creates a shared MemoryAllocatorDump, to express cross-process sharing. |
68 // Shared allocator dumps are allowed to have duplicate guids within the | 71 // Shared allocator dumps are allowed to have duplicate guids within the |
69 // global scope, in order to reference the same dump from multiple processes. | 72 // global scope, in order to reference the same dump from multiple processes. |
70 // See the design doc goo.gl/keU6Bf for reference usage patterns. | 73 // See the design doc goo.gl/keU6Bf for reference usage patterns. |
71 MemoryAllocatorDump* CreateSharedGlobalAllocatorDump( | 74 MemoryAllocatorDump* CreateSharedGlobalAllocatorDump( |
72 const MemoryAllocatorDumpGuid& guid); | 75 const MemoryAllocatorDumpGuid& guid); |
73 | 76 |
74 // Looks up a shared MemoryAllocatorDump given its guid. | 77 // Looks up a shared MemoryAllocatorDump given its guid. |
75 MemoryAllocatorDump* GetSharedGlobalAllocatorDump( | 78 MemoryAllocatorDump* GetSharedGlobalAllocatorDump( |
76 const MemoryAllocatorDumpGuid& guid) const; | 79 const MemoryAllocatorDumpGuid& guid) const; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
148 // Keeps track of relationships between MemoryAllocatorDump(s). | 151 // Keeps track of relationships between MemoryAllocatorDump(s). |
149 std::vector<MemoryAllocatorDumpEdge> allocator_dumps_edges_; | 152 std::vector<MemoryAllocatorDumpEdge> allocator_dumps_edges_; |
150 | 153 |
151 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDump); | 154 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDump); |
152 }; | 155 }; |
153 | 156 |
154 } // namespace trace_event | 157 } // namespace trace_event |
155 } // namespace base | 158 } // namespace base |
156 | 159 |
157 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ | 160 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ |
OLD | NEW |