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

Issue 1409993012: Add {CancelableTaskManager} to handle {Cancelable} concurrent tasks. (Closed)

Created:
5 years, 1 month ago by Michael Lippautz
Modified:
5 years, 1 month ago
CC:
v8-reviews_googlegroups.com, jochen (gone - plz use gerrit)
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Add {CancelableTaskManager} to handle {Cancelable} concurrent tasks. This change binds each {Cancelable} task to a so-called {CancelableTaskManager}, which is then used to handle concurrent cancelation as well as synchronizing shutdown for already running tasks. Since ownership of tasks is transferred to the platform executing a task (destructor), handling in the manager uses integer ids. Note that this also mitigates (modulo integer size) the ABA problem. All handling of {Cancelable} tasks is now encapsulated into the corresponding manager, which is instantiated for each isolate. R=hpayer@chromium.org BUG=chromium:524425 LOG=N CQ_EXTRA_TRYBOTS=tryserver.v8:v8_linux_arm64_gc_stress_dbg;tryserver.v8:v8_linux_gc_stress_dbg;tryserver.v8:v8_mac_gc_stress_dbg;tryserver.v8:v8_linux64_msan_rel;tryserver.v8:v8_linux64_tsan_rel;tryserver.v8:v8_mac64_asan_rel Committed: https://crrev.com/60e7ea8a9970f5a08c14a0aa052c099ac4ea4c08 Cr-Commit-Position: refs/heads/master@{#31997}

Patch Set 1 : First try: incomplete/blocking #

Total comments: 6

Patch Set 2 : Improved version #

Patch Set 3 : Fixed concurrent version including unittests #

Total comments: 1

Patch Set 4 : Minor api fixes #

Patch Set 5 : Fix test and api #

Total comments: 9

Patch Set 6 : Addressed API comments #

Total comments: 14

Patch Set 7 : Addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+417 lines, -39 lines) Patch
M src/cancelable-task.h View 1 2 3 4 5 6 3 chunks +96 lines, -8 lines 0 comments Download
M src/cancelable-task.cc View 1 2 3 4 5 6 1 chunk +86 lines, -5 lines 0 comments Download
M src/global-handles.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M src/heap/incremental-marking-job.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M src/heap/scavenge-job.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/isolate.h View 1 2 3 4 5 6 2 chunks +4 lines, -3 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 5 6 4 chunks +5 lines, -16 lines 0 comments Download
A test/unittests/cancelable-tasks-unittest.cc View 1 2 3 4 5 1 chunk +218 lines, -0 lines 0 comments Download
M test/unittests/unittests.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 39 (23 generated)
Hannes Payer (out of office)
https://codereview.chromium.org/1409993012/diff/1/src/cancelable-task.cc File src/cancelable-task.cc (right): https://codereview.chromium.org/1409993012/diff/1/src/cancelable-task.cc#newcode15 src/cancelable-task.cc:15: : isolate_(isolate), status_(kWaiting) { atomic set? https://codereview.chromium.org/1409993012/diff/1/src/cancelable-task.cc#newcode21 src/cancelable-task.cc:21: if ...
5 years, 1 month ago (2015-11-04 23:19:00 UTC) #2
Michael Lippautz
PTAL -- this is the rewrite after we discussed the design goals offline. It does ...
5 years, 1 month ago (2015-11-05 23:04:16 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1409993012/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1409993012/60001
5 years, 1 month ago (2015-11-05 23:08:31 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-05 23:28:34 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1409993012/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1409993012/80001
5 years, 1 month ago (2015-11-10 02:32:29 UTC) #15
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-10 02:50:24 UTC) #17
Michael Lippautz
https://codereview.chromium.org/1409993012/diff/80001/src/cancelable-task.cc File src/cancelable-task.cc (right): https://codereview.chromium.org/1409993012/diff/80001/src/cancelable-task.cc#newcode42 src/cancelable-task.cc:42: while (cancelable_tasks_.Lookup(reinterpret_cast<void*>(id), id) != nullptr) { We could just ...
5 years, 1 month ago (2015-11-10 18:00:05 UTC) #18
Hannes Payer (out of office)
First round of API comments. https://codereview.chromium.org/1409993012/diff/200001/src/cancelable-task.h File src/cancelable-task.h (right): https://codereview.chromium.org/1409993012/diff/200001/src/cancelable-task.h#newcode26 src/cancelable-task.h:26: // Registers a new ...
5 years, 1 month ago (2015-11-12 22:01:50 UTC) #23
Michael Lippautz
https://codereview.chromium.org/1409993012/diff/200001/src/cancelable-task.h File src/cancelable-task.h (right): https://codereview.chromium.org/1409993012/diff/200001/src/cancelable-task.h#newcode26 src/cancelable-task.h:26: // Registers a new {Cancelable} task. On 2015/11/12 22:01:50, ...
5 years, 1 month ago (2015-11-12 22:15:21 UTC) #24
Hannes Payer (out of office)
lgtm https://codereview.chromium.org/1409993012/diff/220001/src/cancelable-task.cc File src/cancelable-task.cc (right): https://codereview.chromium.org/1409993012/diff/220001/src/cancelable-task.cc#newcode23 src/cancelable-task.cc:23: if (TryRun() || IsRunning()) { Setting it to ...
5 years, 1 month ago (2015-11-13 20:03:22 UTC) #26
Michael Lippautz
Addressed all comments. Additionally I added a check for not generating 0 ids, as they ...
5 years, 1 month ago (2015-11-13 22:51:03 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1409993012/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1409993012/240001
5 years, 1 month ago (2015-11-13 22:52:29 UTC) #29
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-13 23:13:34 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1409993012/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1409993012/240001
5 years, 1 month ago (2015-11-13 23:20:24 UTC) #37
commit-bot: I haz the power
Committed patchset #7 (id:240001)
5 years, 1 month ago (2015-11-14 01:20:13 UTC) #38
commit-bot: I haz the power
5 years, 1 month ago (2015-11-14 23:22:05 UTC) #39
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/60e7ea8a9970f5a08c14a0aa052c099ac4ea4c08
Cr-Commit-Position: refs/heads/master@{#31997}

Powered by Google App Engine
This is Rietveld 408576698