Index: base/trace_event/memory_allocator_dump_guid.h |
diff --git a/base/trace_event/memory_allocator_dump_guid.h b/base/trace_event/memory_allocator_dump_guid.h |
index 84c12ef037401fe035ce4a3f5966cd4e9f617a46..141c9464fce5124c58cd20348847a1a99e292754 100644 |
--- a/base/trace_event/memory_allocator_dump_guid.h |
+++ b/base/trace_event/memory_allocator_dump_guid.h |
@@ -19,10 +19,18 @@ class BASE_EXPORT MemoryAllocatorDumpGuid { |
explicit MemoryAllocatorDumpGuid(uint64 guid); |
// Utility ctor to hash a GUID if the caller prefers a string. The caller |
- // still has to ensure that |guid_str| is unique, per snapshot, within the |
- // global scope of all the traced processes. |
+ // can insert "$$" in the string and it will be replaced by the unique child |
+ // process id for creating cross-process unique guid. Otherwise the caller |
+ // has to ensure that |guid_str| is unique, per snapshot, within the global |
+ // scope of all the traced processes. |
+ // NOTE: In single process mode the "$$" does not get replaced and the caller |
+ // has to set the id. |
explicit MemoryAllocatorDumpGuid(const std::string& guid_str); |
+ // Sets the unique id of the child process for creating cross process unique |
+ // guids. |
+ static void SetUniqueChildProcessId(int child_process_id); |
+ |
// Returns a (hex-encoded) string representation of the guid. |
std::string ToString() const; |