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

Unified Diff: base/threading/thread.cc

Issue 7495031: trace_event support for thread names (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove process names. With thread names, they are redundant. 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/thread.cc
diff --git a/base/threading/thread.cc b/base/threading/thread.cc
index 7a100ca3610f1c29b7e0f1805e7ceef95361ea82..e7e12d7ca5482fd6710e34c1e6f5c7c1e8676c44 100644
--- a/base/threading/thread.cc
+++ b/base/threading/thread.cc
@@ -8,6 +8,7 @@
#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
#include "base/threading/thread_local.h"
#include "base/synchronization/waitable_event.h"
+#include "base/debug/trace_event.h"
namespace base {
@@ -149,6 +150,8 @@ void Thread::ThreadMain() {
thread_id_ = PlatformThread::CurrentId();
PlatformThread::SetName(name_.c_str());
ANNOTATE_THREAD_NAME(name_.c_str()); // Tell the name to race detector.
+ // Tell the name to TRACE_EVENT
+ debug::TraceLog::GetInstance()->SetCurrentThreadName(name_.c_str());
scheib 2011/07/26 18:47:16 Isn't this redundant with the call to PlatformThre
message_loop.set_thread_name(name_);
message_loop_ = &message_loop;
message_loop_proxy_ = MessageLoopProxy::CreateForCurrentThread();
« base/threading/platform_thread_posix.cc ('K') | « base/threading/platform_thread_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698