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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <unordered_map> | 10 #include <unordered_map> |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 // |other| will be an empty ProcessMemoryDump after this method returns. | 160 // |other| will be an empty ProcessMemoryDump after this method returns. |
161 // This is to allow dump providers to pre-populate ProcessMemoryDump instances | 161 // This is to allow dump providers to pre-populate ProcessMemoryDump instances |
162 // and later move their contents into the ProcessMemoryDump passed as argument | 162 // and later move their contents into the ProcessMemoryDump passed as argument |
163 // of the MemoryDumpProvider::OnMemoryDump(ProcessMemoryDump*) callback. | 163 // of the MemoryDumpProvider::OnMemoryDump(ProcessMemoryDump*) callback. |
164 void TakeAllDumpsFrom(ProcessMemoryDump* other); | 164 void TakeAllDumpsFrom(ProcessMemoryDump* other); |
165 | 165 |
166 // Called at trace generation time to populate the TracedValue. | 166 // Called at trace generation time to populate the TracedValue. |
167 void AsValueInto(TracedValue* value) const; | 167 void AsValueInto(TracedValue* value) const; |
168 | 168 |
169 ProcessMemoryTotals* process_totals() { return &process_totals_; } | 169 ProcessMemoryTotals* process_totals() { return &process_totals_; } |
170 const ProcessMemoryTotals* process_totals() const { return &process_totals_; } | |
171 bool has_process_totals() const { return has_process_totals_; } | 170 bool has_process_totals() const { return has_process_totals_; } |
172 void set_has_process_totals() { has_process_totals_ = true; } | 171 void set_has_process_totals() { has_process_totals_ = true; } |
173 | 172 |
174 ProcessMemoryMaps* process_mmaps() { return &process_mmaps_; } | 173 ProcessMemoryMaps* process_mmaps() { return &process_mmaps_; } |
175 bool has_process_mmaps() const { return has_process_mmaps_; } | 174 bool has_process_mmaps() const { return has_process_mmaps_; } |
176 void set_has_process_mmaps() { has_process_mmaps_ = true; } | 175 void set_has_process_mmaps() { has_process_mmaps_ = true; } |
177 | 176 |
178 const HeapDumpsMap& heap_dumps() const { return heap_dumps_; } | 177 const HeapDumpsMap& heap_dumps() const { return heap_dumps_; } |
179 | 178 |
180 const MemoryDumpArgs& dump_args() const { return dump_args_; } | 179 const MemoryDumpArgs& dump_args() const { return dump_args_; } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 // background mode are disabled for testing. | 213 // background mode are disabled for testing. |
215 static bool is_black_hole_non_fatal_for_testing_; | 214 static bool is_black_hole_non_fatal_for_testing_; |
216 | 215 |
217 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDump); | 216 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDump); |
218 }; | 217 }; |
219 | 218 |
220 } // namespace trace_event | 219 } // namespace trace_event |
221 } // namespace base | 220 } // namespace base |
222 | 221 |
223 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ | 222 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ |
OLD | NEW |