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

Severin Gehwolf sgehwolf at openjdk.org
Mon Nov 10 14:13:56 UTC 2025


On Mon, 27 Oct 2025 11:43:34 GMT, Casper Norrbin <cnorrbin at openjdk.org> wrote:

>> Severin Gehwolf has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
>> 
>>  - Merge branch 'master' into jdk-8365606-jlong-julong-refactor
>>  - Fix print_container_info output
>>  - whitespace clean-ups and other small fixes
>>  - Fix log format in container macro and scanf format
>>  - Fix duplicate include in osContainer_linux
>>  - 8365606: Container code should not be using jlong/julong
>
> src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp line 178:
> 
>> 176:   bool is_ok = reader()->read_numerical_key_value("/cpu.stat", "usage_usec", value);
>> 177:   if (!is_ok) {
>> 178:     log_trace(os, container)("CPU Usage failed: -2");
> 
> Do we need to keep the `-2` here? Or could we perhaps change to a better message?

Thanks. I've removed the `-2`.

> src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp line 237:
> 
>> 235:   if (!reader()->read_number_handle_max("/memory.swap.max", swap_limit_val)) {
>> 236:     // Some container tests rely on this trace logging to happen.
>> 237:     log_trace(os, container)("Swap Limit failed: -2");
> 
> Do we need to keep the `-2` here? Or could we perhaps change to a better message?

I've removed the `-2`. I.e. `Swap Limit failed` is the log message.

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

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


More information about the hotspot-jfr-dev mailing list