Skip to content

Commit 3479b46

Browse files
committedMay 21, 2024
8332595: Serial: Remove unused TenuredGeneration::should_collect
Reviewed-by: tschatzl
1 parent 9bfae88 commit 3479b46

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed
 

‎src/hotspot/share/gc/serial/tenuredGeneration.cpp

-31
Original file line numberDiff line numberDiff line change
@@ -343,37 +343,6 @@ void TenuredGeneration::gc_prologue() {
343343
_used_at_prologue = used();
344344
}
345345

346-
bool TenuredGeneration::should_collect(bool full,
347-
size_t size,
348-
bool is_tlab) {
349-
// This should be one big conditional or (||), but I want to be able to tell
350-
// why it returns what it returns (without re-evaluating the conditionals
351-
// in case they aren't idempotent), so I'm doing it this way.
352-
// DeMorgan says it's okay.
353-
if (full) {
354-
log_trace(gc)("TenuredGeneration::should_collect: because full");
355-
return true;
356-
}
357-
if (should_allocate(size, is_tlab)) {
358-
log_trace(gc)("TenuredGeneration::should_collect: because should_allocate(" SIZE_FORMAT ")", size);
359-
return true;
360-
}
361-
// If we don't have very much free space.
362-
// XXX: 10000 should be a percentage of the capacity!!!
363-
if (free() < 10000) {
364-
log_trace(gc)("TenuredGeneration::should_collect: because free(): " SIZE_FORMAT, free());
365-
return true;
366-
}
367-
// If we had to expand to accommodate promotions from the young generation
368-
if (_capacity_at_prologue < capacity()) {
369-
log_trace(gc)("TenuredGeneration::should_collect: because_capacity_at_prologue: " SIZE_FORMAT " < capacity(): " SIZE_FORMAT,
370-
_capacity_at_prologue, capacity());
371-
return true;
372-
}
373-
374-
return false;
375-
}
376-
377346
void TenuredGeneration::compute_new_size() {
378347
assert_locked_or_safepoint(Heap_lock);
379348

‎src/hotspot/share/gc/serial/tenuredGeneration.hpp

-4
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,6 @@ class TenuredGeneration: public Generation {
140140
void gc_prologue();
141141
void gc_epilogue();
142142

143-
bool should_collect(bool full,
144-
size_t word_size,
145-
bool is_tlab);
146-
147143
bool should_allocate(size_t word_size, bool is_tlab) {
148144
bool result = false;
149145
size_t overflow_limit = (size_t)1 << (BitsPerSize_t - LogHeapWordSize);

1 commit comments

Comments
 (1)

openjdk-notifier[bot] commented on May 21, 2024

@openjdk-notifier[bot]
Please sign in to comment.