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

Unified Diff: base/threading/platform_thread_posix.cc

Issue 8565036: Set the profiler's thread name at a central place (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
« no previous file with comments | « no previous file | base/threading/platform_thread_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/platform_thread_posix.cc
===================================================================
--- base/threading/platform_thread_posix.cc (revision 110001)
+++ base/threading/platform_thread_posix.cc (working copy)
@@ -13,6 +13,7 @@
#include "base/safe_strerror_posix.h"
#include "base/threading/thread_local.h"
#include "base/threading/thread_restrictions.h"
+#include "base/tracked_objects.h"
#if defined(OS_MACOSX)
#include <mach/mach.h>
@@ -175,6 +176,7 @@
// have to cast away const because ThreadLocalPointer does not support const
// void*
current_thread_name.Pointer()->Set(const_cast<char*>(name));
+ tracked_objects::ThreadData::InitializeThreadContext(name);
// http://0pointer.de/blog/projects/name-your-threads.html
@@ -210,6 +212,7 @@
// have to cast away const because ThreadLocalPointer does not support const
// void*
current_thread_name.Pointer()->Set(const_cast<char*>(name));
+ tracked_objects::ThreadData::InitializeThreadContext(name);
// (This should be relatively simple to implement for the BSDs; I
// just don't have one handy to test the code on.)
« no previous file with comments | « no previous file | base/threading/platform_thread_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698