| 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_; } |
| 170 bool has_process_totals() const { return has_process_totals_; } | 171 bool has_process_totals() const { return has_process_totals_; } |
| 171 void set_has_process_totals() { has_process_totals_ = true; } | 172 void set_has_process_totals() { has_process_totals_ = true; } |
| 172 | 173 |
| 173 ProcessMemoryMaps* process_mmaps() { return &process_mmaps_; } | 174 ProcessMemoryMaps* process_mmaps() { return &process_mmaps_; } |
| 174 bool has_process_mmaps() const { return has_process_mmaps_; } | 175 bool has_process_mmaps() const { return has_process_mmaps_; } |
| 175 void set_has_process_mmaps() { has_process_mmaps_ = true; } | 176 void set_has_process_mmaps() { has_process_mmaps_ = true; } |
| 176 | 177 |
| 177 const HeapDumpsMap& heap_dumps() const { return heap_dumps_; } | 178 const HeapDumpsMap& heap_dumps() const { return heap_dumps_; } |
| 178 | 179 |
| 179 const MemoryDumpArgs& dump_args() const { return dump_args_; } | 180 const MemoryDumpArgs& dump_args() const { return dump_args_; } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 // background mode are disabled for testing. | 214 // background mode are disabled for testing. |
| 214 static bool is_black_hole_non_fatal_for_testing_; | 215 static bool is_black_hole_non_fatal_for_testing_; |
| 215 | 216 |
| 216 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDump); | 217 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDump); |
| 217 }; | 218 }; |
| 218 | 219 |
| 219 } // namespace trace_event | 220 } // namespace trace_event |
| 220 } // namespace base | 221 } // namespace base |
| 221 | 222 |
| 222 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ | 223 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ |
| OLD | NEW |