Skip to content

Commit f86e3cb

Browse files
authored
Merge pull request #20949 from adpopescu/jfr-threadpark-fix
JFR Park event fixes.
2 parents a9642cf + 2afaac5 commit f86e3cb

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

runtime/vm/JFRChunkWriter.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ class VM_JFRChunkWriter {
158158
static constexpr int THREAD_END_EVENT_SIZE = (4 * sizeof(U_64)) + sizeof(U_32);
159159
static constexpr int THREAD_SLEEP_EVENT_SIZE = (7 * sizeof(U_64)) + sizeof(U_32);
160160
static constexpr int MONITOR_WAIT_EVENT_SIZE = (9 * sizeof(U_64)) + sizeof(U_32);
161+
static constexpr int THREAD_PARK_EVENT_SIZE = (9 * sizeof(U_64)) + sizeof(U_32);
161162
static constexpr int JVM_INFORMATION_EVENT_SIZE = 3000;
162163
static constexpr int PHYSICAL_MEMORY_EVENT_SIZE = (4 * sizeof(U_64)) + sizeof(U_32);
163164
static constexpr int VIRTUALIZATION_INFORMATION_EVENT_SIZE = 50;
@@ -768,6 +769,8 @@ class VM_JFRChunkWriter {
768769

769770
requiredBufferSize += (_constantPoolTypes.getMonitorWaitCount() * MONITOR_WAIT_EVENT_SIZE);
770771

772+
requiredBufferSize += (_constantPoolTypes.getThreadParkCount() * THREAD_PARK_EVENT_SIZE);
773+
771774
requiredBufferSize += JVM_INFORMATION_EVENT_SIZE;
772775

773776
requiredBufferSize += OS_INFORMATION_EVENT_SIZE;

runtime/vm/JFRConstantPoolTypes.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,8 @@ VM_JFRConstantPoolTypes::addThreadParkEntry(J9JFRThreadParked* threadParkData)
11261126
entry->timeOut = threadParkData->timeOut;
11271127
entry->untilTime = threadParkData->untilTime;
11281128

1129+
_threadParkCount += 1;
1130+
11291131
done:
11301132
return;
11311133
}

0 commit comments

Comments
 (0)