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

Issue 1411643006: Avoid data races on initializing GCScope. (Closed)

Created:
5 years, 1 month ago by sof
Modified:
5 years, 1 month ago
Reviewers:
oilpan-reviews, haraken
CC:
chromium-reviews, blink-reviews, haraken, kouhei+heap_chromium.org, oilpan-reviews, Mads Ager (chromium)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid data races on initializing GCScope. Fully initialize the stack-allocated GCScope object before having it enter a safe point, and attempt to have all the attached threads do the same ("parking" them.) By arranging for all updates to the GCScope object to happen before safe points are entered, we avoid overlapping r/w access of the thread stack regions that marking will proceed to conservatively scan for heap references. Such overlaps can happen if two threads concurrently attempt to initiate a GC. R=haraken BUG=527338 Committed: https://crrev.com/ce4a22fd3ac69b9648e14d2c91c75ed4c14e63f2 Cr-Commit-Position: refs/heads/master@{#358573}

Patch Set 1 #

Patch Set 2 : tidy up parkAllThreads() logic #

Total comments: 2

Patch Set 3 : move SafePointScope out of GCScope #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -36 lines) Patch
M third_party/WebKit/Source/platform/heap/Heap.cpp View 1 2 3 chunks +48 lines, -36 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
sof
please take a look.
5 years, 1 month ago (2015-11-09 05:57:31 UTC) #2
haraken
Thanks for looking into this! (I won't have time to write this CL this week...) ...
5 years, 1 month ago (2015-11-09 06:20:12 UTC) #4
sof
https://codereview.chromium.org/1411643006/diff/20001/third_party/WebKit/Source/platform/heap/Heap.cpp File third_party/WebKit/Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1411643006/diff/20001/third_party/WebKit/Source/platform/heap/Heap.cpp#newcode80 third_party/WebKit/Source/platform/heap/Heap.cpp:80: , m_safePointScope(stackState, gcType != BlinkGC::ThreadTerminationGC ? state : nullptr, ...
5 years, 1 month ago (2015-11-09 06:33:56 UTC) #5
haraken
LGTM
5 years, 1 month ago (2015-11-09 06:35:53 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1411643006/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1411643006/40001
5 years, 1 month ago (2015-11-09 06:41:09 UTC) #9
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 1 month ago (2015-11-09 09:04:20 UTC) #10
commit-bot: I haz the power
5 years, 1 month ago (2015-11-09 09:05:14 UTC) #11
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/ce4a22fd3ac69b9648e14d2c91c75ed4c14e63f2
Cr-Commit-Position: refs/heads/master@{#358573}

Powered by Google App Engine
This is Rietveld 408576698