| 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 634ca8133b53200ecc7bc9cfa9300642ed8ecebc..51958e0f3a59a708e4a731938082930160c728d6 100644
|
| --- a/base/trace_event/memory_allocator_dump_guid.h
|
| +++ b/base/trace_event/memory_allocator_dump_guid.h
|
| @@ -15,14 +15,24 @@ namespace trace_event {
|
|
|
| class BASE_EXPORT MemoryAllocatorDumpGuid {
|
| public:
|
| + static const int kInvalidChildProcessId = -1;
|
| +
|
| 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 or when tracing is not enabled 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. Pass kInvalidChildProcessId for invalidating the id.
|
| + static void SetUniqueChildProcessId(int child_process_id);
|
| +
|
| uint64 ToUint64() const { return guid_; }
|
|
|
| // Returns a (hex-encoded) string representation of the guid.
|
|
|