JDK-8272343 : Remove MetaspaceClosure::FLAG_MASK
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-08-11
  • Updated: 2021-09-02
  • Resolved: 2021-08-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 18
18 b13Fixed
Related Reports
Relates :  
Description
https://github.com/openjdk/jdk/blob/75a06421e596b0e0006120a13836ec65a3ab9d46/src/hotspot/share/memory/metaspaceClosure.hpp#L130

    address obj() const {
      // In some rare cases (see CPSlot in constantPool.hpp) we store some flags in the lowest
      // 2 bits of a MetaspaceObj pointer. Unmask these when manipulating the pointer.
      uintx p = (uintx)*mpp();
      return (address)(p & (~FLAG_MASK));
    }

The above was needed only to support CPSlot. Now that CPSlot is removed in JDK-8272107, we can remove MetaspaceClosure::FLAG_MASK and MetaspaceClosure::flag_bits()

Comments
Changeset: 32048536 Author: Ioi Lam <iklam@openjdk.org> Date: 2021-08-30 21:06:26 +0000 URL: https://git.openjdk.java.net/jdk/commit/32048536e9ea9245437eb37308e905435cce6305
30-08-2021