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

Issue 1153533002: Oilpan: complete current sweep before preparing for new GC. (Closed)

Created:
5 years, 7 months ago by sof
Modified:
5 years, 7 months ago
Reviewers:
oilpan-reviews, haraken
CC:
blink-reviews
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Oilpan: complete current sweep before preparing for new GC. If collectGarbage() is called while sweeping is in progress, complete the sweeping before recording what GCState to revert back to should we fail to get the other threads to stop at a safe point. Otherwise we risk reverting back to a sweeping state that has been completed & advanced past. R=haraken BUG=487952 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=195758

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M Source/platform/heap/Heap.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M Source/platform/heap/ThreadState.cpp View 1 chunk +0 lines, -1 line 3 comments Download

Messages

Total messages: 11 (3 generated)
sof
please take a look.
5 years, 7 months ago (2015-05-21 20:39:29 UTC) #2
haraken
LGTM https://codereview.chromium.org/1153533002/diff/1/Source/platform/heap/ThreadState.cpp File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/1153533002/diff/1/Source/platform/heap/ThreadState.cpp#newcode740 Source/platform/heap/ThreadState.cpp:740: VERIFY_STATE_TRANSITION(m_gcState == NoGCScheduled || m_gcState == IdleGCScheduled || ...
5 years, 7 months ago (2015-05-21 23:01:35 UTC) #4
sof
https://codereview.chromium.org/1153533002/diff/1/Source/platform/heap/ThreadState.cpp File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/1153533002/diff/1/Source/platform/heap/ThreadState.cpp#newcode740 Source/platform/heap/ThreadState.cpp:740: VERIFY_STATE_TRANSITION(m_gcState == NoGCScheduled || m_gcState == IdleGCScheduled || m_gcState ...
5 years, 7 months ago (2015-05-22 05:07:05 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1153533002/1
5 years, 7 months ago (2015-05-22 05:07:41 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://src.chromium.org/viewvc/blink?view=rev&revision=195758
5 years, 7 months ago (2015-05-22 05:11:38 UTC) #8
haraken
https://codereview.chromium.org/1153533002/diff/1/Source/platform/heap/ThreadState.cpp File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/1153533002/diff/1/Source/platform/heap/ThreadState.cpp#newcode740 Source/platform/heap/ThreadState.cpp:740: VERIFY_STATE_TRANSITION(m_gcState == NoGCScheduled || m_gcState == IdleGCScheduled || m_gcState ...
5 years, 7 months ago (2015-05-22 05:13:05 UTC) #9
sof
On 2015/05/22 05:13:05, haraken wrote: > https://codereview.chromium.org/1153533002/diff/1/Source/platform/heap/ThreadState.cpp > File Source/platform/heap/ThreadState.cpp (right): > > https://codereview.chromium.org/1153533002/diff/1/Source/platform/heap/ThreadState.cpp#newcode740 > ...
5 years, 7 months ago (2015-05-22 05:15:19 UTC) #10
haraken
5 years, 7 months ago (2015-05-22 05:18:49 UTC) #11
Message was sent while issue was closed.
On 2015/05/22 05:15:19, sof wrote:
> On 2015/05/22 05:13:05, haraken wrote:
> >
>
https://codereview.chromium.org/1153533002/diff/1/Source/platform/heap/Thread...
> > File Source/platform/heap/ThreadState.cpp (right):
> > 
> >
>
https://codereview.chromium.org/1153533002/diff/1/Source/platform/heap/Thread...
> > Source/platform/heap/ThreadState.cpp:740: VERIFY_STATE_TRANSITION(m_gcState
==
> > NoGCScheduled || m_gcState == IdleGCScheduled || m_gcState ==
> PreciseGCScheduled
> > || m_gcState == FullGCScheduled || m_gcState == Sweeping || m_gcState ==
> > SweepingAndIdleGCScheduled || m_gcState == SweepingAndPreciseGCScheduled);
> > On 2015/05/22 05:07:05, sof wrote:
> > > On 2015/05/21 23:01:35, haraken wrote:
> > > > 
> > > > I think you can now remove a couple of states from here, since it's
> > guaranteed
> > > > that sweeping is no progress at this point.
> > > 
> > > Maybe, not so sure -- sweeping might be forbidden when collectGarbage() is
> > > called.
> > 
> > Since you're calling completeSweep() before setting the StoppingOtherThreads
> > state, I think we can remove Sweeping, SweepingAndIdleGCScheduled and
> > SweepingAndPreciseGCScheduled.
> > 
> > Instead you can add ASSERT(!isSweepInProgress()).
> 
> Doesn't completeSweep() bail out on sweepForbidden() ?

That can happen only if completeSweep is called recursively, as commented on the
sweepForbidden check. After finishing the out-most completeSweep,
ASSERT(isSweepInProgress()) must hold.

If you'd argue that the out-most completeSweep can bail out, the completeSweep
added to this CL won't do the work you expect, and that would be a problem
anyway, I guess.

Powered by Google App Engine
This is Rietveld 408576698