Skip to content

Commit

Permalink
JFR Park event fixes.
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Popescu <[email protected]>
  • Loading branch information
adpopescu committed Jan 16, 2025
1 parent 4f82e99 commit 2afaac5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runtime/vm/JFRChunkWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ class VM_JFRChunkWriter {
static constexpr int THREAD_END_EVENT_SIZE = (4 * sizeof(U_64)) + sizeof(U_32);
static constexpr int THREAD_SLEEP_EVENT_SIZE = (7 * sizeof(U_64)) + sizeof(U_32);
static constexpr int MONITOR_WAIT_EVENT_SIZE = (9 * sizeof(U_64)) + sizeof(U_32);
static constexpr int THREAD_PARK_EVENT_SIZE = (9 * sizeof(U_64)) + sizeof(U_32);
static constexpr int JVM_INFORMATION_EVENT_SIZE = 3000;
static constexpr int PHYSICAL_MEMORY_EVENT_SIZE = (4 * sizeof(U_64)) + sizeof(U_32);
static constexpr int VIRTUALIZATION_INFORMATION_EVENT_SIZE = 50;
Expand Down Expand Up @@ -768,6 +769,8 @@ class VM_JFRChunkWriter {

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

requiredBufferSize += (_constantPoolTypes.getThreadParkCount() * THREAD_PARK_EVENT_SIZE);

requiredBufferSize += JVM_INFORMATION_EVENT_SIZE;

requiredBufferSize += OS_INFORMATION_EVENT_SIZE;
Expand Down
2 changes: 2 additions & 0 deletions runtime/vm/JFRConstantPoolTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,8 @@ VM_JFRConstantPoolTypes::addThreadParkEntry(J9JFRThreadParked* threadParkData)
entry->timeOut = threadParkData->timeOut;
entry->untilTime = threadParkData->untilTime;

_threadParkCount += 1;

done:
return;
}
Expand Down

0 comments on commit 2afaac5

Please sign in to comment.