RFR: 8263002: Remove CDS MiscCode region [v3]

Ioi Lam iklam at openjdk.java.net
Wed Mar 10 01:27:27 UTC 2021


> 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)

Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:

 - Merge branch 'master' into 8263002-remove-cds-mc-region
 - Merge branch 'master' into 8263002-remove-cds-mc-region
 - bumped CURRENT_CDS_ARCHIVE_VERSION by one since format has changed
 - @coleenp review: remove temp debug code; fixed accounting of vtable sizes
 - remove MC region
 - 8263002: Remove CDS MiscCode region

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2861/files
  - new: https://git.openjdk.java.net/jdk/pull/2861/files/a3e4f25e..a74edc28

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2861&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2861&range=01-02

  Stats: 4238 lines in 135 files changed: 1818 ins; 1750 del; 670 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2861.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2861/head:pull/2861

PR: https://git.openjdk.java.net/jdk/pull/2861


More information about the hotspot-dev mailing list