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

Issue 2190333002: Teach compiler jobs how to actually parse (Closed)

Created:
4 years, 4 months ago by jochen (gone - plz use gerrit)
Modified:
4 years, 4 months ago
Reviewers:
vogelheim, marja
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Teach compiler jobs how to actually parse BUG=v8:5215 R=marja@chromium.org,vogelheim@chromium.org Committed: https://crrev.com/edd65cc4286fab89d71f80bfda6e6c35be5c4543 Cr-Commit-Position: refs/heads/master@{#38170}

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -13 lines) Patch
M src/base/atomic-utils.h View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler-dispatcher/compiler-dispatcher-job.h View 3 chunks +16 lines, -3 lines 2 comments Download
M src/compiler-dispatcher/compiler-dispatcher-job.cc View 4 chunks +43 lines, -4 lines 4 comments Download
M test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc View 2 chunks +64 lines, -5 lines 0 comments Download

Messages

Total messages: 12 (5 generated)
jochen (gone - plz use gerrit)
4 years, 4 months ago (2016-07-29 09:28:34 UTC) #1
marja
lgtm
4 years, 4 months ago (2016-07-29 09:55:58 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2190333002/1
4 years, 4 months ago (2016-07-29 09:58:37 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 4 months ago (2016-07-29 10:06:01 UTC) #8
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/edd65cc4286fab89d71f80bfda6e6c35be5c4543 Cr-Commit-Position: refs/heads/master@{#38170}
4 years, 4 months ago (2016-07-29 10:09:33 UTC) #10
vogelheim
lgtm I don't get the concurrency stuff, though. https://codereview.chromium.org/2190333002/diff/1/src/compiler-dispatcher/compiler-dispatcher-job.cc File src/compiler-dispatcher/compiler-dispatcher-job.cc (right): https://codereview.chromium.org/2190333002/diff/1/src/compiler-dispatcher/compiler-dispatcher-job.cc#newcode30 src/compiler-dispatcher/compiler-dispatcher-job.cc:30: if ...
4 years, 4 months ago (2016-07-29 10:19:56 UTC) #11
jochen (gone - plz use gerrit)
4 years, 4 months ago (2016-07-29 10:27:45 UTC) #12
Message was sent while issue was closed.
https://codereview.chromium.org/2190333002/diff/1/src/compiler-dispatcher/com...
File src/compiler-dispatcher/compiler-dispatcher-job.cc (right):

https://codereview.chromium.org/2190333002/diff/1/src/compiler-dispatcher/com...
src/compiler-dispatcher/compiler-dispatcher-job.cc:30: if
(source->IsExternalTwoByteString()) {
On 2016/07/29 at 10:19:56, vogelheim wrote:
> nitpick:
> 
> can_parse_on_background_thread_ = source->IsExternalOneByteString() ||
source->isExternalTwoByteString();

will update in my next cl

https://codereview.chromium.org/2190333002/diff/1/src/compiler-dispatcher/com...
src/compiler-dispatcher/compiler-dispatcher-job.cc:80: DCHECK(status() ==
CompileJobStatus::kReadyToParse);
On 2016/07/29 at 10:19:56, vogelheim wrote:
> I don't understand the concurrency model.
> 
> - You've made status_ an atomic variable, so you expect it to be called
without any external synchronization.
> - Nothing else here is lock-guarded or atomic, so clearly non of the rest
expects to be called concurrently, but assumes that the caller has made sure
this object is 'theirs'.
> - Presumably, the caller would make some sort of decisions based on status().
> -  But.. you only update it at the end, which looks like there might be a race
condition. That is, something has called Parse(), and another is calling
status(), presumably to determine whether it may call Parse() also.
> 
> This doesn't seem to fit together... care to explain?

Yeah, I guess I can make it non-atomic and just introduce a lock to be held once
the dispatcher exists and can invoke stuff on several threads

https://codereview.chromium.org/2190333002/diff/1/src/compiler-dispatcher/com...
File src/compiler-dispatcher/compiler-dispatcher-job.h (right):

https://codereview.chromium.org/2190333002/diff/1/src/compiler-dispatcher/com...
src/compiler-dispatcher/compiler-dispatcher-job.h:51:
base::AtomicValue<CompileJobStatus>(CompileJobStatus::kInitial);
On 2016/07/29 at 10:19:56, vogelheim wrote:
> Why initialize here, and not in constructor?

so you see in the header that this is independend of the ctor parameters

Powered by Google App Engine
This is Rietveld 408576698