Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8309619

ZGC: 'zDriver.cpp::should_clear_soft_references' should be moved into a subclass of 'SoftRefPolicy'

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P5 P5
    • tbd
    • 22
    • hotspot
    • gc

      Currently, the class `SoftRefPolicy` has a method `should_clear_all_soft_refs` and the ZGC has a similar method `should_clear_soft_references` in `zDriver.cpp` and `xDriver.cpp`.

      And the `ZCollectedHeap` and `XCollectedHeap` have a field `SoftRefPolicy _soft_ref_policy` which is never used. So I think it is good to move the method `should_clear_soft_references` of `zDriver.cpp` and `xDriver.cpp` into the subclasses of `SoftRefPolicy` (maybe also rename the related methods). It can avoid the misunderstanding of the related names and reuse the existing `SoftRefPolicy`.

            gli Guoxiong Li
            gli Guoxiong Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: