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

Issue 14634009: Move Thread Name Mapping into ThreadFunc. (Closed)

Created:
7 years, 7 months ago by dsinclair
Modified:
7 years, 7 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, scherkus (not reviewing)
Visibility:
Public.

Description

Move Thread Name Mapping into ThreadFunc. This CL moves the setting and removal of the ThreadIdNameMapping into the ThreadFunc methods. This removes any potential race conditions around thread name removal as the thread will be live during both addition and removal. BUG=238371 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202446

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 16

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Total comments: 4

Patch Set 11 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -26 lines) Patch
M base/threading/platform_thread_posix.cc View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
M base/threading/platform_thread_win.cc View 1 2 3 4 5 6 7 8 9 1 chunk +21 lines, -0 lines 0 comments Download
M base/threading/thread.cc View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M base/threading/thread_id_name_manager.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +19 lines, -4 lines 0 comments Download
M base/threading/thread_id_name_manager.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +50 lines, -17 lines 0 comments Download
M base/threading/thread_id_name_manager_unittest.cc View 2 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
dsinclair
jar@ PTAL.
7 years, 7 months ago (2013-05-07 16:55:44 UTC) #1
dsinclair
ping.
7 years, 7 months ago (2013-05-08 18:56:15 UTC) #2
jar (doing other things)
https://codereview.chromium.org/14634009/diff/1/base/threading/thread.cc File base/threading/thread.cc (right): https://codereview.chromium.org/14634009/diff/1/base/threading/thread.cc#newcode123 base/threading/thread.cc:123: ThreadIdNameManager::GetInstance()->RemoveName(thread_id_); Given the problem you had... this solution is ...
7 years, 7 months ago (2013-05-14 16:49:10 UTC) #3
dsinclair
https://codereview.chromium.org/14634009/diff/1/base/threading/thread.cc File base/threading/thread.cc (right): https://codereview.chromium.org/14634009/diff/1/base/threading/thread.cc#newcode123 base/threading/thread.cc:123: ThreadIdNameManager::GetInstance()->RemoveName(thread_id_); On 2013/05/14 16:49:10, jar wrote: > Given the ...
7 years, 7 months ago (2013-05-14 17:00:17 UTC) #4
jar (doing other things)
https://codereview.chromium.org/14634009/diff/1/base/threading/thread.cc File base/threading/thread.cc (right): https://codereview.chromium.org/14634009/diff/1/base/threading/thread.cc#newcode123 base/threading/thread.cc:123: ThreadIdNameManager::GetInstance()->RemoveName(thread_id_); On 2013/05/14 17:00:17, dsinclair wrote: > On 2013/05/14 ...
7 years, 7 months ago (2013-05-14 19:55:06 UTC) #5
dsinclair
On 2013/05/14 19:55:06, jar wrote: > You could do the unregister in the actual thread ...
7 years, 7 months ago (2013-05-16 20:07:51 UTC) #6
dsinclair
ping.
7 years, 7 months ago (2013-05-22 14:11:59 UTC) #7
jar (doing other things)
https://codereview.chromium.org/14634009/diff/28001/base/threading/platform_thread_win.cc File base/threading/platform_thread_win.cc (right): https://codereview.chromium.org/14634009/diff/28001/base/threading/platform_thread_win.cc#newcode63 base/threading/platform_thread_win.cc:63: return NULL; Wouldn't this be a great place to ...
7 years, 7 months ago (2013-05-22 19:37:55 UTC) #8
dsinclair
https://codereview.chromium.org/14634009/diff/28001/base/threading/platform_thread_win.cc File base/threading/platform_thread_win.cc (right): https://codereview.chromium.org/14634009/diff/28001/base/threading/platform_thread_win.cc#newcode63 base/threading/platform_thread_win.cc:63: return NULL; On 2013/05/22 19:37:56, jar wrote: > Wouldn't ...
7 years, 7 months ago (2013-05-22 20:22:31 UTC) #9
jar (doing other things)
https://codereview.chromium.org/14634009/diff/28001/base/threading/platform_thread_win.cc File base/threading/platform_thread_win.cc (right): https://codereview.chromium.org/14634009/diff/28001/base/threading/platform_thread_win.cc#newcode63 base/threading/platform_thread_win.cc:63: return NULL; On 2013/05/22 20:22:31, dsinclair wrote: > On ...
7 years, 7 months ago (2013-05-22 21:36:47 UTC) #10
dsinclair
https://codereview.chromium.org/14634009/diff/28001/base/threading/platform_thread_win.cc File base/threading/platform_thread_win.cc (right): https://codereview.chromium.org/14634009/diff/28001/base/threading/platform_thread_win.cc#newcode63 base/threading/platform_thread_win.cc:63: return NULL; On 2013/05/22 21:36:48, jar wrote: > On ...
7 years, 7 months ago (2013-05-23 18:21:53 UTC) #11
jar (doing other things)
Just nits... and then LGTM. https://codereview.chromium.org/14634009/diff/83001/base/threading/simple_thread.cc File base/threading/simple_thread.cc (right): https://codereview.chromium.org/14634009/diff/83001/base/threading/simple_thread.cc#newcode10 base/threading/simple_thread.cc:10: #include "base/threading/thread_id_name_manager.h" nit: Do ...
7 years, 7 months ago (2013-05-25 00:25:09 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dsinclair@chromium.org/14634009/94001
7 years, 7 months ago (2013-05-27 13:53:58 UTC) #13
commit-bot: I haz the power
Change committed as 202446
7 years, 7 months ago (2013-05-27 16:37:40 UTC) #14
dsinclair
7 years, 7 months ago (2013-05-27 18:50:59 UTC) #15
Message was sent while issue was closed.
https://codereview.chromium.org/14634009/diff/83001/base/threading/simple_thr...
File base/threading/simple_thread.cc (right):

https://codereview.chromium.org/14634009/diff/83001/base/threading/simple_thr...
base/threading/simple_thread.cc:10: #include
"base/threading/thread_id_name_manager.h"
On 2013/05/25 00:25:09, jar wrote:
> nit: Do you still need this include?

Nope. Done.

https://codereview.chromium.org/14634009/diff/83001/base/threading/thread_id_...
File base/threading/thread_id_name_manager.h (right):

https://codereview.chromium.org/14634009/diff/83001/base/threading/thread_id_...
base/threading/thread_id_name_manager.h:58: // Treat the main process specially
as it doesn't have a PlatformThreadHandle
On 2013/05/25 00:25:09, jar wrote:
> nit: period at end of sentence... and you might have to wrap the line the line
> at 80 columns if you can't be more terns.

Done.

Powered by Google App Engine
This is Rietveld 408576698