Mercurial > hg > graal-compiler
diff src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @ 3982:273b46400613
7086533: G1: assert(!_g1->is_obj_dead(obj)): We should not be preserving dead objs: g1CollectedHeap.cpp:3835
Summary: Some objects may not be marked in the event of an evacuation failure in a partially young GC, during a marking cycle. Avoid this situation by not allowing partially young GCs during a marking cycle.
Reviewed-by: tonyp, ysr, brutisso
author | johnc |
---|---|
date | Wed, 28 Sep 2011 10:36:31 -0700 |
parents | 4dfb2df418f2 |
children | 65a8ff39a6da |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Mon Sep 26 10:14:30 2011 +0200 +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Wed Sep 28 10:36:31 2011 -0700 @@ -1525,11 +1525,17 @@ } if (_last_full_young_gc) { - ergo_verbose2(ErgoPartiallyYoungGCs, - "start partially-young GCs", - ergo_format_byte_perc("known garbage"), - _known_garbage_bytes, _known_garbage_ratio * 100.0); - set_full_young_gcs(false); + if (!last_pause_included_initial_mark) { + ergo_verbose2(ErgoPartiallyYoungGCs, + "start partially-young GCs", + ergo_format_byte_perc("known garbage"), + _known_garbage_bytes, _known_garbage_ratio * 100.0); + set_full_young_gcs(false); + } else { + ergo_verbose0(ErgoPartiallyYoungGCs, + "do not start partially-young GCs", + ergo_format_reason("concurrent cycle is about to start")); + } _last_full_young_gc = false; } @@ -2491,6 +2497,13 @@ // initiate a new cycle. set_during_initial_mark_pause(); + // We do not allow non-full young GCs during marking. + if (!full_young_gcs()) { + set_full_young_gcs(true); + ergo_verbose0(ErgoPartiallyYoungGCs, + "end partially-young GCs", + ergo_format_reason("concurrent cycle is about to start")); + } // And we can now clear initiate_conc_mark_if_possible() as // we've already acted on it.