| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 using HeapDumpsMap = std::unordered_map<std::string, scoped_ptr<TracedValue>>; | 56 using HeapDumpsMap = std::unordered_map<std::string, scoped_ptr<TracedValue>>; |
| 57 | 57 |
| 58 #if defined(COUNT_RESIDENT_BYTES_SUPPORTED) | 58 #if defined(COUNT_RESIDENT_BYTES_SUPPORTED) |
| 59 // Returns the total bytes resident for a virtual address range, with given | 59 // Returns the total bytes resident for a virtual address range, with given |
| 60 // |start_address| and |mapped_size|. |mapped_size| is specified in bytes. The | 60 // |start_address| and |mapped_size|. |mapped_size| is specified in bytes. The |
| 61 // value returned is valid only if the given range is currently mmapped by the | 61 // value returned is valid only if the given range is currently mmapped by the |
| 62 // process. The |start_address| must be page-aligned. | 62 // process. The |start_address| must be page-aligned. |
| 63 static size_t CountResidentBytes(void* start_address, size_t mapped_size); | 63 static size_t CountResidentBytes(void* start_address, size_t mapped_size); |
| 64 #endif | 64 #endif |
| 65 | 65 |
| 66 ProcessMemoryDump(const scoped_refptr<MemoryDumpSessionState>& session_state); | 66 ProcessMemoryDump(scoped_refptr<MemoryDumpSessionState> session_state); |
| 67 ~ProcessMemoryDump(); | 67 ~ProcessMemoryDump(); |
| 68 | 68 |
| 69 // Creates a new MemoryAllocatorDump with the given name and returns the | 69 // Creates a new MemoryAllocatorDump with the given name and returns the |
| 70 // empty object back to the caller. | 70 // empty object back to the caller. |
| 71 // Arguments: | 71 // Arguments: |
| 72 // absolute_name: a name that uniquely identifies allocator dumps produced | 72 // absolute_name: a name that uniquely identifies allocator dumps produced |
| 73 // by this provider. It is possible to specify nesting by using a | 73 // by this provider. It is possible to specify nesting by using a |
| 74 // path-like string (e.g., v8/isolate1/heap1, v8/isolate1/heap2). | 74 // path-like string (e.g., v8/isolate1/heap1, v8/isolate1/heap2). |
| 75 // Leading or trailing slashes are not allowed. | 75 // Leading or trailing slashes are not allowed. |
| 76 // guid: an optional identifier, unique among all processes within the | 76 // guid: an optional identifier, unique among all processes within the |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 // Keeps track of relationships between MemoryAllocatorDump(s). | 189 // Keeps track of relationships between MemoryAllocatorDump(s). |
| 190 std::vector<MemoryAllocatorDumpEdge> allocator_dumps_edges_; | 190 std::vector<MemoryAllocatorDumpEdge> allocator_dumps_edges_; |
| 191 | 191 |
| 192 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDump); | 192 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDump); |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 } // namespace trace_event | 195 } // namespace trace_event |
| 196 } // namespace base | 196 } // namespace base |
| 197 | 197 |
| 198 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ | 198 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ |
| OLD | NEW |