RFR (S) 8219712: code_size2 is too small on new Skylake CPUs

Vladimir Kozlov vladimir.kozlov at oracle.com
Tue Feb 26 17:13:54 UTC 2019


Looks good.

David, this is usual way we handle buffer's size for stubs generation (usually for JIT intrinsics) when we add new code 
or previous code increased in size due to using new set of instructions.

Ralf, there was discussion about automating calculation of these buffers sizes but we decided to not do that since we 
change it very rare.

Thanks,
Vladimir

On 2/26/19 7:50 AM, Schmelter, Ralf wrote:
> Hi David,
> 
>> I agree with Matthias: can this be a DEBUG_ONLY change?
> 
> code_size2 is the size of the BufferBlob which is allocated to contain the "stub routines 2" created by StubGenerator. And in the debug build we check via assertions, that we don't overwrite the buffer. In the optimized version, we would later just overwrite part of the stub routines. So making it DEBUG_ONLY defeats the purpose of the change.
> 
>> Further is the problem with 32-bit and 64-bit or only 64-bit? Your
> change affects 32-bit.
> 
> Since I only build the 64bit VM, I've changed the webrev: http://cr.openjdk.java.net/~rschmelter/webrevs/8219712/webrev.1/
> It should now only increase the 64 bit version.
> 
> In the end, it would be nice if the initial BufferBlob size could be more generous and then later adjusted to the really needed space, since it is really not easy to get a tight upper bound reliably, with it being dependent on the OS, GC, CPU features and other flags.
> 
> Best regards,
> Ralf
> 


More information about the hotspot-dev mailing list