RFR: 8349102: Test compiler/arguments/TestCodeEntryAlignment.java failed: assert(allocates2(pc)) failed: not in CodeBuffer memory

Andrew Dinn adinn at openjdk.org
Tue Feb 4 13:51:13 UTC 2025


On Tue, 4 Feb 2025 13:44:10 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

> …assert(allocates2(pc)) failed: not in CodeBuffer memory
> 
> The StubGenenerator compiler blob runs out of space when TestCodeEntryAlignment is run on macos/x86_64 on an avx2-only CPU. This only happens in the worst case with command line options `-XX:CodeCacheSegmentSize=1024 -XX:CodeEntryAlignment=1024`.
> 
> On linux/x86_64 the test succeeds in that worst case when run on an avx512-enabled CPU but with only 980 bytes of headroom.
> 
> This patch increments the buffer size on x86_64 to ensure both the avx2 and avx3 cases have enough headroom.
> 
> n.b. the increment has deliberately been made x86_64-specific rather than macos-specific, even though this problem manifests when testing MacOS and does not manifest when testing Linux. The disparity in generated stubs size actually relates to the capabilities of the CPU and is independent of OS.

@TobiHartmann I estimated the required increment at 4000 bytes. Let's see if it is enough.

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

PR Comment: https://git.openjdk.org/jdk/pull/23439#issuecomment-2634023369


More information about the hotspot-compiler-dev mailing list