diff options
Diffstat (limited to 'openmp/runtime/src/kmp_runtime.cpp')
-rw-r--r-- | openmp/runtime/src/kmp_runtime.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/openmp/runtime/src/kmp_runtime.cpp b/openmp/runtime/src/kmp_runtime.cpp index c05e973ae0f..f902f049477 100644 --- a/openmp/runtime/src/kmp_runtime.cpp +++ b/openmp/runtime/src/kmp_runtime.cpp @@ -7164,10 +7164,10 @@ void __kmp_internal_join(ident_t *id, int gtid, kmp_team_t *team) { __kmp_join_barrier(gtid); /* wait for everyone */ #if OMPT_SUPPORT - int ds_tid = this_thr->th.th_info.ds.ds_tid; - if (this_thr->th.ompt_thread_info.state == omp_state_wait_barrier_implicit) { - ompt_data_t *tId = OMPT_CUR_TASK_DATA(this_thr); - ompt_data_t *pId = OMPT_CUR_TEAM_DATA(this_thr); + if (ompt_enabled.enabled && + this_thr->th.ompt_thread_info.state == omp_state_wait_barrier_implicit) { + int ds_tid = this_thr->th.th_info.ds.ds_tid; + ompt_data_t *task_data = OMPT_CUR_TASK_DATA(this_thr); this_thr->th.ompt_thread_info.state = omp_state_overhead; #if OMPT_OPTIONAL void *codeptr = NULL; @@ -7178,19 +7178,17 @@ void __kmp_internal_join(ident_t *id, int gtid, kmp_team_t *team) { if (ompt_enabled.ompt_callback_sync_region_wait) { ompt_callbacks.ompt_callback(ompt_callback_sync_region_wait)( - ompt_sync_region_barrier, ompt_scope_end, pId, tId, codeptr); + ompt_sync_region_barrier, ompt_scope_end, NULL, task_data, codeptr); } if (ompt_enabled.ompt_callback_sync_region) { ompt_callbacks.ompt_callback(ompt_callback_sync_region)( - ompt_sync_region_barrier, ompt_scope_end, pId, tId, codeptr); + ompt_sync_region_barrier, ompt_scope_end, NULL, task_data, codeptr); } #endif if (!KMP_MASTER_TID(ds_tid) && ompt_enabled.ompt_callback_implicit_task) { ompt_callbacks.ompt_callback(ompt_callback_implicit_task)( - ompt_scope_end, NULL, tId, 0, ds_tid); + ompt_scope_end, NULL, task_data, 0, ds_tid); } - // return to idle state - this_thr->th.ompt_thread_info.state = omp_state_overhead; } #endif |