Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tracepoint to unpark #7547

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"