Serial: Remove use of should_clear_all_soft_refs in serial folder

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 23
    • Affects Version/s: 23
    • Component/s: hotspot
    • gc
    • b25

      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`.

            Assignee:
            Albert Yang
            Reporter:
            Albert Yang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: