changeset 9733:f17e5edbe761

8140689: Skip last young-only gc if nothing to do in the mixed gc phase Reviewed-by: mgerdin, drwhite
author tschatzl
date Tue, 10 Nov 2015 11:07:15 +0100
parents bbd11e7bbe26
children aabefa3ef38d
files src/share/vm/gc/g1/g1CollectorPolicy.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc/g1/g1CollectorPolicy.cpp	Tue Nov 10 11:07:15 2015 +0100
+++ b/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);
 }