RFR: JDK-8281274: deal with ActiveProcessorCount in os::Linux::print_container_info

Thomas Stuefe stuefe at openjdk.java.net
Fri Feb 4 17:30:11 UTC 2022


On Fri, 4 Feb 2022 16:18:38 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> The function os::Linux::print_container_info outputs memory- and cpu-related container information (when running in a containerized environment).
> However in the case of active processor count , it currently just outputs the info from OSContainer::active_processor_count without  looking at  ActiveProcessorCount that can be set to overwrite the OSContainer::active_processor_count() - information. This should be improved.

Looks fine.

While looking at this I found that the default for ActiveProcessorCount is -1. The VM only reacts to this flag if it is >0. So, what is 0? The java man page is not saying. Maybe the default should just be 0 to be consistent.

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

Marked as reviewed by stuefe (Reviewer).

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


More information about the hotspot-runtime-dev mailing list