Serial already use `SerialHeap::must_clear_all_soft_refs` to clear soft-refs for WhiteBox full-gc, so there is no need for the "global" `should_clear_all_soft_refs` in the case of Serial.
Currently, `should_clear_all_soft_refs` is used only in asserts, which are actually too strong due to racy VM-operations:
T1: clear-soft = true ; whitebox-full-gc; clear-soft = false
T2: invoke System.gc()
The second thread can see inconsistency between the local variable and the global `should_clear_all_soft_refs`.
Currently, `should_clear_all_soft_refs` is used only in asserts, which are actually too strong due to racy VM-operations:
T1: clear-soft = true ; whitebox-full-gc; clear-soft = false
T2: invoke System.gc()
The second thread can see inconsistency between the local variable and the global `should_clear_all_soft_refs`.