[crac] RFR: 8369566: CRaC: Record metrics during checkpoint [v7]
Timofei Pushkin
tpushkin at openjdk.org
Thu Oct 23 13:22:55 UTC 2025
On Thu, 23 Oct 2025 13:09:38 GMT, Radim Vansa <rvansa at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/crac/Score.java line 67:
>>
>>> 65: int resources = 0;
>>> 66: for (var p : Core.Priority.values()) {
>>> 67: if (p.getContext() instanceof OrderedContext<?> octx) {
>>
>> I would prefer a cast just to ensure we don't miss a resource, but for now this should be equivalent
>
> `Core.Priority.SCORE.getContext()` is not an `OrderedContext`.
We could check `p != Core.Priority.SCORE` then. I am suggesting this because it'll make sure we won't miss resources if we add some other type of context in the future. But if you think this is unlikely, I'm OK to leave it as is.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/269#discussion_r2455112110
More information about the crac-dev
mailing list