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

Fix inconsistent OopStorage::Block owner usage

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 14
    • 14
    • hotspot
    • gc
    • b08

      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.

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

              Created:
              Updated:
              Resolved: