| 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 ec82c10cede08db528e050e8b1c58e6f4c41c427..7fdb2dd23a19f9bb9b29adc0b5cee368480d8a61 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 HeapProfilerSerializationState;
|
| @@ -150,6 +153,32 @@ 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. The weak version creates a weak global dump.
|
| + // |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.
|
| + 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);
|
| +
|
| const AllocatorDumpEdgesMap& allocator_dumps_edges_for_testing() const {
|
| return allocator_dumps_edges_;
|
| }
|
| @@ -201,6 +230,13 @@ class BASE_EXPORT ProcessMemoryDump {
|
| MemoryAllocatorDump* AddAllocatorDumpInternal(
|
| std::unique_ptr<MemoryAllocatorDump> mad);
|
|
|
| + void CreateSharedMemoryOwnershipEdgeInternal(
|
| + const MemoryAllocatorDumpGuid& client_local_dump_guid,
|
| + const MemoryAllocatorDumpGuid& client_global_dump_guid,
|
| + const UnguessableToken& shared_memory_guid,
|
| + int importance,
|
| + bool is_weak);
|
| +
|
| MemoryAllocatorDump* GetBlackHoleMad();
|
|
|
| ProcessMemoryTotals process_totals_;
|
|
|