Skip to content

Commit d2cae5d

Browse files
Liang MaoPaul Hohensee
authored andcommitted
8335493: check_gc_overhead_limit should reset SoftRefPolicy::_should_clear_all_soft_refs
Backport-of: cff9e246cc2fbd3914f40bb71daa85dcf7731396
1 parent dc69e05 commit d2cae5d

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
@@ -41,7 +41,11 @@ void GCOverheadChecker::check_gc_overhead_limit(GCOverheadTester* time_overhead,
4141
bool is_full_gc,
4242
GCCause::Cause gc_cause,
4343
SoftRefPolicy* soft_ref_policy) {
44-
44+
if (is_full_gc) {
45+
// Explicit Full GC would do the clearing of soft-refs as well
46+
// So reset in the beginning
47+
soft_ref_policy->set_should_clear_all_soft_refs(false);
48+
}
4549
// Ignore explicit GC's. Exiting here does not set the flag and
4650
// does not reset the count.
4751
if (GCCause::is_user_requested_gc(gc_cause) ||

0 commit comments

Comments
 (0)