< prev index next > src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.cpp
Print this page
#include "gc/shenandoah/shenandoahHeap.inline.hpp"
#include "runtime/os.hpp"
ShenandoahCollectorPolicy::ShenandoahCollectorPolicy() :
_success_concurrent_gcs(0),
+ _mixed_gcs(0),
+ _abbreviated_cycles(0),
+ _success_old_gcs(0),
+ _interrupted_old_gcs(0),
_success_degenerated_gcs(0),
_success_full_gcs(0),
_alloc_failure_degenerated(0),
_alloc_failure_degenerated_upgrade_to_full(0),
_alloc_failure_full(0),
_alloc_failure_degenerated++;
_degen_points[point]++;
}
void ShenandoahCollectorPolicy::record_degenerated_upgrade_to_full() {
+ ShenandoahHeap::heap()->record_upgrade_to_full();
_alloc_failure_degenerated_upgrade_to_full++;
}
void ShenandoahCollectorPolicy::record_success_concurrent() {
_success_concurrent_gcs++;
}
+ void ShenandoahCollectorPolicy::record_mixed_cycle() {
+ _mixed_gcs++;
+ }
+
+ void ShenandoahCollectorPolicy::record_abbreviated_cycle() {
+ _abbreviated_cycles++;
+ }
+
+ void ShenandoahCollectorPolicy::record_success_old() {
+ _success_old_gcs++;
+ }
+
+ void ShenandoahCollectorPolicy::record_interrupted_old() {
+ _interrupted_old_gcs++;
+ }
+
void ShenandoahCollectorPolicy::record_success_degenerated() {
_success_degenerated_gcs++;
}
void ShenandoahCollectorPolicy::record_success_full() {
void ShenandoahCollectorPolicy::print_gc_stats(outputStream* out) const {
out->print_cr("Under allocation pressure, concurrent cycles may cancel, and either continue cycle");
out->print_cr("under stop-the-world pause or result in stop-the-world Full GC. Increase heap size,");
out->print_cr("tune GC heuristics, set more aggressive pacing delay, or lower allocation rate");
! out->print_cr("to avoid Degenerated and Full GC cycles.");
out->cr();
! out->print_cr(SIZE_FORMAT_W(5) " successful concurrent GCs", _success_concurrent_gcs);
out->print_cr(" " SIZE_FORMAT_W(5) " invoked explicitly", _explicit_concurrent);
out->print_cr(" " SIZE_FORMAT_W(5) " invoked implicitly", _implicit_concurrent);
out->cr();
out->print_cr(SIZE_FORMAT_W(5) " Degenerated GCs", _success_degenerated_gcs);
out->print_cr(" " SIZE_FORMAT_W(5) " caused by allocation failure", _alloc_failure_degenerated);
for (int c = 0; c < ShenandoahGC::_DEGENERATED_LIMIT; c++) {
if (_degen_points[c] > 0) {
const char* desc = ShenandoahGC::degen_point_to_string((ShenandoahGC::ShenandoahDegenPoint)c);
void ShenandoahCollectorPolicy::print_gc_stats(outputStream* out) const {
out->print_cr("Under allocation pressure, concurrent cycles may cancel, and either continue cycle");
out->print_cr("under stop-the-world pause or result in stop-the-world Full GC. Increase heap size,");
out->print_cr("tune GC heuristics, set more aggressive pacing delay, or lower allocation rate");
! out->print_cr("to avoid Degenerated and Full GC cycles. Abbreviated cycles are those which found");
+ out->print_cr("enough regions with no live objects to skip evacuation.");
out->cr();
! out->print_cr(SIZE_FORMAT_W(5) " Successful Concurrent GCs", _success_concurrent_gcs);
out->print_cr(" " SIZE_FORMAT_W(5) " invoked explicitly", _explicit_concurrent);
out->print_cr(" " SIZE_FORMAT_W(5) " invoked implicitly", _implicit_concurrent);
out->cr();
+ out->print_cr(SIZE_FORMAT_W(5) " Completed Old GCs", _success_old_gcs);
+ out->print_cr(" " SIZE_FORMAT_W(5) " mixed", _mixed_gcs);
+ out->print_cr(" " SIZE_FORMAT_W(5) " interruptions", _interrupted_old_gcs);
+ out->cr();
+
out->print_cr(SIZE_FORMAT_W(5) " Degenerated GCs", _success_degenerated_gcs);
out->print_cr(" " SIZE_FORMAT_W(5) " caused by allocation failure", _alloc_failure_degenerated);
for (int c = 0; c < ShenandoahGC::_DEGENERATED_LIMIT; c++) {
if (_degen_points[c] > 0) {
const char* desc = ShenandoahGC::degen_point_to_string((ShenandoahGC::ShenandoahDegenPoint)c);
}
}
out->print_cr(" " SIZE_FORMAT_W(5) " upgraded to Full GC", _alloc_failure_degenerated_upgrade_to_full);
out->cr();
+ out->print_cr(SIZE_FORMAT_W(5) " Abbreviated GCs", _abbreviated_cycles);
+ out->cr();
+
out->print_cr(SIZE_FORMAT_W(5) " Full GCs", _success_full_gcs + _alloc_failure_degenerated_upgrade_to_full);
out->print_cr(" " SIZE_FORMAT_W(5) " invoked explicitly", _explicit_full);
out->print_cr(" " SIZE_FORMAT_W(5) " invoked implicitly", _implicit_full);
out->print_cr(" " SIZE_FORMAT_W(5) " caused by allocation failure", _alloc_failure_full);
out->print_cr(" " SIZE_FORMAT_W(5) " upgraded from Degenerated GC", _alloc_failure_degenerated_upgrade_to_full);
< prev index next >