8332678: Serial: Remove use of should_clear_all_soft_refs in serial folder

Reviewed-by: iwalulya
This commit is contained in:
Albert Mingkun Yang 2024-05-27 10:25:38 +00:00
parent 72fbfe18cb
commit 0e7ea390bb
2 changed files with 0 additions and 8 deletions
src/hotspot/share/gc/serial

@ -685,11 +685,6 @@ void SerialFullGC::invoke_at_safepoint(bool clear_all_softrefs) {
assert(SafepointSynchronize::is_at_safepoint(), "must be at a safepoint");
SerialHeap* gch = SerialHeap::heap();
#ifdef ASSERT
if (gch->soft_ref_policy()->should_clear_all_soft_refs()) {
assert(clear_all_softrefs, "Policy should have been checked earlier");
}
#endif
gch->trace_heap_before_gc(_gc_tracer);

@ -559,9 +559,6 @@ HeapWord* SerialHeap::satisfy_failed_allocation(size_t size, bool is_tlab) {
return result;
}
assert(!soft_ref_policy()->should_clear_all_soft_refs(),
"Flag should have been handled and cleared prior to this point");
// What else? We might try synchronous finalization later. If the total
// space available is large enough for the allocation, then a more
// complete compaction phase than we've tried so far might be