diff --git a/src/hotspot/share/gc/serial/tenuredGeneration.cpp b/src/hotspot/share/gc/serial/tenuredGeneration.cpp index eaea7ba4270..9602553a6f3 100644 --- a/src/hotspot/share/gc/serial/tenuredGeneration.cpp +++ b/src/hotspot/share/gc/serial/tenuredGeneration.cpp @@ -343,37 +343,6 @@ void TenuredGeneration::gc_prologue() { _used_at_prologue = used(); } -bool TenuredGeneration::should_collect(bool full, - size_t size, - bool is_tlab) { - // This should be one big conditional or (||), but I want to be able to tell - // why it returns what it returns (without re-evaluating the conditionals - // in case they aren't idempotent), so I'm doing it this way. - // DeMorgan says it's okay. - if (full) { - log_trace(gc)("TenuredGeneration::should_collect: because full"); - return true; - } - if (should_allocate(size, is_tlab)) { - log_trace(gc)("TenuredGeneration::should_collect: because should_allocate(" SIZE_FORMAT ")", size); - return true; - } - // If we don't have very much free space. - // XXX: 10000 should be a percentage of the capacity!!! - if (free() < 10000) { - log_trace(gc)("TenuredGeneration::should_collect: because free(): " SIZE_FORMAT, free()); - return true; - } - // If we had to expand to accommodate promotions from the young generation - if (_capacity_at_prologue < capacity()) { - log_trace(gc)("TenuredGeneration::should_collect: because_capacity_at_prologue: " SIZE_FORMAT " < capacity(): " SIZE_FORMAT, - _capacity_at_prologue, capacity()); - return true; - } - - return false; -} - void TenuredGeneration::compute_new_size() { assert_locked_or_safepoint(Heap_lock); diff --git a/src/hotspot/share/gc/serial/tenuredGeneration.hpp b/src/hotspot/share/gc/serial/tenuredGeneration.hpp index f30cfed2671..cfc18b92f2a 100644 --- a/src/hotspot/share/gc/serial/tenuredGeneration.hpp +++ b/src/hotspot/share/gc/serial/tenuredGeneration.hpp @@ -140,10 +140,6 @@ public: void gc_prologue(); void gc_epilogue(); - bool should_collect(bool full, - size_t word_size, - bool is_tlab); - bool should_allocate(size_t word_size, bool is_tlab) { bool result = false; size_t overflow_limit = (size_t)1 << (BitsPerSize_t - LogHeapWordSize);