RFR: Remove ShHeuristics::print_threshold
Aleksey Shipilev
shade at redhat.com
Thu Aug 23 08:47:34 UTC 2018
This only clutters the code, breaks the builds on foreign platforms. Let's remove it.
Testing: tier1_gc_shenandoah
diff -r 804a098a81f8 src/hotspot/share/gc/shenandoah/heuristics/shenandoahStaticHeuristics.cpp
--- a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahStaticHeuristics.cpp Wed Aug 22 23:11:51
2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahStaticHeuristics.cpp Thu Aug 23 10:46:26
2018 +0200
@@ -32,17 +32,10 @@
// than free threshold. ShenandoahAllocationThreshold is supposed to break this,
// but it only works if it is non-zero.
SHENANDOAH_ERGO_OVERRIDE_DEFAULT(ShenandoahImmediateThreshold, 1);
}
-void ShenandoahStaticHeuristics::print_thresholds() {
- log_info(gc, init)("Shenandoah heuristics thresholds: allocation " SIZE_FORMAT ", free "
SIZE_FORMAT ", garbage " SIZE_FORMAT,
- ShenandoahAllocationThreshold,
- ShenandoahFreeThreshold,
- ShenandoahGarbageThreshold);
-}
-
ShenandoahStaticHeuristics::~ShenandoahStaticHeuristics() {}
bool ShenandoahStaticHeuristics::should_start_normal_gc() const {
ShenandoahHeap* heap = ShenandoahHeap::heap();
diff -r 804a098a81f8 src/hotspot/share/gc/shenandoah/heuristics/shenandoahStaticHeuristics.hpp
--- a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahStaticHeuristics.hpp Wed Aug 22 23:11:51
2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahStaticHeuristics.hpp Thu Aug 23 10:46:26
2018 +0200
@@ -28,12 +28,10 @@
class ShenandoahStaticHeuristics : public ShenandoahHeuristics {
public:
ShenandoahStaticHeuristics();
- void print_thresholds();
-
virtual ~ShenandoahStaticHeuristics();
virtual bool should_start_normal_gc() const;
virtual void choose_collection_set_from_regiondata(ShenandoahCollectionSet* cset,
diff -r 804a098a81f8 src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp Wed Aug 22 23:11:51 2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp Thu Aug 23 10:46:26 2018 +0200
@@ -377,11 +377,10 @@
if (ShenandoahStoreValEnqueueBarrier && ShenandoahStoreValReadBarrier) {
vm_exit_during_initialization("Cannot use both ShenandoahStoreValEnqueueBarrier and
ShenandoahStoreValReadBarrier");
}
log_info(gc, init)("Shenandoah heuristics: %s",
_heuristics->name());
- _heuristics->print_thresholds();
} else {
ShouldNotReachHere();
}
}
diff -r 804a098a81f8 src/hotspot/share/gc/shenandoah/shenandoahHeuristics.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeuristics.cpp Wed Aug 22 23:11:51 2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeuristics.cpp Thu Aug 23 10:46:26 2018 +0200
@@ -254,14 +254,10 @@
void ShenandoahHeuristics::record_phase_time(ShenandoahPhaseTimings::Phase phase, double secs) {
// Do nothing
}
-void ShenandoahHeuristics::print_thresholds() {
- // Do nothing
-}
-
bool ShenandoahHeuristics::should_start_update_refs() {
return _update_refs_early;
}
bool ShenandoahHeuristics::should_start_normal_gc() const {
diff -r 804a098a81f8 src/hotspot/share/gc/shenandoah/shenandoahHeuristics.hpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeuristics.hpp Wed Aug 22 23:11:51 2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeuristics.hpp Thu Aug 23 10:46:26 2018 +0200
@@ -121,12 +121,10 @@
virtual void record_cycle_end();
virtual void record_phase_time(ShenandoahPhaseTimings::Phase phase, double secs);
- virtual void print_thresholds();
-
virtual bool should_start_normal_gc() const;
virtual bool should_start_update_refs();
virtual ShenandoahHeap::GCCycleMode should_start_traversal_gc();
More information about the shenandoah-dev
mailing list