RFR: 8365606: Container code should not be using jlong/julong [v2]

Thomas Stuefe stuefe at openjdk.org
Fri Nov 14 11:42:20 UTC 2025


On Mon, 10 Nov 2025 13:27:59 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

>> src/hotspot/os/linux/cgroupSubsystem_linux.hpp line 80:
>> 
>>> 78:     return false;                                                                     \
>>> 79:   }                                                                                   \
>>> 80:   log_trace(os, container)(log_string " is: " UINT64_FORMAT, retval);                 \
>> 
>> Here and in other places: don't use raw UINT64_FORMAT; use `PHYS_MEM_TYPE_FORMAT` instead.
>
> This is intentional since the processor_count API doesn't use `physical_memory_size_type` (as it doesn't make sense in this context). See, for example, `CgroupV2CpuController::cpu_period()`. The common denominator is `uint64_t`. This is a bit awkward, but I don't know a better way to deal with this. The reading functions are shared, most of the API is used for memory value reading (but not exclusively, exceptions are `pid`, `cpu`).

Okay

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27743#discussion_r2527193808


More information about the hotspot-jfr-dev mailing list