DescriptionAvoid 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 #Messages
Total messages: 11 (4 generated)
|