< prev index next > src/hotspot/share/gc/shenandoah/heuristics/shenandoahAggressiveHeuristics.cpp
Print this page
#include "gc/shenandoah/shenandoahHeapRegion.inline.hpp"
#include "logging/log.hpp"
#include "logging/logTag.hpp"
#include "runtime/os.hpp"
! ShenandoahAggressiveHeuristics::ShenandoahAggressiveHeuristics() : ShenandoahHeuristics() {
// Do not shortcut evacuation
SHENANDOAH_ERGO_OVERRIDE_DEFAULT(ShenandoahImmediateThreshold, 100);
// Aggressive evacuates everything, so it needs as much evac space as it can get
SHENANDOAH_ERGO_ENABLE_FLAG(ShenandoahEvacReserveOverflow);
#include "gc/shenandoah/shenandoahHeapRegion.inline.hpp"
#include "logging/log.hpp"
#include "logging/logTag.hpp"
#include "runtime/os.hpp"
! ShenandoahAggressiveHeuristics::ShenandoahAggressiveHeuristics(ShenandoahSpaceInfo* space_info) :
+ ShenandoahHeuristics(space_info) {
// Do not shortcut evacuation
SHENANDOAH_ERGO_OVERRIDE_DEFAULT(ShenandoahImmediateThreshold, 100);
// Aggressive evacuates everything, so it needs as much evac space as it can get
SHENANDOAH_ERGO_ENABLE_FLAG(ShenandoahEvacReserveOverflow);
void ShenandoahAggressiveHeuristics::choose_collection_set_from_regiondata(ShenandoahCollectionSet* cset,
RegionData* data, size_t size,
size_t free) {
for (size_t idx = 0; idx < size; idx++) {
! ShenandoahHeapRegion* r = data[idx]._region;
if (r->garbage() > 0) {
cset->add_region(r);
}
}
}
bool ShenandoahAggressiveHeuristics::should_start_gc() {
! log_info(gc)("Trigger: Start next cycle immediately");
return true;
}
bool ShenandoahAggressiveHeuristics::should_unload_classes() {
if (!can_unload_classes()) return false;
void ShenandoahAggressiveHeuristics::choose_collection_set_from_regiondata(ShenandoahCollectionSet* cset,
RegionData* data, size_t size,
size_t free) {
for (size_t idx = 0; idx < size; idx++) {
! ShenandoahHeapRegion* r = data[idx].get_region();
if (r->garbage() > 0) {
cset->add_region(r);
}
}
}
bool ShenandoahAggressiveHeuristics::should_start_gc() {
! log_trigger("Start next cycle immediately");
return true;
}
bool ShenandoahAggressiveHeuristics::should_unload_classes() {
if (!can_unload_classes()) return false;
< prev index next >