[8u] RFR: 8226575: OperatingSystemMXBean should be made container aware
Andrew Hughes
gnu.andrew at redhat.com
Thu Aug 20 20:29:33 UTC 2020
On 19:42 Thu 20 Aug , Severin Gehwolf wrote:
>
> They're unchanged:
>
> http://mail.openjdk.java.net/pipermail/jdk8u-dev/2020-July/012178.html
>
> webrev:
> http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8226575/jdk8/01/
>
> Thanks,
> Severin
>
Thanks. In future, it would help to tag the issue with jdk8u-needs-review
and link to the RFR there, so it doesn't get lost in the mail. See
the OpenJDK wiki [0] for further information and a link to the 8u review
filter.
The mapping of the native files from 11u to 8u is rather confusing, as
the changes are not 1:1. A conversion mapping would have been helpful.
>From what I can work out,
* src/jdk.management/aix/native/libmanagement_ext/UnixOperatingSystem.c
=> src/aix/native/sun/management/AixOperatingSystem.c
getSystemCpuLoad renamed to getSystemCpuLoad0 as noted.
Copyright line missing.
getHostConfiguredCpuCount0 & getSingleCpuLoad0 missing.
* src/jdk.management/linux/native/libmanagement_ext/UnixOperatingSystem.c
=> src/solaris/native/sun/management/LinuxOperatingSystem.c
getSystemCpuLoad renamed to getSystemCpuLoad0 as noted.
Looks good, though there is an odd missing whitespace change near
sysconf(_SC_NPROCESSORS_ONLN).
* src/jdk.management/macosx/native/libmanagement_ext/UnixOperatingSystem.c
=> src/solaris/native/sun/management/MacosxOperatingSystem.c
getSystemCpuLoad renamed to getSystemCpuLoad0 as noted.
Copyright line missing.
getHostConfiguredCpuCount0 & getSingleCpuLoad0 missing.
* N/A
=> src/solaris/native/sun/management/OperatingSystemImpl.c
Addition of '0' suffix as noted.
getHostConfiguredCpuCount0 & getSingleCpuLoad0 implemented here under #ifndef linux.
* src/jdk.management/solaris/native/libmanagement_ext/UnixOperatingSystem.c
=> src/solaris/native/sun/management/SolarisOperatingSystem.c
getSystemCpuLoad renamed to getSystemCpuLoad0 as noted.
Copyright line missing.
getHostConfiguredCpuCount0 & getSingleCpuLoad0 missing.
* N/A
=> src/windows/native/sun/management/OperatingSystemImpl.c
Addition of '0' suffix as noted.
getHostConfiguredCpuCount0 & getSingleCpuLoad0 implemented here as in UnixOperatingSystem.c
Copyright line missing.
So AixOperatingSystem.c, MacosxOperatingSystem.c,
LinuxOperatingSystem.c and SolarisOperatingSystem.c share common code
from OperatingSystemImpl.c, and thus the default implementations of
getHostConfiguredCpuCount0 & getSingleCpuLoad0 can be shared rather
than appearing in each individual file. Is this correct?
Again, clarification on these in the original RFR would have helped
the review. If my assumption is correct, then the only fix needed
for these files is to add the missing copyright updates in the non-Linux
files.
There is no Windows file in the 11u version. Why is it needed in 8u?
In both, OperatingSystemImpl.java seems to be under
src/jdk.management/unix/classes or src/solaris/classes/sun/management,
rather than share/classes.
Your description of the Subsystem.java changes is quite terse.
Can you explain in more detail why the readMatchingLines change
is not needed?
OperatingSystemImpl.java & OperatingSystemMXBean.java look fine.
[0] https://wiki.openjdk.java.net/display/jdk8u/Main
Thanks,
--
Andrew :)
Senior Free Java Software Engineer
OpenJDK Package Owner
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
More information about the jdk8u-dev
mailing list