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

Issue 18650006: base: Make SequencedWorkerPool issue globally unique SequenceTokens. (Closed)

Created:
7 years, 5 months ago by tommycli
Modified:
7 years, 5 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

base: Make SequencedWorkerPool issue globally unique SequenceTokens. SequencedWorkerPool currently issues SequenceTokens out of an internal member counter. This means that two different SequencedWorkerPool instances can issue identical SequenceTokens, which mucks up any attempt to distinguish sequences using only SequenceTokens. This change makes the SequenceTokens issued from an StaticAtomicSequenceNumber, which is globally shared amongst all SequencedWorkerPools. This change also makes the SequencedWorkerPool included in the nacl_untrusted builds, as it is needed for SequenceChecker and WeakPtr to work correctly. It previously was excluded because it used base/metrics. I've #ifdefed the base/metrics usage out for nacl. This issue is a spinoff and pre-requisite of issue 18501008: Make WeakPtr use SequenceChecker instead of ThreadChecker. R=akalin,darin BUG=165590 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210423

Patch Set 1 #

Total comments: 6

Patch Set 2 : Change CurrentThreadSequenceToken to return a SequenceToken. #

Total comments: 6

Patch Set 3 : Address darin comments #

Patch Set 4 : Remove a space #

Total comments: 1

Patch Set 5 : base: SequencedWorkerPool Globally Unique Tokens with unused-variable fix. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -13 lines) Patch
M base/base.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M base/threading/sequenced_worker_pool.h View 1 2 3 chunks +11 lines, -1 line 0 comments Download
M base/threading/sequenced_worker_pool.cc View 1 2 3 4 13 chunks +42 lines, -9 lines 0 comments Download
M base/threading/sequenced_worker_pool_unittest.cc View 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
tommycli
akalin/darin: At akalin's request, this is an issue with the SequencedWorkerPool changes broken out. This ...
7 years, 5 months ago (2013-07-03 20:21:28 UTC) #1
akalin
https://codereview.chromium.org/18650006/diff/1/base/base.gypi File base/base.gypi (left): https://codereview.chromium.org/18650006/diff/1/base/base.gypi#oldcode704 base/base.gypi:704: 'threading/sequenced_worker_pool.cc', can you mention the nacl-specific changes in the ...
7 years, 5 months ago (2013-07-03 20:41:14 UTC) #2
tommycli
https://codereview.chromium.org/18650006/diff/1/base/base.gypi File base/base.gypi (left): https://codereview.chromium.org/18650006/diff/1/base/base.gypi#oldcode704 base/base.gypi:704: 'threading/sequenced_worker_pool.cc', On 2013/07/03 20:41:14, akalin wrote: > can you ...
7 years, 5 months ago (2013-07-03 21:04:02 UTC) #3
akalin
D'oh, forgot to send this out earlier. https://codereview.chromium.org/18650006/diff/1/base/threading/sequenced_worker_pool.h File base/threading/sequenced_worker_pool.h (right): https://codereview.chromium.org/18650006/diff/1/base/threading/sequenced_worker_pool.h#newcode149 base/threading/sequenced_worker_pool.h:149: static bool ...
7 years, 5 months ago (2013-07-03 22:43:46 UTC) #4
tommycli
akalin: changed the code to address your last comment. https://codereview.chromium.org/18650006/diff/1/base/threading/sequenced_worker_pool.h File base/threading/sequenced_worker_pool.h (right): https://codereview.chromium.org/18650006/diff/1/base/threading/sequenced_worker_pool.h#newcode149 base/threading/sequenced_worker_pool.h:149: ...
7 years, 5 months ago (2013-07-03 23:23:12 UTC) #5
akalin
lgtm jar might be a better owners reviewer for this, as he's quite familiar with ...
7 years, 5 months ago (2013-07-03 23:50:12 UTC) #6
tommycli
akalin: Thanks for the lg. I'll ask jar. jar: akalin recommended you as OWNER reviewer ...
7 years, 5 months ago (2013-07-03 23:58:29 UTC) #7
tommycli
darin: Or if you have time darin, that would be cool too.
7 years, 5 months ago (2013-07-03 23:59:16 UTC) #8
darin (slow to review)
LGTM, just some nits: https://codereview.chromium.org/18650006/diff/7001/base/threading/sequenced_worker_pool.cc File base/threading/sequenced_worker_pool.cc (right): https://codereview.chromium.org/18650006/diff/7001/base/threading/sequenced_worker_pool.cc#newcode222 base/threading/sequenced_worker_pool.cc:222: SequencedWorkerPool::SequenceToken> > lazy_tls_ptr = nit: ...
7 years, 5 months ago (2013-07-05 05:24:19 UTC) #9
tommycli
https://chromiumcodereview.appspot.com/18650006/diff/7001/base/threading/sequenced_worker_pool.cc File base/threading/sequenced_worker_pool.cc (right): https://chromiumcodereview.appspot.com/18650006/diff/7001/base/threading/sequenced_worker_pool.cc#newcode222 base/threading/sequenced_worker_pool.cc:222: SequencedWorkerPool::SequenceToken> > lazy_tls_ptr = On 2013/07/05 05:24:19, darin wrote: ...
7 years, 5 months ago (2013-07-08 17:42:15 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommycli@chromium.org/18650006/21001
7 years, 5 months ago (2013-07-08 17:58:46 UTC) #11
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=14086
7 years, 5 months ago (2013-07-08 18:07:24 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommycli@chromium.org/18650006/34001
7 years, 5 months ago (2013-07-08 18:19:07 UTC) #13
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 5 months ago (2013-07-08 18:39:36 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommycli@chromium.org/18650006/34001
7 years, 5 months ago (2013-07-08 18:43:14 UTC) #15
commit-bot: I haz the power
Change committed as 210423
7 years, 5 months ago (2013-07-08 21:30:01 UTC) #16
Ami GONE FROM CHROMIUM
https://chromiumcodereview.appspot.com/18650006/diff/34001/base/threading/sequenced_worker_pool.cc File base/threading/sequenced_worker_pool.cc (right): https://chromiumcodereview.appspot.com/18650006/diff/34001/base/threading/sequenced_worker_pool.cc#newcode692 base/threading/sequenced_worker_pool.cc:692: TimeTicks::Now() - shutdown_wait_begin); This change makes shutdown_wait_begin a write-only ...
7 years, 5 months ago (2013-07-09 00:15:57 UTC) #17
tommycli
7 years, 5 months ago (2013-07-09 00:23:13 UTC) #18
Message was sent while issue was closed.
I added an !OS_NACL to that line also. Thanks!

On 2013/07/09 00:15:57, Ami Fischman wrote:
>
https://chromiumcodereview.appspot.com/18650006/diff/34001/base/threading/seq...
> File base/threading/sequenced_worker_pool.cc (right):
> 
>
https://chromiumcodereview.appspot.com/18650006/diff/34001/base/threading/seq...
> base/threading/sequenced_worker_pool.cc:692: TimeTicks::Now() -
> shutdown_wait_begin);
> This change makes shutdown_wait_begin a write-only variable on OS_NACL, which
> broke this bot: 
> 
>
http://build.chromium.org/p/chromium.webrtc/builders/ChromiumOS%2520%255Bdais...
> 
> Can you add ALLOW_UNUSED to the decl at l.682 or also wrap that line in a
> !OS_NACL check?

Powered by Google App Engine
This is Rietveld 408576698