Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3442)

Unified Diff: base/trace_event/memory_allocator_dump_guid.h

Issue 1173263004: [tracing] Send unique tracing process id for cross-process memory dumps identification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing nits. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
« no previous file with comments | « no previous file | base/trace_event/memory_allocator_dump_guid.cc » ('j') | base/trace_event/memory_allocator_dump_guid.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698