RFR: 8258576: Try to get zerobased CCS if heap is above 32 and CDS is disabled [v2]
Thomas Stuefe
stuefe at openjdk.java.net
Fri Dec 18 10:34:00 UTC 2020
On Fri, 18 Dec 2020 09:42:10 GMT, Richard Reingruber <rrich at openjdk.org> wrote:
>> Please review this small enhancement if CDS is disabled.
>>
>> It tries to get a zerobased compressed class space if we have a not-zerobased compressed oops heap, i.e. the heap is above 32g. In this case there is a good chance to locate CCS below 32g.
>>
>> The fix passed our CI testing: JCK and JTREG, also in Xcomp mode, SPECjvm2008, SPECjbb2015, Renaissance Suite,
>> SAP specific tests with fastdebug and release builds on all platforms
>
> Richard Reingruber has updated the pull request incrementally with one additional commit since the last revision:
>
> In largeHeapAbove32GTest we have a klass shift of 3 on OSX too.
Hi Richard,
small nits, see below. Thanks for fixing.
..Thomas
src/hotspot/share/memory/metaspace.cpp line 706:
> 704: ReservedSpace rs;
> 705:
> 706: // If UseCompressedOops=1 and the java heap has been placed in coops-friendly
s/has/had
src/hotspot/share/memory/metaspace.cpp line 710:
> 708: // right above the java heap.
> 709: // Otherwise the lower 32G are still free. We try to place ccs at the lowest
> 710: // allowed mapping address for efficient encoding of compressed class pointers.
`for efficient encoding of compressed class pointers` I'd reformulate this. Both cases are done to efficiently encode narrow class pointers. We place ccs atop of the heap in the hope of piggybacking its efficient allocation.
Either I would leave the statement out, since it is somewhat obvious from the context, or I would put it atop of the comment.
src/hotspot/share/memory/metaspace.cpp line 711:
> 709: // Otherwise the lower 32G are still free. We try to place ccs at the lowest
> 710: // allowed mapping address for efficient encoding of compressed class pointers.
> 711: address base = (UseCompressedOops && (uint64_t)CompressedOops::base() < OopEncodingHeapMax) ?
Should this not somehow take ccs size into consideration?
eg
size_t gap_above_heap = OopEncodingHeapMax - CompressedOops.end();
if (gap_above_heap >= size) ...
-------------
Changes requested by stuefe (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1815
More information about the hotspot-runtime-dev
mailing list