RFR: 8283298: Make CodeCacheSegmentSize a product flag

Vladimir Kozlov kvn at openjdk.java.net
Tue Mar 22 19:12:33 UTC 2022


On Thu, 17 Mar 2022 08:27:25 GMT, Jie Fu <jiefu at openjdk.org> wrote:

> Hi all,
> 
> As discussed in https://github.com/openjdk/jdk/pull/7830, this patch makes `CodeCacheSegmentSize` a product flag.
> It also fixes two bugs when testing the release VM with CodeEntryAlignment={512, 1024}.
> Please review it.
> 
> Thanks.
> Best regards,
> Jie

src/hotspot/share/interpreter/templateInterpreter.cpp line 51:

> 49:   NOT_PRODUCT(code_size *= 4;)  // debug uses extra interpreter code space
> 50:   int max_aligned_codelets = 280;
> 51:   int max_aligned_bytes = max_aligned_codelets * CodeEntryAlignment * 2;

Please explain in comment where these numbers (280, *2) are coming from and why you need additional size.

src/hotspot/share/prims/methodHandles.cpp line 93:

> 91:   TraceTime timer("MethodHandles adapters generation", TRACETIME_LOG(Info, startuptime));
> 92:   int adapter_num = (int)Interpreter::method_handle_invoke_LAST - (int)Interpreter::method_handle_invoke_FIRST + 1;
> 93:   int max_aligned_bytes = adapter_num * CodeEntryAlignment;

Add comment that we need additional bytes due to alignment.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7851


More information about the hotspot-dev mailing list