--- a/src/hotspot/share/gc/shenandoah/shenandoahHeuristics.cpp Thu Oct 17 20:27:44 2019 +0100
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeuristics.cpp Thu Oct 17 20:53:35 2019 +0100
@@ -186,8 +186,9 @@
// given the amount of immediately reclaimable garbage. If we do, figure out the collection set.
assert (immediate_garbage <= total_garbage,
- "Cannot have more immediate garbage than total garbage: " SIZE_FORMAT "M vs " SIZE_FORMAT "M",
- immediate_garbage / M, total_garbage / M);
+ "Cannot have more immediate garbage than total garbage: " SIZE_FORMAT "%s vs " SIZE_FORMAT "%s",
+ byte_size_in_proper_unit(immediate_garbage), proper_unit_for_byte_size(immediate_garbage),
+ byte_size_in_proper_unit(total_garbage), proper_unit_for_byte_size(total_garbage));
size_t immediate_percent = total_garbage == 0 ? 0 : (immediate_garbage * 100 / total_garbage);
@@ -196,12 +197,16 @@
collection_set->update_region_status();
size_t cset_percent = total_garbage == 0 ? 0 : (collection_set->garbage() * 100 / total_garbage);
- log_info(gc, ergo)("Collectable Garbage: " SIZE_FORMAT "M (" SIZE_FORMAT "%% of total), " SIZE_FORMAT "M CSet, " SIZE_FORMAT " CSet regions",
- collection_set->garbage() / M, cset_percent, collection_set->live_data() / M, collection_set->count());
+ log_info(gc, ergo)("Collectable Garbage: " SIZE_FORMAT "%s (" SIZE_FORMAT "%% of total), " SIZE_FORMAT "%s CSet, " SIZE_FORMAT " CSet regions",
+ byte_size_in_proper_unit(collection_set->garbage()), proper_unit_for_byte_size(collection_set->garbage()),
+ cset_percent,
+ byte_size_in_proper_unit(collection_set->live_data()), proper_unit_for_byte_size(collection_set->live_data()),
+ collection_set->count());
}
- log_info(gc, ergo)("Immediate Garbage: " SIZE_FORMAT "M (" SIZE_FORMAT "%% of total), " SIZE_FORMAT " regions",
- immediate_garbage / M, immediate_percent, immediate_regions);
+ log_info(gc, ergo)("Immediate Garbage: " SIZE_FORMAT "%s (" SIZE_FORMAT "%% of total), " SIZE_FORMAT " regions",
+ byte_size_in_proper_unit(immediate_garbage), proper_unit_for_byte_size(immediate_garbage),
+ immediate_percent, immediate_regions);
}
void ShenandoahHeuristics::record_gc_start() {
@@ -228,7 +233,7 @@
return _update_refs_early;
}
-bool ShenandoahHeuristics::should_start_normal_gc() const {
+bool ShenandoahHeuristics::should_start_gc() const {
// Perform GC to cleanup metaspace
if (has_metaspace_oom()) {
// Some of vmTestbase/metaspace tests depend on following line to count GC cycles
@@ -245,14 +250,6 @@
return periodic_gc;
}
-bool ShenandoahHeuristics::should_start_traversal_gc() {
- return false;
-}
-
-bool ShenandoahHeuristics::can_do_traversal_gc() {
- return false;
-}
-
bool ShenandoahHeuristics::should_degenerate_cycle() {
return _degenerated_cycles_in_a_row <= ShenandoahFullGCThreshold;
}