[crac] RFR: 8369566: CRaC: Record metrics during checkpoint [v3]

Radim Vansa rvansa at openjdk.org
Wed Oct 22 11:46:44 UTC 2025


On Thu, 16 Oct 2025 14:04:46 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:

>> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix for PathPatternTest
>
> src/java.base/share/native/libcrexec/image_score.cpp line 44:
> 
>> 42:   }
>> 43:   _score.foreach([&](const Score& score){
>> 44:     fprintf(f, "%s=%f\n", score._name, score._value);
> 
> There's no validation that `=` and `\n` are not present in the name so there will probably be problems with parsing

As for `=`, you can easily say that the last `=` is the separator. The `\n` is user shooting himself into foot.
However in general, this format (and its limitations) is engine-specific and there is no way to report the unsuitability. When the score is reported on Java level, the engine is not consulted yet, and later on we could only fail the checkpoint, which seems excessive to me.
If you want, I can truncate the metric name at first `\n` when recording it here.

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

PR Review Comment: https://git.openjdk.org/crac/pull/269#discussion_r2451811119


More information about the crac-dev mailing list