Skip to content

Commit cff9e24

Browse files
Liang MaoD-D-H
authored andcommitted
8335493: check_gc_overhead_limit should reset SoftRefPolicy::_should_clear_all_soft_refs
Reviewed-by: ayang
1 parent f4fa35e commit cff9e24

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/hotspot/share/gc/shared/gcOverheadChecker.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ void GCOverheadChecker::check_gc_overhead_limit(GCOverheadTester* time_overhead,
4040
bool is_full_gc,
4141
GCCause::Cause gc_cause,
4242
SoftRefPolicy* soft_ref_policy) {
43-
43+
if (is_full_gc) {
44+
// Explicit Full GC would do the clearing of soft-refs as well
45+
// So reset in the beginning
46+
soft_ref_policy->set_should_clear_all_soft_refs(false);
47+
}
4448
// Ignore explicit GC's. Exiting here does not set the flag and
4549
// does not reset the count.
4650
if (GCCause::is_user_requested_gc(gc_cause) ||

0 commit comments

Comments
 (0)