Mercurial > hg > graal-jvmci-8
comparison 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 |
comparison
equal
deleted
inserted
replaced
3981:e807478bf9ca | 3982:273b46400613 |
---|---|
1523 new_in_marking_window = true; | 1523 new_in_marking_window = true; |
1524 new_in_marking_window_im = true; | 1524 new_in_marking_window_im = true; |
1525 } | 1525 } |
1526 | 1526 |
1527 if (_last_full_young_gc) { | 1527 if (_last_full_young_gc) { |
1528 ergo_verbose2(ErgoPartiallyYoungGCs, | 1528 if (!last_pause_included_initial_mark) { |
1529 "start partially-young GCs", | 1529 ergo_verbose2(ErgoPartiallyYoungGCs, |
1530 ergo_format_byte_perc("known garbage"), | 1530 "start partially-young GCs", |
1531 _known_garbage_bytes, _known_garbage_ratio * 100.0); | 1531 ergo_format_byte_perc("known garbage"), |
1532 set_full_young_gcs(false); | 1532 _known_garbage_bytes, _known_garbage_ratio * 100.0); |
1533 set_full_young_gcs(false); | |
1534 } else { | |
1535 ergo_verbose0(ErgoPartiallyYoungGCs, | |
1536 "do not start partially-young GCs", | |
1537 ergo_format_reason("concurrent cycle is about to start")); | |
1538 } | |
1533 _last_full_young_gc = false; | 1539 _last_full_young_gc = false; |
1534 } | 1540 } |
1535 | 1541 |
1536 if ( !_last_young_gc_full ) { | 1542 if ( !_last_young_gc_full ) { |
1537 if (_should_revert_to_full_young_gcs) { | 1543 if (_should_revert_to_full_young_gcs) { |
2489 // The concurrent marking thread is not "during a cycle", i.e., | 2495 // The concurrent marking thread is not "during a cycle", i.e., |
2490 // it has completed the last one. So we can go ahead and | 2496 // it has completed the last one. So we can go ahead and |
2491 // initiate a new cycle. | 2497 // initiate a new cycle. |
2492 | 2498 |
2493 set_during_initial_mark_pause(); | 2499 set_during_initial_mark_pause(); |
2500 // We do not allow non-full young GCs during marking. | |
2501 if (!full_young_gcs()) { | |
2502 set_full_young_gcs(true); | |
2503 ergo_verbose0(ErgoPartiallyYoungGCs, | |
2504 "end partially-young GCs", | |
2505 ergo_format_reason("concurrent cycle is about to start")); | |
2506 } | |
2494 | 2507 |
2495 // And we can now clear initiate_conc_mark_if_possible() as | 2508 // And we can now clear initiate_conc_mark_if_possible() as |
2496 // we've already acted on it. | 2509 // we've already acted on it. |
2497 clear_initiate_conc_mark_if_possible(); | 2510 clear_initiate_conc_mark_if_possible(); |
2498 | 2511 |