Skip to content

Commit 5e27547

Browse files
author
William Kemper
committed
8355789: GenShen: assert(_degen_point == ShenandoahGC::_degenerated_unset) failed: Should not be set yet: Outside of Cycle
Reviewed-by: kdnilsen, ysr
1 parent 6850757 commit 5e27547

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

src/hotspot/share/gc/shenandoah/shenandoahGenerationalControlThread.cpp

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -482,17 +482,14 @@ bool ShenandoahGenerationalControlThread::resume_concurrent_old_cycle(Shenandoah
482482
}
483483

484484
if (_heap->cancelled_gc()) {
485-
// It's possible the gc cycle was cancelled after the last time
486-
// the collection checked for cancellation. In which case, the
487-
// old gc cycle is still completed, and we have to deal with this
488-
// cancellation. We set the degeneration point to be outside
489-
// the cycle because if this is an allocation failure, that is
490-
// what must be done (there is no degenerated old cycle). If the
491-
// cancellation was due to a heuristic wanting to start a young
492-
// cycle, then we are not actually going to a degenerated cycle,
493-
// so the degenerated point doesn't matter here.
494-
check_cancellation_or_degen(ShenandoahGC::_degenerated_outside_cycle);
495-
if (cause == GCCause::_shenandoah_concurrent_gc) {
485+
// It's possible the gc cycle was cancelled after the last time the collection checked for cancellation. In which
486+
// case, the old gc cycle is still completed, and we have to deal with this cancellation. We set the degeneration
487+
// point to be outside the cycle because if this is an allocation failure, that is what must be done (there is no
488+
// degenerated old cycle). If the cancellation was due to a heuristic wanting to start a young cycle, then we are
489+
// not actually going to a degenerated cycle, so don't set the degeneration point here.
490+
if (ShenandoahCollectorPolicy::is_allocation_failure(cause)) {
491+
check_cancellation_or_degen(ShenandoahGC::_degenerated_outside_cycle);
492+
} else if (cause == GCCause::_shenandoah_concurrent_gc) {
496493
_heap->shenandoah_policy()->record_interrupted_old();
497494
}
498495
return false;

0 commit comments

Comments
 (0)