AArch64: is a compressed class space at 2G a problem?

Reingruber, Richard richard.reingruber at sap.com
Fri Dec 18 16:52:26 UTC 2020


Dear AArch64 experts,

it appears to me that locating the compressed class space (ccs) at 2G is
currently not possible on AArch64 [1][2]. This looks like a bug to me. Would you
agree?

I think the issue is that at [1] and [2] the start of ccs is passed to
CompressedKlassPointers::is_valid_base()[3] instead of the encoding base which
would be 0 if ccs starts at 2G.

The question came up during review of https://github.com/openjdk/jdk/pull/1815
The test for the enhancement requires a special case for AArch64.

Thanks, Richard.

[1] The first attempt to map ccs in Metaspace::global_initialize() with
    UseCompressedOops disabled will be at HeapBaseMinAddress which is 2G. On
    AArch64 this is not done because CompressedKlassPointers::is_valid_base(2G)
    returns false[3].
    https://github.com/openjdk/jdk/blob/853c04712d24788b6d30d54443ac9277a898311b/src/hotspot/share/memory/metaspace.cpp#L717

[2] In CompressedKlassPointers::initialize() there's an assertion that whould fail if
    ccs was located at 2G
    https://github.com/openjdk/jdk/blob/853c04712d24788b6d30d54443ac9277a898311b/src/hotspot/share/oops/compressedOops.cpp#L199

[3] CompressedKlassPointers::is_valid_base()
    https://github.com/openjdk/jdk/blob/853c04712d24788b6d30d54443ac9277a898311b/src/hotspot/share/oops/compressedOops.cpp#L266


More information about the hotspot-dev mailing list