Skip to content

Commit 29414d1

Browse files
committed
Modify JFR auto chunk flush
The setOutput currently only flushes when the file name is null. However, it should flush every time the chunk file changes. Signed-off-by: Tobi Ajila <atobia@ca.ibm.com>
1 parent a1d573a commit 29414d1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

runtime/jcl/common/jdk_jfr_internal_JVM_common.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ Java_jdk_jfr_internal_JVM_setMemorySize(JNIEnv *env, jobject obj, jlong size)
305305
void JNICALL
306306
Java_jdk_jfr_internal_JVM_setOutput(JNIEnv *env, jobject obj, jstring file)
307307
{
308-
if (NULL == file) {
308+
J9VMThread *currentThread = (J9VMThread*) env;
309+
if (NULL != currentThread->javaVM->jfrState.jfrFileName) {
309310
Java_com_ibm_oti_vm_VM_jfrDump(env, NULL);
310311
}
311312
Java_com_ibm_oti_vm_VM_setJFRRecordingFileName(env, NULL, file);

0 commit comments

Comments
 (0)