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

Unified Diff: base/threading/platform_thread.h

Issue 7495031: trace_event support for thread names (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Much cleaner, using siggi's approach.p Created 9 years, 5 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/threading/platform_thread.h
diff --git a/base/threading/platform_thread.h b/base/threading/platform_thread.h
index 230d2099f7b92ed222333f794334e9f643150d1f..6b538f549d85abe34482d4e2c67ac99fbb230d32 100644
--- a/base/threading/platform_thread.h
+++ b/base/threading/platform_thread.h
@@ -74,9 +74,13 @@ class BASE_API PlatformThread {
// Sleeps for the specified duration (units are milliseconds).
static void Sleep(int duration_ms);
- // Sets the thread name visible to a debugger. This has no effect otherwise.
+ // Sets the thread name visible to debuggers/tools. This has no effect
+ // otherwise.
Sigurður Ásgeirsson 2011/08/04 12:31:39 As you don't copy the name, I think you've added a
nduca 2011/08/04 18:17:38 Actually, that's not the case --- the pointer here
static void SetName(const char* name);
+ // Gets the thread name, if previously set by SetTName.
Sigurður Ásgeirsson 2011/08/04 12:31:39 SetTName->SetName
nduca 2011/08/04 18:17:38 Done.
+ static const char* GetName();
+
// Creates a new thread. The |stack_size| parameter can be 0 to indicate
// that the default stack size should be used. Upon success,
// |*thread_handle| will be assigned a handle to the newly created thread,

Powered by Google App Engine
This is Rietveld 408576698