RFR: 8356778: Compiler add event logging in case of failures

Lutz Schmidt lucy at openjdk.org
Thu May 15 15:56:53 UTC 2025


On Thu, 15 May 2025 14:56:41 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> We should add event logging to some related hotspot methods. While testing this functionality it turned out that sometimes the CompileTask pointer is 0, so this needs to be check to avoid crashes.
>
> src/hotspot/share/c1/c1_Compilation.cpp line 651:
> 
>> 649:   assert(msg != nullptr, "bailout message must exist");
>> 650:   // record the bailout for hserr envlog
>> 651:   if (msg != nullptr) {
> 
> How can it be nullptr? All callers pass some message.

What if I create a new call like 

char* myMsg = nullptr;
 . . .
bailout(myMsg);

and, due to complicated logic, `myMsg` is not assigned a value in all cases? General topic: future-proof code.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25188#discussion_r2091509857


More information about the hotspot-compiler-dev mailing list