RFR: 8368251: Parallel: Refactor lgrp_id used in MutableNUMASpace [v2]

Joel Sikström jsikstro at openjdk.org
Wed Sep 24 06:51:20 UTC 2025


On Wed, 24 Sep 2025 06:09:10 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> src/hotspot/os/windows/os_windows.cpp line 543:
>> 
>>> 541:     }
>>> 542:   }
>>> 543: 
>> 
>> I recommend asserting that `UseNUMA` is false here, with a message like `Should set NUMA id here` to not miss this later.
>> I prefer trying to formalize code assumptions.
>
> Or just a "must be" :)

I have added an assert in the only place we use it where it mustn't be -1. Do you think this is enough or should we also assert during thread creation, with a comment stating that there is thread state dependent on NUMA support, which we skip here.

In the new `MutableNUMASpace::LGRPSpace *MutableNUMASpace::lgrp_space_for_thread(Thread* thr)`:

assert(lgrp_id != -1, "lgrp_id must be set during thread creation");

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27424#discussion_r2374625802


More information about the hotspot-gc-dev mailing list