From 8fee9eaece17af29225e7c699b8522c751a0c56c Mon Sep 17 00:00:00 2001 From: Gengchen Tuo Date: Sun, 17 Dec 2023 11:51:07 -0500 Subject: [PATCH] Fix a comment and format A comment wasn't updated correctly and there's a minor formatting issue in https://github.com/eclipse-openj9/openj9/pull/18636 Signed-off-by: Gengchen Tuo --- .../internal/ExtendedOperatingSystemMXBeanImpl.java | 5 ++--- runtime/vm/jvminit.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) 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; }