Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Resolved In Build:
      b115

      Description

      The methods CompactibleSpace::scan_and_forward() and PSMarkSweepDecorator::precompact() are more or less copy-paste versions of each other. Both these use the LiveRange class.

      The LiveRange class is used to write to the mark word of a dead object. But no one really cares that the LiveRange class is used. Instead it just gives an extra level of indirection to already complicated code. We also do unnecessary work to keep track of the end of the range even though no one ever gets the end value.

      We also do duplicate stores to _first_dead in these methods.

      The methods that consume the values from the LiveRange (CompactibleSpace::scan_and_adjust_pointers() and PSMarkSweepDecorator::adjust_pointers()) don't use the LiveRange class. Instead they use oop()->mark()->decode_pointer(), which is kind of odd considering that this is normally used for forwarded objects.

      The code would be simpler if we just store and load directly from the memory addresses we are working with.

      Improving the assert at the end of the CompactibleSpace::scan_and_adjust_pointers() and PSMarkSweepDecorator::adjust_pointers() methods to log the values of q and prev_q will hopefully improve the chances of understanding JDK-8073321 if that ever happens again.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brutisso Bengt Rutisson (Inactive)
                Reporter:
                brutisso Bengt Rutisson (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: