Skip to content

Commit

Permalink
Add tracepoint to unpark
Browse files Browse the repository at this point in the history
Signed-off-by: tajila <[email protected]>
  • Loading branch information
tajila committed Nov 16, 2024
1 parent 52b4dd4 commit 6235eef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions thread/common/omrthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -3345,17 +3345,21 @@ omrthread_park(int64_t millis, intptr_t nanos)
void
omrthread_unpark(omrthread_t thread)
{
uintptr_t slowPath = 0;
ASSERT(thread);

THREAD_LOCK(thread, CALLER_UNPARK_THREAD);

thread->flags |= J9THREAD_FLAG_UNPARKED;

if (thread->flags & J9THREAD_FLAG_PARKED) {
slowPath = 1;
NOTIFY_WRAPPER(thread);
}

THREAD_UNLOCK(thread);

Trc_THR_Unpark(slowPath);
}


Expand Down
2 changes: 2 additions & 0 deletions thread/j9thr.tdf
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,5 @@ TraceException=Trc_THR_omrthread_get_cpu_time_ex_clock_gettime_failed Overhead=1
TraceException=Trc_THR_fixupThreadAccounting_omrthread_get_cpu_time_ex_error Overhead=1 Level=1 NoEnv Test Template="omrthread_get_cpu_time_ex returned error=%zd for thread=0x%p"

TraceEvent=Trc_THR_EnableRawMonitorSpin_CustomSpinOption Overhead=1 Level=3 NoEnv Test Template="(ENABLE_RAW_MONITOR_SPIN) Using custom spin counts: %s, monitor: %p, threeTierSpinCount1: %zu, threeTierSpinCount2: %zu, threeTierSpinCount3: %zu, adaptSpin: %zu"

TraceEvent=Trc_THR_Unpark Overhead=1 Level=5 NoEnv Test Template="Unpark slow path taken=%zu"

0 comments on commit 6235eef

Please sign in to comment.