RFR: JDK-8318485: Narrow klass shift should be zero if encoding range extends to 0x1_0000_0000 [v2]

Ioi Lam iklam at openjdk.org
Mon Oct 23 18:13:31 UTC 2023


On Mon, 23 Oct 2023 12:12:59 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> See JBS issue.
>> 
>> The real fix, trivial, is the comparison change in compressedKlass.cpp.
>> 
>> This patch then also adds a test that checks that for a given (forced) class space location the VM chose the correct encoding scheme. In this case, if class space nestles below and ends at 4G, we should use a shift of 0.
>> 
>> The test can be easily extended to test more narrow Klass encoding schemes. Note that the test is skipped if the VM could not map at the expected address to begin with.
>> 
>> Finally, to analyze test errors, I print out the mappings at the force address if metaspace logging is debug.
>> 
>> Tests: manual, GHA. x86 GHA errors unrelated.
>> 
>> 
>> Attention @iklam and @calvinccheung
>
> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
> 
>   feedback calvin

LGTM

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

Marked as reviewed by iklam (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/16261#pullrequestreview-1693200934


More information about the hotspot-runtime-dev mailing list