| 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" |
| 11 #include "base/containers/hash_tables.h" | 11 #include "base/containers/hash_tables.h" |
| 12 #include "base/containers/small_map.h" | 12 #include "base/containers/small_map.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
| 15 #include "base/trace_event/memory_allocator_dump.h" | 15 #include "base/trace_event/memory_allocator_dump.h" |
| 16 #include "base/trace_event/memory_allocator_dump_guid.h" | 16 #include "base/trace_event/memory_allocator_dump_guid.h" |
| 17 #include "base/trace_event/memory_dump_session_state.h" | 17 #include "base/trace_event/memory_dump_session_state.h" |
| 18 #include "base/trace_event/process_memory_maps.h" | 18 #include "base/trace_event/process_memory_maps.h" |
| 19 #include "base/trace_event/process_memory_totals.h" | 19 #include "base/trace_event/process_memory_totals.h" |
| 20 | 20 |
| 21 namespace base { | 21 namespace base { |
| 22 namespace trace_event { | 22 namespace trace_event { |
| 23 | 23 |
| 24 class ConvertableToTraceFormat; | 24 class ConvertableToTraceFormat; |
| 25 class MemoryDumpManager; | 25 class MemoryDumpManager; |
| 26 class MemoryDumpSessionState; | 26 class MemoryDumpSessionState; |
| 27 | 27 |
| 28 // ProcessMemoryDump is as a strongly typed container which enforces the data | 28 // ProcessMemoryDump is as a strongly typed container which holds the dumps |
| 29 // model for each memory dump and holds the dumps produced by the | 29 // produced by the MemoryDumpProvider(s) for a specific process. |
| 30 // MemoryDumpProvider(s) for a specific process. | |
| 31 // At trace generation time (i.e. when AsValue() is called), ProcessMemoryDump | |
| 32 // will compose a key-value dictionary of the various dumps obtained at trace | |
| 33 // dump point time. | |
| 34 class BASE_EXPORT ProcessMemoryDump { | 30 class BASE_EXPORT ProcessMemoryDump { |
| 35 public: | 31 public: |
| 36 struct MemoryAllocatorDumpEdge { | 32 struct MemoryAllocatorDumpEdge { |
| 37 MemoryAllocatorDumpGuid source; | 33 MemoryAllocatorDumpGuid source; |
| 38 MemoryAllocatorDumpGuid target; | 34 MemoryAllocatorDumpGuid target; |
| 39 int importance; | 35 int importance; |
| 40 const char* type; | 36 const char* type; |
| 41 }; | 37 }; |
| 42 | 38 |
| 43 // Maps allocator dumps absolute names (allocator_name/heap/subheap) to | 39 // Maps allocator dumps absolute names (allocator_name/heap/subheap) to |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 // Keeps track of relationships between MemoryAllocatorDump(s). | 148 // Keeps track of relationships between MemoryAllocatorDump(s). |
| 153 std::vector<MemoryAllocatorDumpEdge> allocator_dumps_edges_; | 149 std::vector<MemoryAllocatorDumpEdge> allocator_dumps_edges_; |
| 154 | 150 |
| 155 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDump); | 151 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDump); |
| 156 }; | 152 }; |
| 157 | 153 |
| 158 } // namespace trace_event | 154 } // namespace trace_event |
| 159 } // namespace base | 155 } // namespace base |
| 160 | 156 |
| 161 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ | 157 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ |
| OLD | NEW |