RFR: 8364558: Test compiler/startup/StartupOutput.java failed with native OOM: CodeCache: no room for StubRoutines

Francesco Andreuzzi duke at openjdk.org
Tue Aug 5 13:46:06 UTC 2025


On Tue, 5 Aug 2025 13:21:01 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

> This PR avoids bringing down the VM when a code cache allocation for the stubgen compiler blob is requested by the compiler thread and fails because the code cache is full. Instead the VM is allowed to carry on with the compiler disabled.

src/hotspot/share/opto/c2compiler.cpp line 95:

> 93:   // If there was an error generating the blob then UseCompiler will
> 94:   // have been unset and we need to skip the remaining initialization
> 95:   if (UseCompiler) {

Inverting the if condition here would result in a slightly more readable code: you could early return `false`, avoid the additional indentation, and the comment at L93-94 would refer to the true branch of the `if` statement.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26642#discussion_r2254396057


More information about the hotspot-dev mailing list