RFR: 8314220: Configurable InlineCacheBuffer size [v3]
Ekaterina Vergizova
evergizova at openjdk.org
Tue Nov 21 17:41:28 UTC 2023
On Tue, 21 Nov 2023 01:40:26 GMT, Dean Long <dlong at openjdk.org> wrote:
>> src/hotspot/share/compiler/compilerDefinitions.cpp line 503:
>>
>>> 501: jio_fprintf(defaultStream::error_stream(),
>>> 502: "Invalid InlineCacheBufferSize=" SIZE_FORMAT "K. Must be less than NonNMethodCodeHeapSize=" SIZE_FORMAT "K.\n",
>>> 503: InlineCacheBufferSize/K, NonNMethodCodeHeapSize/K);
>>
>> You need to check for alignment of the value. In [StubQueue()](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/code/stubs.cpp#L70) it is aligned up by `2*BytesPerWord` so the final value could be > `InlineCacheBufferSize`.
>
> I think the align up to 2*BytesPerWord is not really need, because BufferBlob::create already does its own alignment which will make the final value > InlineCacheBufferSize. BufferBlob::create uses the size as a minimum, not a maximum.
> I don't think the above check should need to know the details of BufferBlob::create and StubQueue() alignment adjustments. Having InlineCacheBufferSize near to NonNMethodCodeHeapSize is going the make the JVM fail in startup for other reasons, isn't it? Maybe the max for InlineCacheBufferSize should be NonNMethodCodeHeapSize/2?
Thanks @dean-long and @vnkozlov, I updated InlineCacheBufferSize limit to NonNMethodCodeHeapSize/2.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15271#discussion_r1400945799
More information about the hotspot-dev
mailing list