RFR(s): 8247863: Unreachable code in OperatingSystemImpl.getTotalSwapSpaceSize()
Severin Gehwolf
sgehwolf at redhat.com
Mon Jun 29 15:53:07 UTC 2020
Hi,
Could I please get a review of this dead-code removal? During review of
JDK-8244500 it was discovered that with the new cgroups implementation
supporting v1 and v2 Metrics.getMemoryAndSwapLimit() will never return
0 when relevant cgroup files are missing. E.g. on a system where the
kernel doesn't support swap limit capabilities. Therefore this code
introduced with JDK-8236617 can no longer be reached and should get
removed.
Bug: https://bugs.openjdk.java.net/browse/JDK-8247863
webrev: http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8247863/01/webrev/
Testing: Matthias tested this on the affected system and it did pass
for him. Docker tests on cgroup v1 and cgroup v2.
Thanks,
Severin
More information about the serviceability-dev
mailing list