RFR: JDK-8311035: CDS should not use dump time JVM narrow Klass encoding to pre-compute Klass ids [v7]

Thomas Stuefe stuefe at openjdk.org
Wed Jul 5 05:51:56 UTC 2023


On Wed, 5 Jul 2023 05:32:43 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Thomas Stuefe has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits:
>> 
>>  - Merge branch 'master' into fix-cleanup-CDS-nKlass-encoding
>>  - revert accidental change
>>  - Fix Windows build
>>  - Add alternative for !INCLUDE_CDS_JAVA_HEAP path
>>  - Merge branch 'master' into fix-cleanup-CDS-nKlass-encoding
>>  - fix comment
>>  - Merge
>>  - -remove narrow_klass_xxx from FileMap
>>    - remove ArchiveHeapWriter::precomputed_narrow_klass_base_delta and replaced it with clear comments
>>    - changed runtime fail condition to asserts in FileMapInfo::can_use_heap_region()
>>  - fix-cleanup-CDS-nKlass-encoding
>
> src/hotspot/share/oops/compressedOops.cpp line 192:
> 
>> 190: // set this encoding scheme. Used by CDS at runtime to re-instate the scheme used to pre-compute klass ids for
>> 191: // archived heap objects.
>> 192: void CompressedKlassPointers::initialize_for_given_encoding(address addr, size_t len, address requested_base, int requested_shift) {
> 
> This entire function should be inside _LP64. It should not be referenced by a 32-bit build.

I'll fix this. 32-bit would be worth a whole other cleanup. Unfortunately, a lot of that coding (e.g. the `decode_xxx` functions) must still be there for 32-bit since they are only guarded by constant UseCompressedClassPointers, not by ifdefs.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14688#discussion_r1252567746


More information about the hotspot-dev mailing list