diff --git a/jcl/src/jdk.management/share/classes/com/ibm/lang/management/internal/ExtendedOperatingSystemMXBeanImpl.java b/jcl/src/jdk.management/share/classes/com/ibm/lang/management/internal/ExtendedOperatingSystemMXBeanImpl.java index d29a9d67934..772e9b71500 100644 --- a/jcl/src/jdk.management/share/classes/com/ibm/lang/management/internal/ExtendedOperatingSystemMXBeanImpl.java +++ b/jcl/src/jdk.management/share/classes/com/ibm/lang/management/internal/ExtendedOperatingSystemMXBeanImpl.java @@ -269,9 +269,8 @@ public final synchronized double getProcessCpuLoad() { } latestCpuTime = cpuTime; - /* First call to this method returns 0 to match the behaviour of the RI. - * If the CpuLoadCompatibility flag is set, the bahaviour is reverted to - * return -1 for compatibility. + /* If no previous timestamps is set, the default behaviour is to return -1. + * If the compatibility flag is set, return 0 to match the behaviour of RI. */ if (-1 == oldTime) { /* Save current counters; next invocation onwards, we use these to diff --git a/runtime/vm/jvminit.c b/runtime/vm/jvminit.c index da347ec9e2d..dac0583789a 100644 --- a/runtime/vm/jvminit.c +++ b/runtime/vm/jvminit.c @@ -4124,8 +4124,8 @@ processVMArgsFromFirstToLast(J9JavaVM * vm) } { - IDATA cpuLoadCompatibility = FIND_AND_CONSUME_VMARG(EXACT_MATCH, VMOPT_XXCPULOADCOMPATIBILITY , NULL); - IDATA noCpuLoadCompatibility = FIND_AND_CONSUME_VMARG(EXACT_MATCH, VMOPT_XXNOCPULOADCOMPATIBILITY , NULL); + IDATA cpuLoadCompatibility = FIND_AND_CONSUME_VMARG(EXACT_MATCH, VMOPT_XXCPULOADCOMPATIBILITY, NULL); + IDATA noCpuLoadCompatibility = FIND_AND_CONSUME_VMARG(EXACT_MATCH, VMOPT_XXNOCPULOADCOMPATIBILITY, NULL); if (cpuLoadCompatibility > noCpuLoadCompatibility) { vm->extendedRuntimeFlags2 |= J9_EXTENDED_RUNTIME2_CPU_LOAD_COMPATIBILITY; }