RFR: 8314220: Configurable InlineCacheBuffer size [v2]
Dean Long
dlong at openjdk.org
Tue Nov 14 03:29:28 UTC 2023
On Mon, 13 Nov 2023 14:42:56 GMT, Ekaterina Vergizova <evergizova at openjdk.org> wrote:
>> I'd rather have the type as size_t and change StubQueue accordingly.
>
> Thanks @dean-long.
> I would like to keep this enhancement simple and minimal so that it can be backported to 17 and 11.
> So I'd like to avoid changes to StubQueue. I can change the type of InlineCacheBufferSize to size_t and add checked_cast to StubQueue constructor in InlineCacheBuffer::initialize():
> _buffer = new StubQueue(new ICStubInterface, checked_cast<int>(InlineCacheBufferSize), InlineCacheBuffer_lock, "InlineCacheBuffer");
>
> Because in any case InlineCacheBufferSize can't be greater than INT_MAX:
> `InlineCacheBufferSize < NonNMethodCodeHeapSize < ReservedCodeCacheSize < CODE_CACHE_DEFAULT_LIMIT = 2G`:
> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/code/codeCache.cpp#L191
> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/compilerDefinitions.cpp#L492
> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/utilities/globalDefinitions.hpp#L589
>
> Will that be OK?
OK.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15271#discussion_r1391942486
More information about the hotspot-dev
mailing list