Mercurial > hg > jdk9-shenandoah > hotspot
changeset 9439:399bc16a1b86
Treat GC cycle after full GC and VM start specially in heuristics.
author | rkennke |
---|---|
date | Thu, 30 Jul 2015 15:51:44 +0200 |
parents | fa747dd25e5b |
children | 4f82f2345042 |
files | src/share/vm/gc_implementation/shenandoah/shenandoahCollectorPolicy.cpp src/share/vm/gc_implementation/shenandoah/shenandoahMarkCompact.cpp src/share/vm/runtime/globals.hpp |
diffstat | 3 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/shenandoah/shenandoahCollectorPolicy.cpp Thu Jul 30 15:51:43 2015 +0200 +++ b/src/share/vm/gc_implementation/shenandoah/shenandoahCollectorPolicy.cpp Thu Jul 30 15:51:44 2015 +0200 @@ -257,8 +257,8 @@ ShenandoahHeap* heap = ShenandoahHeap::heap(); size_t available = heap->free_regions()->available(); - double factor = heap->need_update_refs() ? _free_threshold_factor : 0.4; - size_t targetStartMarking = capacity * factor; + uintx factor = heap->need_update_refs() ? ShenandoahFreeThreshold : ShenandoahInitialFreeThreshold; + size_t targetStartMarking = (capacity * factor) / 100; size_t threshold_bytes_allocated = heap->capacity() * _allocation_threshold_factor; if (available < targetStartMarking &&
--- a/src/share/vm/gc_implementation/shenandoah/shenandoahMarkCompact.cpp Thu Jul 30 15:51:43 2015 +0200 +++ b/src/share/vm/gc_implementation/shenandoah/shenandoahMarkCompact.cpp Thu Jul 30 15:51:44 2015 +0200 @@ -145,6 +145,8 @@ oopDesc::set_bs(_old_barrier_set); + _heap->set_need_update_refs(false); + _heap->shenandoahPolicy()->record_phase_end(ShenandoahCollectorPolicy::full_gc); }
--- a/src/share/vm/runtime/globals.hpp Thu Jul 30 15:51:43 2015 +0200 +++ b/src/share/vm/runtime/globals.hpp Thu Jul 30 15:51:44 2015 +0200 @@ -1629,7 +1629,13 @@ "it can be marked for collection. Applies to " \ "Shenandoah GC dynamic Heuristic mode only (ignored otherwise)") \ \ - product(uintx, ShenandoahFreeThreshold, 10, \ + product(uintx, ShenandoahFreeThreshold, 25, \ + "Set the percentage of heap free in relation to the total " \ + "capacity before a region can enter the concurrent marking " \ + "phase. Applies to Shenandoah GC dynamic Heuristic mode only " \ + "(ignored otherwise)") \ + \ + product(uintx, ShenandoahInitialFreeThreshold, 50, \ "Set the percentage of heap free in relation to the total " \ "capacity before a region can enter the concurrent marking " \ "phase. Applies to Shenandoah GC dynamic Heuristic mode only " \