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

Severin Gehwolf sgehwolf at openjdk.org
Mon Nov 10 15:24:21 UTC 2025


On Wed, 22 Oct 2025 12:21:10 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/share/runtime/os.cpp line 2215:
> 
>> 2213:     }
>> 2214:     value = mem_usage;
>> 2215:     return true;
> 
> Can we collapse this and just set the `value` reference directly instead in the container functions? Something like:
> 
> ```c++
> if (OSContainer::is_containerized()) {
>   return OSContainer::memory_usage_in_bytes(mem_usage);
> }

Sure. Thanks!

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

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


More information about the hotspot-jfr-dev mailing list