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

Unified Diff: base/threading/platform_thread_linux.cc

Issue 1845753006: Don't create redundant ThreadData for Worker Threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comment Created 4 years, 7 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
« no previous file with comments | « base/threading/platform_thread_freebsd.cc ('k') | base/threading/platform_thread_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/platform_thread_linux.cc
diff --git a/base/threading/platform_thread_linux.cc b/base/threading/platform_thread_linux.cc
index 95ed32418ff49bdce1cfc91b846374000f62a4e3..6c1b83335d9075d49511de457b4c53007d4bbe8e 100644
--- a/base/threading/platform_thread_linux.cc
+++ b/base/threading/platform_thread_linux.cc
@@ -66,9 +66,11 @@ bool GetCurrentThreadPriorityForPlatform(ThreadPriority* priority) {
} // namespace internal
// static
-void PlatformThread::SetName(const std::string& name) {
+void PlatformThread::SetName(const std::string& name,
+ bool is_worker_thread) {
Lei Zhang 2016/05/31 21:43:24 nit: fix on the previous line, just like all the o
ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name);
- tracked_objects::ThreadData::InitializeThreadContext(name);
+ if (!is_worker_thread)
+ tracked_objects::ThreadData::InitializeThreadContext(name);
#if !defined(OS_NACL)
// On linux we can get the thread names to show up in the debugger by setting
« no previous file with comments | « base/threading/platform_thread_freebsd.cc ('k') | base/threading/platform_thread_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698