RFR: 8314220: Configurable InlineCacheBuffer size [v2]
Ekaterina Vergizova
evergizova at openjdk.org
Mon Nov 13 14:46:04 UTC 2023
On Fri, 22 Sep 2023 23:54:30 GMT, Dean Long <dlong at openjdk.org> wrote:
>> Thanks, I changed type to int and added a range check constraint.
>
> 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?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15271#discussion_r1391208645
More information about the hotspot-dev
mailing list