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

Fix inconsistent OopStorage::Block owner usage

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 14
    • Fix Version/s: 14
    • Component/s: hotspot
    • Subcomponent:
      gc
    • Resolved In Build:
      b08

      Description

      In OopStorage::Block::release_entries there are inconsistent uses of the owner of the block. In some places the OopStorage* owner argument is used, while in other places the const OopStorage* Block::_owner data member is used. All in the same function. The _owner member can't be used in some of those places without further modifications, because it is a pointer to a const storage object.

      It would be better to just consistently use the owner argument throughout release_entries.

      Doing so would also allow some cleanup of the _owner member's usage elsewhere. The other use is in block_for_ptr, where all we really need is an intptr_t. We could change to intptr_t _owner_address and slightly simplify block_for_ptr.

        Attachments

          Activity

            People

            • Assignee:
              kbarrett Kim Barrett
              Reporter:
              kbarrett Kim Barrett
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: