Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a comment and format #18638

Merged
merged 1 commit into from
Dec 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions runtime/vm/jvminit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down