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 WebProcessMemoryDump_h | 5 #ifndef WebProcessMemoryDump_h |
6 #define WebProcessMemoryDump_h | 6 #define WebProcessMemoryDump_h |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 const base::trace_event::ProcessMemoryDump* process_memory_dump() const { | 117 const base::trace_event::ProcessMemoryDump* process_memory_dump() const { |
118 return process_memory_dump_; | 118 return process_memory_dump_; |
119 } | 119 } |
120 | 120 |
121 blink::WebMemoryAllocatorDump* CreateDiscardableMemoryAllocatorDump( | 121 blink::WebMemoryAllocatorDump* CreateDiscardableMemoryAllocatorDump( |
122 const std::string& name, | 122 const std::string& name, |
123 base::DiscardableMemory* discardable); | 123 base::DiscardableMemory* discardable); |
124 | 124 |
125 // Dumps heap memory usage. |allocatorName| is used as an absolute name for | 125 // Dumps heap memory usage. |allocatorName| is used as an absolute name for |
126 // base::trace_event::ProcessMemoryDump::DumpHeapUsage(). | 126 // base::trace_event::ProcessMemoryDump::DumpHeapUsage(). |
127 void DumpHeapUsage(const base::hash_map<base::trace_event::AllocationContext, | 127 void DumpHeapUsage( |
128 base::trace_event::AllocationMetrics>& | 128 const std::unordered_map<base::trace_event::AllocationContext, |
Łukasz Anforowicz
2017/04/24 18:46:10
IWYU: #include <unordered_map>?
| |
129 metrics_by_context, | 129 base::trace_event::AllocationMetrics>& |
130 base::trace_event::TraceEventMemoryOverhead& overhead, | 130 metrics_by_context, |
131 const char* allocator_name); | 131 base::trace_event::TraceEventMemoryOverhead& overhead, |
132 const char* allocator_name); | |
132 | 133 |
133 private: | 134 private: |
134 FRIEND_TEST_ALL_PREFIXES(WebProcessMemoryDumpTest, IntegrationTest); | 135 FRIEND_TEST_ALL_PREFIXES(WebProcessMemoryDumpTest, IntegrationTest); |
135 | 136 |
136 blink::WebMemoryAllocatorDump* CreateWebMemoryAllocatorDump( | 137 blink::WebMemoryAllocatorDump* CreateWebMemoryAllocatorDump( |
137 base::trace_event::MemoryAllocatorDump* memory_allocator_dump); | 138 base::trace_event::MemoryAllocatorDump* memory_allocator_dump); |
138 | 139 |
139 // Only for the case of ProcessMemoryDump being owned (i.e. the default ctor). | 140 // Only for the case of ProcessMemoryDump being owned (i.e. the default ctor). |
140 std::unique_ptr<base::trace_event::ProcessMemoryDump> | 141 std::unique_ptr<base::trace_event::ProcessMemoryDump> |
141 owned_process_memory_dump_; | 142 owned_process_memory_dump_; |
(...skipping 17 matching lines...) Expand all Loading... | |
159 // Stores SkTraceMemoryDump for the current ProcessMemoryDump. | 160 // Stores SkTraceMemoryDump for the current ProcessMemoryDump. |
160 std::vector<std::unique_ptr<skia::SkiaTraceMemoryDumpImpl>> | 161 std::vector<std::unique_ptr<skia::SkiaTraceMemoryDumpImpl>> |
161 sk_trace_dump_list_; | 162 sk_trace_dump_list_; |
162 | 163 |
163 DISALLOW_COPY_AND_ASSIGN(WebProcessMemoryDump); | 164 DISALLOW_COPY_AND_ASSIGN(WebProcessMemoryDump); |
164 }; | 165 }; |
165 | 166 |
166 } // namespace blink | 167 } // namespace blink |
167 | 168 |
168 #endif // WebProcessMemoryDump_h | 169 #endif // WebProcessMemoryDump_h |
OLD | NEW |