RFR: 8364558: Test compiler/startup/StartupOutput.java failed with native OOM: CodeCache: no room for StubRoutines
Vladimir Kozlov
kvn at openjdk.org
Tue Aug 5 23:25:03 UTC 2025
On Tue, 5 Aug 2025 13:43:12 GMT, Francesco Andreuzzi <duke 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 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.
Should we also check it before calling `compiler_stubs_init()` too?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26642#discussion_r2255527228
More information about the hotspot-dev
mailing list