JDK-8263002 : Remove CDS MiscCode region
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-03-04
  • Updated: 2024-02-06
  • Resolved: 2021-03-10
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 17
17 b13Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
The CDS MiscCode region is used for:
(a) C++ vtables
(b) Method trampolines

(a) can be moved to the ReadWrite region
(b) were introduced in JDK-8145221 so we can delay writing into Methods. This was intended to improve copy-on-write sharing to reduce memory footprint. However, this hasn't been shown to have any significant effect (footprint of metadata usually is much smaller than the Java heap), and introduces a lot of complexity in the HotSpot code.

Removing (b) will make it easier to implement JDK-8026297 (Generating AdapterHandlerEntry during CDS dump), which will further improve start-up time.

============
Other benefits of removing the MiscCode region:

- We no longer have a read/write/executable region. This address the concern in JDK-8262922.
- We can enable CDS on macOS/AArch64, which does not allow read/write/executable regions. (JDK-8253795)
Comments
Changeset: d8a9c3ca Author: Ioi Lam <iklam@openjdk.org> Date: 2021-03-10 06:07:39 +0000 URL: https://git.openjdk.java.net/jdk/commit/d8a9c3ca
10-03-2021