Chromium Code Reviews| Index: base/trace_event/process_memory_dump.h |
| diff --git a/base/trace_event/process_memory_dump.h b/base/trace_event/process_memory_dump.h |
| index d632d45a7ce5bb2eb509bbbc42b8080b7c574c27..51587e0b29bec08eb566a743d4d0b2d738c70777 100644 |
| --- a/base/trace_event/process_memory_dump.h |
| +++ b/base/trace_event/process_memory_dump.h |
| @@ -30,6 +30,9 @@ |
| #endif |
| namespace base { |
| + |
| +class UnguessableToken; |
| + |
| namespace trace_event { |
| class MemoryDumpSessionState; |
| @@ -148,6 +151,34 @@ class BASE_EXPORT ProcessMemoryDump { |
| const MemoryAllocatorDumpGuid& target, |
| int importance); |
| + // Creates ownership edges for memory backed by base::SharedMemory. Handles |
| + // the case of cross process sharing and importnace of ownership for the case |
| + // with and without the base::SharedMemory dump provider. The new version |
| + // should just use global dumps created by SharedMemoryTracker and this |
| + // function handles the transition until we get SharedMemory IDs through mojo |
| + // channel crbug.com/713763. |
| + // |client_local_dump_guid| The guid of the local dump created by the client |
| + // of base::SharedMemory. |
| + // |client_global_dump_guid| The global guid given by the clients to create |
| + // ownership edges of their own. These global dumps will no longer be required |
| + // after the transition. |
| + // |shared_memory_guid| The ID of the base::SharedMemory that is assigned |
| + // globally, used to create global dump edges in the new model. |
| + // |importance| Importance of the global dump edges to say if the current |
| + // process owns the memory segment. |
| + // |is_weak| Tells if the global dump created should be a weak dump. |
| + void CreateSharedMemoryOwnershipEdge( |
| + const MemoryAllocatorDumpGuid& client_local_dump_guid, |
| + const MemoryAllocatorDumpGuid& client_global_dump_guid, |
| + const UnguessableToken& shared_memory_guid, |
| + int importance); |
| + void CreateWeakSharedMemoryOwnershipEdge( |
| + const MemoryAllocatorDumpGuid& client_local_dump_guid, |
| + const MemoryAllocatorDumpGuid& client_global_dump_guid, |
| + const UnguessableToken& shared_memory_guid, |
| + int importance, |
| + bool is_weak); |
|
hajimehoshi
2017/06/07 04:58:04
Exposing the last argument |is_weak| is odd. I'd c
ssid
2017/06/08 00:05:58
Oh yes. fixed.
|
| + |
| const AllocatorDumpEdgesMap& allocator_dumps_edges_for_testing() const { |
| return allocator_dumps_edges_; |
| } |