8140689: Skip last young-only gc if nothing to do in the mixed gc phase
Reviewed-by: mgerdin, drwhite
--- a/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp Tue Nov 10 11:07:15 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp Tue Nov 10 11:07:15 2015 +0100
@@ -892,7 +892,9 @@
}
void G1CollectorPolicy::record_concurrent_mark_cleanup_completed() {
- collector_state()->set_last_young_gc(true);
+ bool should_continue_with_reclaim = next_gc_should_be_mixed("request last young-only gc",
+ "skip last young-only gc");
+ collector_state()->set_last_young_gc(should_continue_with_reclaim);
collector_state()->set_in_marking_window(false);
}