8140689: Skip last young-only gc if nothing to do in the mixed gc phase
authortschatzl
Tue, 10 Nov 2015 11:07:15 +0100
changeset 33811 b7cea7584267
parent 33810 8bbfb74d1f6c
child 33812 561dfbbc8b39
8140689: Skip last young-only gc if nothing to do in the mixed gc phase Reviewed-by: mgerdin, drwhite
hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp
--- 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);
 }