RFR: JDK-8284758: [linux] improve print_container_info [v3]

Severin Gehwolf sgehwolf at openjdk.java.net
Thu Apr 14 12:37:16 UTC 2022


On Thu, 14 Apr 2022 09:28:06 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> Currently on Linux, os::Linux::print_container_info might print rather badly unreadable memory infos like :
>> 
>> memory_usage_in_bytes: 18029760512
>> memory_max_usage_in_bytes: 423686144
>> 
>> This could be improved , at a lot of places in the hs_err file output we already print the larger memory-related infos in k , for example rlimit information
>> or /proc/meminfo.
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
> 
>   special handling of smaller numbers

LGTM.

src/hotspot/os/linux/os_linux.cpp line 2260:

> 2258:   print_container_helper(st, OSContainer::memory_soft_limit_in_bytes(), "memory_soft_limit_in_bytes");
> 2259:   print_container_helper(st, OSContainer::OSContainer::memory_usage_in_bytes(), "memory_usage_in_bytes");
> 2260:   print_container_helper(st, OSContainer::OSContainer::memory_max_usage_in_bytes(), "memory_max_usage_in_bytes");

I guess this weirdness has been around since JDK-8146115, but can we clean this up to:

print_container_helper(st, OSContainer::memory_usage_in_bytes(), "memory_usage_in_bytes");
print_container_helper(st, OSContainer::memory_max_usage_in_bytes(), "memory_max_usage_in_bytes");


Up to you, though.

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

Marked as reviewed by sgehwolf (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/8217


More information about the hotspot-runtime-dev mailing list