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

Timofei Pushkin tpushkin at openjdk.org
Tue Oct 21 07:18:38 UTC 2025


On Tue, 21 Oct 2025 06:42:31 GMT, Radim Vansa <rvansa at openjdk.org> wrote:

>> src/hotspot/share/runtime/crac_engine.hpp line 76:
>> 
>>> 74: 
>>> 75:   ApiStatus prepare_image_score_api();
>>> 76:   bool set_score(const char* metric, double value);
>> 
>> Suggestion:
>> 
>>   bool set_score(const char* metric, double value) const;
>
> While technically it is possible to mark this as `const`, I don't like the message this sends: `_conf` is "owned" by `CRaCEngine`, I consider that an opaque part of its state. But `set_score` mutates the configuration.

Agree, there can be two views on whether this should be const or not. But currently we have all other setters as const.

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

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


More information about the crac-dev mailing list