From dbd16155177a153374c061f1b98f9fd4e0afe41a Mon Sep 17 00:00:00 2001 From: tajila Date: Mon, 18 Nov 2024 15:49:59 -0500 Subject: [PATCH] Fix conditon in JFR buffer test Signed-off-by: tajila --- runtime/vm/jfr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/vm/jfr.cpp b/runtime/vm/jfr.cpp index bb133967ba7..5bd5926093e 100644 --- a/runtime/vm/jfr.cpp +++ b/runtime/vm/jfr.cpp @@ -198,7 +198,7 @@ flushBufferToGlobal(J9VMThread *currentThread, J9VMThread *flushThread) UDATA bufferSize = flushThread->jfrBuffer.bufferCurrent - flushThread->jfrBuffer.bufferStart; bool success = true; - if (areJFRBuffersReadyForWrite(currentThread)) { + if (!areJFRBuffersReadyForWrite(currentThread)) { goto done; } @@ -302,7 +302,7 @@ reserveBuffer(J9VMThread *currentThread, UDATA size) Assert_VM_true(((currentThread)->publicFlags & J9_PUBLIC_FLAGS_VM_ACCESS) || ((J9_XACCESS_EXCLUSIVE == vm->exclusiveAccessState) || (J9_XACCESS_EXCLUSIVE == vm->safePointState))); - if (areJFRBuffersReadyForWrite(currentThread)) { + if (!areJFRBuffersReadyForWrite(currentThread)) { goto done; }