8377307: Refactor code for AOT cache pointer compression#464
8377307: Refactor code for AOT cache pointer compression#464vaibhavchoudhary wants to merge 1 commit intoopenjdk:masterfrom
Conversation
…er compression Backport of JDK-8377307 from mainline to JDK 25u. This change introduces the AOTCompressedPointers class to provide a unified, type-safe API for compressing metadata pointers in CDS archives. The new narrowPtr enum class (enum class : u4) replaces raw u4 offsets throughout the CDS subsystem, improving type safety and code clarity. Key changes: - New AOTCompressedPointers class with narrowPtr type for encoding/decoding - Refactored ArchiveBuilder offset methods from uintx to size_t - Removed scattered encoding utilities from ArchiveUtils - Updated FileMapHeader to use narrowPtr instead of size_t offsets - Converted all CDS subsystems: RunTimeClassInfo, LambdaFormInvokers, LambdaProxyClassDictionary, CompactHashtable writers, TrainingData - Archive format version bumped from 19 to 20 (incompatible change) - Maximum metadata offset: 2GB (AOTCompressedPointers::MaxMetadataOffsetBytes) Adapted for 25u: - Uses metaspaceShared.cpp (aotMetaspace.cpp doesn't exist in 25u) - Maintains compatibility with 25u code structure Testing: - Tier1: 9,951/9,954 tests passed (99.97%) - All CDS and AOT cache tests passed (52/52) - All GTest tests passed with proper configuration - 3 THP test failures are environmental (platform-specific address range limitation) - Identical pass rate to previous successful backport validation Backport-of: 0867f9b1b4bfa090cce1403cdbcce56a2e91127c
|
👋 Welcome back vaibhav! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
This backport pull request has now been updated with issue from the original commit. |
|
/approval request Reason for backport to JDK 25u: This backport introduces the AOTCompressedPointers class for type-safe metadata pointer compression in CDS archives, replacing scattered raw u4 offset encodings throughout the CDS subsystem with a unified, strongly-typed API. Why backport:
Risk assessment: LOW
Dependencies:
Testing:
Adaptation for 25u:
The backport has been thoroughly tested. |
|
@vaibhavchoudhary |
|
@jiangli: Please review |
Backport of JDK-8377307 from mainline to JDK 25u.
This change introduces the AOTCompressedPointers class to provide a unified,
type-safe API for compressing metadata pointers in CDS archives.
Key Changes
Adapted for 25u
Testing Results
Backport-of: 0867f9b1b4bfa090cce1403cdbcce56a2e91127c
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk25u-dev.git pull/464/head:pull/464$ git checkout pull/464Update a local copy of the PR:
$ git checkout pull/464$ git pull https://git.openjdk.org/jdk25u-dev.git pull/464/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 464View PR using the GUI difftool:
$ git pr show -t 464Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk25u-dev/pull/464.diff
Using Webrev
Link to Webrev Comment