Index: runtime/src/include/50/ompt.h.var =================================================================== --- runtime/src/include/50/ompt.h.var +++ runtime/src/include/50/ompt.h.var @@ -53,44 +53,44 @@ macro(ompt_get_target_info) \ macro(ompt_get_num_devices) -#define FOREACH_OMP_STATE(macro) \ +#define FOREACH_OMPT_STATE(macro) \ \ /* first available state */ \ - macro (omp_state_undefined, 0x102) /* undefined thread state */ \ + macro (ompt_state_undefined, 0x102) /* undefined thread state */ \ \ /* work states (0..15) */ \ - macro (omp_state_work_serial, 0x000) /* working outside parallel */ \ - macro (omp_state_work_parallel, 0x001) /* working within parallel */ \ - macro (omp_state_work_reduction, 0x002) /* performing a reduction */ \ + macro (ompt_state_work_serial, 0x000) /* working outside parallel */ \ + macro (ompt_state_work_parallel, 0x001) /* working within parallel */ \ + macro (ompt_state_work_reduction, 0x002) /* performing a reduction */ \ \ /* barrier wait states (16..31) */ \ - macro (omp_state_wait_barrier, 0x010) /* waiting at a barrier */ \ - macro (omp_state_wait_barrier_implicit_parallel, 0x011) \ + macro (ompt_state_wait_barrier, 0x010) /* waiting at a barrier */ \ + macro (ompt_state_wait_barrier_implicit_parallel, 0x011) \ /* implicit barrier at the end of parallel region */\ - macro (omp_state_wait_barrier_implicit_workshare, 0x012) \ + macro (ompt_state_wait_barrier_implicit_workshare, 0x012) \ /* implicit barrier at the end of worksharing */ \ - macro (omp_state_wait_barrier_implicit, 0x013) /* implicit barrier */ \ - macro (omp_state_wait_barrier_explicit, 0x014) /* explicit barrier */ \ + macro (ompt_state_wait_barrier_implicit, 0x013) /* implicit barrier */ \ + macro (ompt_state_wait_barrier_explicit, 0x014) /* explicit barrier */ \ \ /* task wait states (32..63) */ \ - macro (omp_state_wait_taskwait, 0x020) /* waiting at a taskwait */ \ - macro (omp_state_wait_taskgroup, 0x021) /* waiting at a taskgroup */ \ + macro (ompt_state_wait_taskwait, 0x020) /* waiting at a taskwait */ \ + macro (ompt_state_wait_taskgroup, 0x021) /* waiting at a taskgroup */ \ \ /* mutex wait states (64..127) */ \ - macro (omp_state_wait_mutex, 0x040) \ - macro (omp_state_wait_lock, 0x041) /* waiting for lock */ \ - macro (omp_state_wait_critical, 0x042) /* waiting for critical */ \ - macro (omp_state_wait_atomic, 0x043) /* waiting for atomic */ \ - macro (omp_state_wait_ordered, 0x044) /* waiting for ordered */ \ + macro (ompt_state_wait_mutex, 0x040) \ + macro (ompt_state_wait_lock, 0x041) /* waiting for lock */ \ + macro (ompt_state_wait_critical, 0x042) /* waiting for critical */ \ + macro (ompt_state_wait_atomic, 0x043) /* waiting for atomic */ \ + macro (ompt_state_wait_ordered, 0x044) /* waiting for ordered */ \ \ /* target wait states (128..255) */ \ - macro (omp_state_wait_target, 0x080) /* waiting for target region */ \ - macro (omp_state_wait_target_map, 0x081) /* waiting for target data mapping operation */ \ - macro (omp_state_wait_target_update, 0x082) /* waiting for target update operation */ \ + macro (ompt_state_wait_target, 0x080) /* waiting for target region */ \ + macro (ompt_state_wait_target_map, 0x081) /* waiting for target data mapping operation */ \ + macro (ompt_state_wait_target_update, 0x082) /* waiting for target update operation */ \ \ /* misc (256..511) */ \ - macro (omp_state_idle, 0x100) /* waiting for work */ \ - macro (omp_state_overhead, 0x101) /* overhead excluding wait states */ \ + macro (ompt_state_idle, 0x100) /* waiting for work */ \ + macro (ompt_state_overhead, 0x101) /* overhead excluding wait states */ \ \ /* implementation-specific states (512..) */ @@ -178,20 +178,11 @@ static const ompt_data_t ompt_data_none = {0}; -typedef uint64_t omp_wait_id_t; -static const omp_wait_id_t omp_wait_id_none = 0; +typedef uint64_t ompt_wait_id_t; +static const ompt_wait_id_t omp_wait_id_none = 0; typedef void ompt_device_t; -/*--------------------- - * omp_frame_t - *---------------------*/ - -typedef struct omp_frame_t { - void *exit_frame; /* next frame is user code */ - void *enter_frame; /* previous frame is user code */ -} omp_frame_t; - /*--------------------- * dependences types @@ -220,10 +211,18 @@ *---------------------*/ typedef enum { -#define omp_state_macro(state, code) state = code, - FOREACH_OMP_STATE(omp_state_macro) -#undef omp_state_macro -} omp_state_t; +#define ompt_state_macro(state, code) state = code, + FOREACH_OMPT_STATE(ompt_state_macro) +#undef ompt_state_macro +} ompt_state_t; + +typedef enum ompt_frame_flag_t { + ompt_frame_runtime = 0x00, + ompt_frame_application = 0x01, + ompt_frame_cfa = 0x10, + ompt_frame_framepointer = 0x20, + ompt_frame_stackaddress = 0x30 +} ompt_frame_flag_t; /*--------------------- @@ -278,6 +277,12 @@ ompt_thread_unknown = 4 } ompt_thread_t; +typedef struct ompt_frame_t { + ompt_data_t exit_frame; + ompt_data_t enter_frame; + int exit_frame_flags; + int enter_frame_flags; +} ompt_frame_t; typedef enum ompt_parallel_flag_t { ompt_parallel_invoker_program = 0x00000001, /* program invokes master task */ ompt_parallel_invoker_runtime = 0x00000002, /* runtime invokes master task */ @@ -295,7 +300,7 @@ ); typedef void (*ompt_wait_callback_t) ( - omp_wait_id_t wait_id /* wait data */ + ompt_wait_id_t wait_id /* wait data */ ); /* parallel and workshares */ @@ -316,7 +321,7 @@ typedef void (*ompt_callback_parallel_begin_t) ( ompt_data_t *encountering_task_data, /* data of encountering task */ - const omp_frame_t *encountering_task_frame, /* frame data of encountering task */ + const ompt_frame_t *encountering_task_frame, /* frame data of encountering task */ ompt_data_t *parallel_data, /* data of parallel region */ unsigned int requested_team_size, /* requested number of threads in team */ int flag, /* flag for additional information */ @@ -358,7 +363,7 @@ typedef void (*ompt_callback_task_create_t) ( ompt_data_t *encountering_task_data, /* data of parent task */ - const omp_frame_t *encountering_task_frame, /* frame data for parent task */ + const ompt_frame_t *encountering_task_frame, /* frame data for parent task */ ompt_data_t *new_task_data, /* data of created task */ int flag, /* type of created task */ int has_dependences, /* created task has dependences */ @@ -479,19 +484,19 @@ ompt_mutex_t kind, /* mutex kind */ unsigned int hint, /* mutex hint */ unsigned int impl, /* mutex implementation */ - omp_wait_id_t wait_id, /* id of object being awaited */ + ompt_wait_id_t wait_id, /* id of object being awaited */ const void *codeptr_ra /* return address of runtime call */ ); typedef void (*ompt_callback_mutex_t) ( ompt_mutex_t kind, /* mutex kind */ - omp_wait_id_t wait_id, /* id of object being awaited */ + ompt_wait_id_t wait_id, /* id of object being awaited */ const void *codeptr_ra /* return address of runtime call */ ); typedef void (*ompt_callback_nest_lock_t) ( ompt_scope_endpoint_t endpoint, /* endpoint of nested lock */ - omp_wait_id_t wait_id, /* id of object being awaited */ + ompt_wait_id_t wait_id, /* id of object being awaited */ const void *codeptr_ra /* return address of runtime call */ ); @@ -592,8 +597,8 @@ ***************************************************************************/ /* state */ -OMPT_API_FUNCTION(omp_state_t, ompt_get_state, ( - omp_wait_id_t *wait_id +OMPT_API_FUNCTION(ompt_state_t, ompt_get_state, ( + ompt_wait_id_t *wait_id )); /* thread */ @@ -611,7 +616,7 @@ int ancestor_level, int *type, ompt_data_t **task_data, - omp_frame_t **task_frame, + ompt_frame_t **task_frame, ompt_data_t **parallel_data, int *thread_num )); Index: runtime/src/kmp_atomic.h =================================================================== --- runtime/src/kmp_atomic.h +++ runtime/src/kmp_atomic.h @@ -364,7 +364,7 @@ #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( - ompt_mutex_atomic, 0, kmp_mutex_impl_queuing, (omp_wait_id_t)lck, + ompt_mutex_atomic, 0, kmp_mutex_impl_queuing, (ompt_wait_id_t)lck, OMPT_GET_RETURN_ADDRESS(0)); } #endif @@ -374,7 +374,7 @@ #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_atomic, (omp_wait_id_t)lck, OMPT_GET_RETURN_ADDRESS(0)); + ompt_mutex_atomic, (ompt_wait_id_t)lck, OMPT_GET_RETURN_ADDRESS(0)); } #endif } @@ -390,7 +390,7 @@ #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_atomic, (omp_wait_id_t)lck, OMPT_GET_RETURN_ADDRESS(0)); + ompt_mutex_atomic, (ompt_wait_id_t)lck, OMPT_GET_RETURN_ADDRESS(0)); } #endif } Index: runtime/src/kmp_barrier.cpp =================================================================== --- runtime/src/kmp_barrier.cpp +++ runtime/src/kmp_barrier.cpp @@ -1253,7 +1253,7 @@ // It is OK to report the barrier state after the barrier begin callback. // According to the OMPT specification, a compliant implementation may // even delay reporting this state until the barrier begins to wait. - this_thr->th.ompt_thread_info.state = omp_state_wait_barrier; + this_thr->th.ompt_thread_info.state = ompt_state_wait_barrier; } #endif @@ -1502,7 +1502,7 @@ my_task_data, return_address); } #endif - this_thr->th.ompt_thread_info.state = omp_state_work_parallel; + this_thr->th.ompt_thread_info.state = ompt_state_work_parallel; } #endif ANNOTATE_BARRIER_END(&team->t.t_bar); @@ -1624,7 +1624,7 @@ if (!KMP_MASTER_TID(ds_tid)) this_thr->th.ompt_thread_info.task_data = *OMPT_CUR_TASK_DATA(this_thr); #endif - this_thr->th.ompt_thread_info.state = omp_state_wait_barrier_implicit; + this_thr->th.ompt_thread_info.state = ompt_state_wait_barrier_implicit; } #endif @@ -1882,12 +1882,12 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled && - this_thr->th.ompt_thread_info.state == omp_state_wait_barrier_implicit) { + this_thr->th.ompt_thread_info.state == ompt_state_wait_barrier_implicit) { int ds_tid = this_thr->th.th_info.ds.ds_tid; ompt_data_t *task_data = (team) ? OMPT_CUR_TASK_DATA(this_thr) : &(this_thr->th.ompt_thread_info.task_data); - this_thr->th.ompt_thread_info.state = omp_state_overhead; + this_thr->th.ompt_thread_info.state = ompt_state_overhead; #if OMPT_OPTIONAL void *codeptr = NULL; if (KMP_MASTER_TID(ds_tid) && Index: runtime/src/kmp_csupport.cpp =================================================================== --- runtime/src/kmp_csupport.cpp +++ runtime/src/kmp_csupport.cpp @@ -293,7 +293,7 @@ va_start(ap, microtask); #if OMPT_SUPPORT - omp_frame_t *ompt_frame; + ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { kmp_info_t *master_th = __kmp_threads[gtid]; kmp_team_t *parent_team = master_th->th.th_team; @@ -305,7 +305,7 @@ ompt_frame = &( parent_team->t.t_implicit_task_taskdata[tid].ompt_task_info.frame); } - ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); + ompt_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(gtid); } #endif @@ -395,7 +395,7 @@ int tid = __kmp_tid_from_gtid(gtid); if (ompt_enabled.enabled) { parent_team->t.t_implicit_task_taskdata[tid] - .ompt_task_info.frame.enter_frame = OMPT_GET_FRAME_ADDRESS(1); + .ompt_task_info.frame.enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); } OMPT_STORE_RETURN_ADDRESS(gtid); #endif @@ -506,8 +506,8 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled && - this_thr->th.ompt_thread_info.state != omp_state_overhead) { - OMPT_CUR_TASK_INFO(this_thr)->frame.exit_frame = NULL; + this_thr->th.ompt_thread_info.state != ompt_state_overhead) { + OMPT_CUR_TASK_INFO(this_thr)->frame.exit_frame = ompt_data_none; if (ompt_enabled.ompt_callback_implicit_task) { ompt_callbacks.ompt_callback(ompt_callback_implicit_task)( ompt_scope_end, NULL, OMPT_CUR_TASK_DATA(this_thr), 1, @@ -524,7 +524,7 @@ ompt_parallel_invoker_program, OMPT_LOAD_RETURN_ADDRESS(global_tid)); } __ompt_lw_taskteam_unlink(this_thr); - this_thr->th.ompt_thread_info.state = omp_state_overhead; + this_thr->th.ompt_thread_info.state = ompt_state_overhead; } #endif @@ -606,8 +606,8 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) this_thr->th.ompt_thread_info.state = - ((this_thr->th.th_team_serialized) ? omp_state_work_serial - : omp_state_work_parallel); + ((this_thr->th.th_team_serialized) ? ompt_state_work_serial + : ompt_state_work_parallel); #endif } @@ -705,11 +705,11 @@ } #if OMPT_SUPPORT - omp_frame_t *ompt_frame; + ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->enter_frame == NULL) - ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame.ptr == NULL) + ompt_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(global_tid); } #endif @@ -724,7 +724,7 @@ __kmp_barrier(bs_plain_barrier, global_tid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->enter_frame = NULL; + ompt_frame->enter_frame = ompt_data_none; } #endif } @@ -843,22 +843,22 @@ #if OMPT_SUPPORT && OMPT_OPTIONAL kmp_team_t *team; - omp_wait_id_t lck; + ompt_wait_id_t lck; void *codeptr_ra; if (ompt_enabled.enabled) { OMPT_STORE_RETURN_ADDRESS(gtid); team = __kmp_team_from_gtid(gtid); - lck = (omp_wait_id_t)&team->t.t_ordered.dt.t_value; + lck = (ompt_wait_id_t)&team->t.t_ordered.dt.t_value; /* OMPT state update */ th->th.ompt_thread_info.wait_id = lck; - th->th.ompt_thread_info.state = omp_state_wait_ordered; + th->th.ompt_thread_info.state = ompt_state_wait_ordered; /* OMPT event callback */ codeptr_ra = OMPT_LOAD_RETURN_ADDRESS(gtid); if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_ordered, omp_lock_hint_none, kmp_mutex_impl_spin, - (omp_wait_id_t)lck, codeptr_ra); + (ompt_wait_id_t)lck, codeptr_ra); } } #endif @@ -871,13 +871,13 @@ #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { /* OMPT state update */ - th->th.ompt_thread_info.state = omp_state_work_parallel; + th->th.ompt_thread_info.state = ompt_state_work_parallel; th->th.ompt_thread_info.wait_id = 0; /* OMPT event callback */ if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_ordered, (omp_wait_id_t)lck, codeptr_ra); + ompt_mutex_ordered, (ompt_wait_id_t)lck, codeptr_ra); } } #endif @@ -917,7 +917,7 @@ if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( ompt_mutex_ordered, - (omp_wait_id_t)&__kmp_team_from_gtid(gtid)->t.t_ordered.dt.t_value, + (ompt_wait_id_t)&__kmp_team_from_gtid(gtid)->t.t_ordered.dt.t_value, OMPT_LOAD_RETURN_ADDRESS(gtid)); } #endif @@ -1144,7 +1144,7 @@ #else KMP_COUNT_BLOCK(OMP_CRITICAL); #if OMPT_SUPPORT && OMPT_OPTIONAL - omp_state_t prev_state = omp_state_undefined; + ompt_state_t prev_state = ompt_state_undefined; ompt_thread_info_t ti; #endif kmp_user_lock_p lck; @@ -1188,15 +1188,15 @@ ti = __kmp_threads[global_tid]->th.ompt_thread_info; /* OMPT state update */ prev_state = ti.state; - ti.wait_id = (omp_wait_id_t)lck; - ti.state = omp_state_wait_critical; + ti.wait_id = (ompt_wait_id_t)lck; + ti.state = ompt_state_wait_critical; /* OMPT event callback */ codeptr_ra = OMPT_LOAD_RETURN_ADDRESS(gtid); if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_critical, omp_lock_hint_none, __ompt_get_mutex_impl_type(), - (omp_wait_id_t)crit, codeptr_ra); + (ompt_wait_id_t)crit, codeptr_ra); } } #endif @@ -1216,7 +1216,7 @@ /* OMPT event callback */ if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_critical, (omp_wait_id_t)crit, codeptr_ra); + ompt_mutex_critical, (ompt_wait_id_t)crit, codeptr_ra); } } #endif @@ -1363,7 +1363,7 @@ KMP_COUNT_BLOCK(OMP_CRITICAL); kmp_user_lock_p lck; #if OMPT_SUPPORT && OMPT_OPTIONAL - omp_state_t prev_state = omp_state_undefined; + ompt_state_t prev_state = ompt_state_undefined; ompt_thread_info_t ti; // This is the case, if called from __kmpc_critical: void *codeptr = OMPT_LOAD_RETURN_ADDRESS(global_tid); @@ -1402,14 +1402,14 @@ ti = __kmp_threads[global_tid]->th.ompt_thread_info; /* OMPT state update */ prev_state = ti.state; - ti.wait_id = (omp_wait_id_t)lck; - ti.state = omp_state_wait_critical; + ti.wait_id = (ompt_wait_id_t)lck; + ti.state = ompt_state_wait_critical; /* OMPT event callback */ if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_critical, (unsigned int)hint, - __ompt_get_mutex_impl_type(crit), (omp_wait_id_t)crit, codeptr); + __ompt_get_mutex_impl_type(crit), (ompt_wait_id_t)crit, codeptr); } } #endif @@ -1440,14 +1440,14 @@ ti = __kmp_threads[global_tid]->th.ompt_thread_info; /* OMPT state update */ prev_state = ti.state; - ti.wait_id = (omp_wait_id_t)lck; - ti.state = omp_state_wait_critical; + ti.wait_id = (ompt_wait_id_t)lck; + ti.state = ompt_state_wait_critical; /* OMPT event callback */ if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_critical, (unsigned int)hint, - __ompt_get_mutex_impl_type(0, ilk), (omp_wait_id_t)crit, codeptr); + __ompt_get_mutex_impl_type(0, ilk), (ompt_wait_id_t)crit, codeptr); } } #endif @@ -1467,7 +1467,7 @@ /* OMPT event callback */ if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_critical, (omp_wait_id_t)crit, codeptr); + ompt_mutex_critical, (ompt_wait_id_t)crit, codeptr); } } #endif @@ -1565,7 +1565,7 @@ OMPT_STORE_RETURN_ADDRESS(global_tid); if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_critical, (omp_wait_id_t)crit, OMPT_LOAD_RETURN_ADDRESS(0)); + ompt_mutex_critical, (ompt_wait_id_t)crit, OMPT_LOAD_RETURN_ADDRESS(0)); } #endif @@ -1594,11 +1594,11 @@ __kmp_check_barrier(global_tid, ct_barrier, loc); #if OMPT_SUPPORT - omp_frame_t *ompt_frame; + ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->enter_frame == NULL) - ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame.ptr == NULL) + ompt_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(global_tid); } #endif @@ -1608,7 +1608,7 @@ status = __kmp_barrier(bs_plain_barrier, global_tid, TRUE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->enter_frame = NULL; + ompt_frame->enter_frame = ompt_data_none; } #endif @@ -1656,11 +1656,11 @@ } #if OMPT_SUPPORT - omp_frame_t *ompt_frame; + ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->enter_frame == NULL) - ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame.ptr == NULL) + ompt_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(global_tid); } #endif @@ -1670,7 +1670,7 @@ __kmp_barrier(bs_plain_barrier, global_tid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->enter_frame = NULL; + ompt_frame->enter_frame = ompt_data_none; } #endif @@ -2006,11 +2006,11 @@ *data_ptr = cpy_data; #if OMPT_SUPPORT - omp_frame_t *ompt_frame; + ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->enter_frame == NULL) - ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame.ptr == NULL) + ompt_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(gtid); } #endif @@ -2038,7 +2038,7 @@ __kmp_barrier(bs_plain_barrier, gtid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->enter_frame = NULL; + ompt_frame->enter_frame = ompt_data_none; } #endif } @@ -2136,7 +2136,7 @@ if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_lock, (omp_lock_hint_t)hint, - __ompt_get_mutex_impl_type(user_lock), (omp_wait_id_t)user_lock, + __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, codeptr); } #endif @@ -2160,7 +2160,7 @@ if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_nest_lock, (omp_lock_hint_t)hint, - __ompt_get_mutex_impl_type(user_lock), (omp_wait_id_t)user_lock, + __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, codeptr); } #endif @@ -2186,7 +2186,7 @@ if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (omp_wait_id_t)user_lock, + __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, codeptr); } #endif @@ -2229,7 +2229,7 @@ if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_lock, omp_lock_hint_none, __ompt_get_mutex_impl_type(), - (omp_wait_id_t)user_lock, codeptr); + (ompt_wait_id_t)user_lock, codeptr); } #endif @@ -2258,7 +2258,7 @@ if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_nest_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (omp_wait_id_t)user_lock, + __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, codeptr); } #endif @@ -2304,7 +2304,7 @@ if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_nest_lock, omp_lock_hint_none, __ompt_get_mutex_impl_type(), - (omp_wait_id_t)user_lock, codeptr); + (ompt_wait_id_t)user_lock, codeptr); } #endif @@ -2340,7 +2340,7 @@ lck = (kmp_user_lock_p)user_lock; } ompt_callbacks.ompt_callback(ompt_callback_lock_destroy)( - ompt_mutex_lock, (omp_wait_id_t)user_lock, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr); } #endif KMP_D_LOCK_FUNC(user_lock, destroy)((kmp_dyna_lock_t *)user_lock); @@ -2368,7 +2368,7 @@ codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_lock_destroy) { ompt_callbacks.ompt_callback(ompt_callback_lock_destroy)( - ompt_mutex_lock, (omp_wait_id_t)user_lock, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr); } #endif @@ -2408,7 +2408,7 @@ codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_lock_destroy) { ompt_callbacks.ompt_callback(ompt_callback_lock_destroy)( - ompt_mutex_nest_lock, (omp_wait_id_t)user_lock, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr); } #endif KMP_D_LOCK_FUNC(user_lock, destroy)((kmp_dyna_lock_t *)user_lock); @@ -2440,7 +2440,7 @@ codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_lock_destroy) { ompt_callbacks.ompt_callback(ompt_callback_lock_destroy)( - ompt_mutex_nest_lock, (omp_wait_id_t)user_lock, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr); } #endif @@ -2485,7 +2485,7 @@ if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (omp_wait_id_t)user_lock, + __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, codeptr); } #endif @@ -2507,7 +2507,7 @@ #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_lock, (omp_wait_id_t)user_lock, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr); } #endif @@ -2540,7 +2540,7 @@ if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_lock, omp_lock_hint_none, __ompt_get_mutex_impl_type(), - (omp_wait_id_t)lck, codeptr); + (ompt_wait_id_t)lck, codeptr); } #endif @@ -2553,7 +2553,7 @@ #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_lock, (omp_wait_id_t)lck, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)lck, codeptr); } #endif @@ -2575,7 +2575,7 @@ if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_nest_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (omp_wait_id_t)user_lock, + __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, codeptr); } } @@ -2593,13 +2593,13 @@ if (ompt_enabled.ompt_callback_mutex_acquired) { // lock_first ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_nest_lock, (omp_wait_id_t)user_lock, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr); } } else { if (ompt_enabled.ompt_callback_nest_lock) { // lock_next ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_scope_begin, (omp_wait_id_t)user_lock, codeptr); + ompt_scope_begin, (ompt_wait_id_t)user_lock, codeptr); } } } @@ -2637,7 +2637,7 @@ if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_nest_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(), (omp_wait_id_t)lck, codeptr); + __ompt_get_mutex_impl_type(), (ompt_wait_id_t)lck, codeptr); } } #endif @@ -2654,13 +2654,13 @@ if (ompt_enabled.ompt_callback_mutex_acquired) { // lock_first ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_nest_lock, (omp_wait_id_t)lck, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)lck, codeptr); } } else { if (ompt_enabled.ompt_callback_nest_lock) { // lock_next ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_scope_begin, (omp_wait_id_t)lck, codeptr); + ompt_scope_begin, (ompt_wait_id_t)lck, codeptr); } } } @@ -2696,7 +2696,7 @@ codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_lock, (omp_wait_id_t)user_lock, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr); } #endif @@ -2725,7 +2725,7 @@ codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_lock, (omp_wait_id_t)lck, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)lck, codeptr); } #endif @@ -2757,7 +2757,7 @@ codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_lock, (omp_wait_id_t)lck, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)lck, codeptr); } #endif @@ -2785,12 +2785,12 @@ if (ompt_enabled.ompt_callback_mutex_released) { // release_lock_last ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_nest_lock, (omp_wait_id_t)user_lock, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr); } } else if (ompt_enabled.ompt_callback_nest_lock) { // release_lock_prev ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_scope_end, (omp_wait_id_t)user_lock, codeptr); + ompt_scope_end, (ompt_wait_id_t)user_lock, codeptr); } } #endif @@ -2834,12 +2834,12 @@ if (ompt_enabled.ompt_callback_mutex_released) { // release_lock_last ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_nest_lock, (omp_wait_id_t)lck, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)lck, codeptr); } } else if (ompt_enabled.ompt_callback_nest_lock) { // release_lock_previous ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_mutex_scope_end, (omp_wait_id_t)lck, codeptr); + ompt_mutex_scope_end, (ompt_wait_id_t)lck, codeptr); } } #endif @@ -2876,12 +2876,12 @@ if (ompt_enabled.ompt_callback_mutex_released) { // release_lock_last ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_nest_lock, (omp_wait_id_t)lck, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)lck, codeptr); } } else if (ompt_enabled.ompt_callback_nest_lock) { // release_lock_previous ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_mutex_scope_end, (omp_wait_id_t)lck, codeptr); + ompt_mutex_scope_end, (ompt_wait_id_t)lck, codeptr); } } #endif @@ -2907,7 +2907,7 @@ if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (omp_wait_id_t)user_lock, + __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, codeptr); } #endif @@ -2930,7 +2930,7 @@ #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_lock, (omp_wait_id_t)user_lock, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr); } #endif return FTN_TRUE; @@ -2971,7 +2971,7 @@ if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_lock, omp_lock_hint_none, __ompt_get_mutex_impl_type(), - (omp_wait_id_t)lck, codeptr); + (ompt_wait_id_t)lck, codeptr); } #endif @@ -2986,7 +2986,7 @@ #if OMPT_SUPPORT && OMPT_OPTIONAL if (rc && ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_lock, (omp_wait_id_t)lck, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)lck, codeptr); } #endif @@ -3012,7 +3012,7 @@ if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_nest_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (omp_wait_id_t)user_lock, + __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, codeptr); } #endif @@ -3030,13 +3030,13 @@ if (ompt_enabled.ompt_callback_mutex_acquired) { // lock_first ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_nest_lock, (omp_wait_id_t)user_lock, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr); } } else { if (ompt_enabled.ompt_callback_nest_lock) { // lock_next ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_scope_begin, (omp_wait_id_t)user_lock, codeptr); + ompt_scope_begin, (ompt_wait_id_t)user_lock, codeptr); } } } @@ -3077,7 +3077,7 @@ ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_nest_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(), (omp_wait_id_t)lck, codeptr); + __ompt_get_mutex_impl_type(), (ompt_wait_id_t)lck, codeptr); } #endif @@ -3095,13 +3095,13 @@ if (ompt_enabled.ompt_callback_mutex_acquired) { // lock_first ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_nest_lock, (omp_wait_id_t)lck, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)lck, codeptr); } } else { if (ompt_enabled.ompt_callback_nest_lock) { // lock_next ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_mutex_scope_begin, (omp_wait_id_t)lck, codeptr); + ompt_mutex_scope_begin, (ompt_wait_id_t)lck, codeptr); } } } @@ -3392,11 +3392,11 @@ // JP: as long as there is a barrier in the implementation, OMPT should and // will provide the barrier events // so we set-up the necessary frame/return addresses. - omp_frame_t *ompt_frame; + ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->enter_frame == NULL) - ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame.ptr == NULL) + ompt_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(global_tid); } #endif @@ -3409,7 +3409,7 @@ retval = (retval != 0) ? (0) : (1); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->enter_frame = NULL; + ompt_frame->enter_frame = ompt_data_none; } #endif @@ -3573,11 +3573,11 @@ // this barrier should be visible to a customer and to the threading profile // tool (it's a terminating barrier on constructs if NOWAIT not specified) #if OMPT_SUPPORT - omp_frame_t *ompt_frame; + ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->enter_frame == NULL) - ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame.ptr == NULL) + ompt_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(global_tid); } #endif @@ -3591,7 +3591,7 @@ retval = (retval != 0) ? (0) : (1); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->enter_frame = NULL; + ompt_frame->enter_frame = ompt_data_none; } #endif @@ -3659,11 +3659,11 @@ // TODO: implicit barrier: should be exposed #if OMPT_SUPPORT - omp_frame_t *ompt_frame; + ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->enter_frame == NULL) - ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame.ptr == NULL) + ompt_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(global_tid); } #endif @@ -3673,7 +3673,7 @@ __kmp_barrier(bs_plain_barrier, global_tid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->enter_frame = NULL; + ompt_frame->enter_frame = ompt_data_none; } #endif @@ -3683,11 +3683,11 @@ // TODO: implicit barrier: should be exposed #if OMPT_SUPPORT - omp_frame_t *ompt_frame; + ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->enter_frame == NULL) - ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame.ptr == NULL) + ompt_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(global_tid); } #endif @@ -3697,18 +3697,18 @@ __kmp_barrier(bs_plain_barrier, global_tid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->enter_frame = NULL; + ompt_frame->enter_frame = ompt_data_none; } #endif } else if (packed_reduction_method == atomic_reduce_block) { #if OMPT_SUPPORT - omp_frame_t *ompt_frame; + ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->enter_frame == NULL) - ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame.ptr == NULL) + ompt_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(global_tid); } #endif @@ -3719,7 +3719,7 @@ __kmp_barrier(bs_plain_barrier, global_tid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->enter_frame = NULL; + ompt_frame->enter_frame = ompt_data_none; } #endif Index: runtime/src/kmp_ftn_entry.h =================================================================== --- runtime/src/kmp_ftn_entry.h +++ runtime/src/kmp_ftn_entry.h @@ -355,9 +355,9 @@ } kmp_info_t *this_thr = __kmp_threads[__kmp_entry_gtid()]; ompt_task_info_t *parent_task_info = OMPT_CUR_TASK_INFO(this_thr); - parent_task_info->frame.enter_frame = OMPT_GET_FRAME_ADDRESS(1); + parent_task_info->frame.enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); int ret = __kmp_control_tool(command, modifier, arg); - parent_task_info->frame.enter_frame = 0; + parent_task_info->frame.enter_frame.ptr = 0; return ret; #endif } Index: runtime/src/kmp_gsupport.cpp =================================================================== --- runtime/src/kmp_gsupport.cpp +++ runtime/src/kmp_gsupport.cpp @@ -32,17 +32,17 @@ MKLOC(loc, "GOMP_barrier"); KA_TRACE(20, ("GOMP_barrier: T#%d\n", gtid)); #if OMPT_SUPPORT && OMPT_OPTIONAL - omp_frame_t *ompt_frame; + ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); + ompt_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(gtid); } #endif __kmpc_barrier(&loc, gtid); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->enter_frame = NULL; + ompt_frame->enter_frame = ompt_data_none; } #endif } @@ -178,10 +178,10 @@ // and for all other threads to reach this point. #if OMPT_SUPPORT && OMPT_OPTIONAL - omp_frame_t *ompt_frame; + ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); + ompt_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(gtid); } #endif @@ -198,7 +198,7 @@ __kmp_barrier(bs_plain_barrier, gtid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->enter_frame = NULL; + ompt_frame->enter_frame = ompt_data_none; } #endif return retval; @@ -214,10 +214,10 @@ // propagated to all threads before trying to reuse the t_copypriv_data field. __kmp_team_from_gtid(gtid)->t.t_copypriv_data = data; #if OMPT_SUPPORT && OMPT_OPTIONAL - omp_frame_t *ompt_frame; + ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); + ompt_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(gtid); } #endif @@ -230,7 +230,7 @@ __kmp_barrier(bs_plain_barrier, gtid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->enter_frame = NULL; + ompt_frame->enter_frame = ompt_data_none; } #endif } @@ -284,8 +284,8 @@ void *data) { #if OMPT_SUPPORT kmp_info_t *thr; - omp_frame_t *ompt_frame; - omp_state_t enclosing_state; + ompt_frame_t *ompt_frame; + ompt_state_t enclosing_state; if (ompt_enabled.enabled) { // get pointer to thread data structure @@ -293,11 +293,11 @@ // save enclosing task state; set current state for task enclosing_state = thr->th.ompt_thread_info.state; - thr->th.ompt_thread_info.state = omp_state_work_parallel; + thr->th.ompt_thread_info.state = ompt_state_work_parallel; // set task frame __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - ompt_frame->exit_frame = OMPT_GET_FRAME_ADDRESS(0); + ompt_frame->exit_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); } #endif @@ -306,7 +306,7 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { // clear task frame - ompt_frame->exit_frame = NULL; + ompt_frame->exit_frame = ompt_data_none; // restore enclosing state thr->th.ompt_thread_info.state = enclosing_state; @@ -331,18 +331,18 @@ #if OMPT_SUPPORT kmp_info_t *thr; - omp_frame_t *ompt_frame; - omp_state_t enclosing_state; + ompt_frame_t *ompt_frame; + ompt_state_t enclosing_state; if (ompt_enabled.enabled) { thr = __kmp_threads[*gtid]; // save enclosing task state; set current state for task enclosing_state = thr->th.ompt_thread_info.state; - thr->th.ompt_thread_info.state = omp_state_work_parallel; + thr->th.ompt_thread_info.state = ompt_state_work_parallel; // set task frame __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - ompt_frame->exit_frame = OMPT_GET_FRAME_ADDRESS(0); + ompt_frame->exit_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); } #endif @@ -352,7 +352,7 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { // clear task frame - ompt_frame->exit_frame = NULL; + ompt_frame->exit_frame = ompt_data_none; // reset enclosing state thr->th.ompt_thread_info.state = enclosing_state; @@ -403,7 +403,7 @@ &(task_info->task_data), ompt_team_size, __kmp_tid_from_gtid(gtid)); task_info->thread_num = __kmp_tid_from_gtid(gtid); } - thr->th.ompt_thread_info.state = omp_state_work_parallel; + thr->th.ompt_thread_info.state = ompt_state_work_parallel; } #endif } @@ -422,11 +422,11 @@ int gtid = __kmp_entry_gtid(); #if OMPT_SUPPORT - omp_frame_t *parent_frame, *frame; + ompt_frame_t *parent_frame, *frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &parent_frame, NULL, NULL); - parent_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); + parent_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(gtid); } #endif @@ -448,7 +448,7 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &frame, NULL, NULL); - frame->exit_frame = OMPT_GET_FRAME_ADDRESS(1); + frame->exit_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); } #endif } @@ -471,7 +471,7 @@ // Implicit task is finished here, in the barrier we might schedule // deferred tasks, // these don't see the implicit task on the stack - OMPT_CUR_TASK_INFO(thr)->frame.exit_frame = NULL; + OMPT_CUR_TASK_INFO(thr)->frame.exit_frame = ompt_data_none; } #endif @@ -764,17 +764,17 @@ KA_TRACE(20, ("GOMP_loop_end: T#%d\n", gtid)) #if OMPT_SUPPORT && OMPT_OPTIONAL - omp_frame_t *ompt_frame; + ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); + ompt_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(gtid); } #endif __kmp_barrier(bs_plain_barrier, gtid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->enter_frame = NULL; + ompt_frame->enter_frame = ompt_data_none; } #endif @@ -1075,16 +1075,16 @@ #if OMPT_SUPPORT && OMPT_OPTIONAL #define OMPT_LOOP_PRE() \ - omp_frame_t *parent_frame; \ + ompt_frame_t *parent_frame; \ if (ompt_enabled.enabled) { \ __ompt_get_task_info_internal(0, NULL, NULL, &parent_frame, NULL, NULL); \ - parent_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); \ + parent_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); \ OMPT_STORE_RETURN_ADDRESS(gtid); \ } #define OMPT_LOOP_POST() \ if (ompt_enabled.enabled) { \ - parent_frame->enter_frame = NULL; \ + parent_frame->enter_frame = ompt_data_none; \ } #else @@ -1164,7 +1164,7 @@ if (ompt_enabled.enabled) { OMPT_STORE_RETURN_ADDRESS(gtid); current_task = __kmp_threads[gtid]->th.th_current_task; - current_task->ompt_task_info.frame.enter_frame = OMPT_GET_FRAME_ADDRESS(1); + current_task->ompt_task_info.frame.enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); } #endif @@ -1198,8 +1198,8 @@ taskdata = KMP_TASK_TO_TASKDATA(task); oldInfo = thread->th.ompt_thread_info; thread->th.ompt_thread_info.wait_id = 0; - thread->th.ompt_thread_info.state = omp_state_work_parallel; - taskdata->ompt_task_info.frame.exit_frame = OMPT_GET_FRAME_ADDRESS(0); + thread->th.ompt_thread_info.state = ompt_state_work_parallel; + taskdata->ompt_task_info.frame.exit_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(gtid); } #endif @@ -1211,13 +1211,13 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { thread->th.ompt_thread_info = oldInfo; - taskdata->ompt_task_info.frame.exit_frame = NULL; + taskdata->ompt_task_info.frame.exit_frame = ompt_data_none; } #endif } #if OMPT_SUPPORT if (ompt_enabled.enabled) { - current_task->ompt_task_info.frame.enter_frame = NULL; + current_task->ompt_task_info.frame.enter_frame = ompt_data_none; } #endif @@ -1302,11 +1302,11 @@ int gtid = __kmp_entry_gtid(); #if OMPT_SUPPORT - omp_frame_t *parent_frame; + ompt_frame_t *parent_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &parent_frame, NULL, NULL); - parent_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); + parent_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(gtid); } #endif @@ -1328,7 +1328,7 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { - parent_frame->enter_frame = NULL; + parent_frame->enter_frame = ompt_data_none; } #endif @@ -1342,17 +1342,17 @@ KA_TRACE(20, ("GOMP_sections_end: T#%d\n", gtid)) #if OMPT_SUPPORT - omp_frame_t *ompt_frame; + ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); + ompt_frame->enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(gtid); } #endif __kmp_barrier(bs_plain_barrier, gtid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT if (ompt_enabled.enabled) { - ompt_frame->enter_frame = NULL; + ompt_frame->enter_frame = ompt_data_none; } #endif @@ -1383,7 +1383,7 @@ ompt_task_info_t *parent_task_info, *task_info; if (ompt_enabled.enabled) { parent_task_info = __ompt_get_task_info_object(0); - parent_task_info->frame.enter_frame = OMPT_GET_FRAME_ADDRESS(1); + parent_task_info->frame.enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(gtid); } #endif @@ -1403,7 +1403,7 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { task_info = __ompt_get_task_info_object(0); - task_info->frame.exit_frame = OMPT_GET_FRAME_ADDRESS(0); + task_info->frame.exit_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); } #endif task(data); @@ -1415,8 +1415,8 @@ KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_END)(); #if OMPT_SUPPORT if (ompt_enabled.enabled) { - task_info->frame.exit_frame = NULL; - parent_task_info->frame.enter_frame = NULL; + task_info->frame.exit_frame = ompt_data_none; + parent_task_info->frame.enter_frame = ompt_data_none; } #endif } Index: runtime/src/kmp_lock.cpp =================================================================== --- runtime/src/kmp_lock.cpp +++ runtime/src/kmp_lock.cpp @@ -1108,7 +1108,7 @@ kmp_int32 need_mf = 1; #if OMPT_SUPPORT - omp_state_t prev_state = omp_state_undefined; + ompt_state_t prev_state = ompt_state_undefined; #endif KA_TRACE(1000, @@ -1216,7 +1216,7 @@ #endif #if OMPT_SUPPORT - if (ompt_enabled.enabled && prev_state != omp_state_undefined) { + if (ompt_enabled.enabled && prev_state != ompt_state_undefined) { /* change the state before clearing wait_id */ this_thr->th.ompt_thread_info.state = prev_state; this_thr->th.ompt_thread_info.wait_id = 0; @@ -1231,11 +1231,11 @@ } #if OMPT_SUPPORT - if (ompt_enabled.enabled && prev_state == omp_state_undefined) { + if (ompt_enabled.enabled && prev_state == ompt_state_undefined) { /* this thread will spin; set wait_id before entering wait state */ prev_state = this_thr->th.ompt_thread_info.state; this_thr->th.ompt_thread_info.wait_id = (uint64_t)lck; - this_thr->th.ompt_thread_info.state = omp_state_wait_lock; + this_thr->th.ompt_thread_info.state = ompt_state_wait_lock; } #endif Index: runtime/src/kmp_runtime.cpp =================================================================== --- runtime/src/kmp_runtime.cpp +++ runtime/src/kmp_runtime.cpp @@ -1213,12 +1213,12 @@ ompt_data_t *implicit_task_data; void *codeptr = OMPT_LOAD_RETURN_ADDRESS(global_tid); if (ompt_enabled.enabled && - this_thr->th.ompt_thread_info.state != omp_state_overhead) { + this_thr->th.ompt_thread_info.state != ompt_state_overhead) { ompt_task_info_t *parent_task_info; parent_task_info = OMPT_CUR_TASK_INFO(this_thr); - parent_task_info->frame.enter_frame = OMPT_GET_FRAME_ADDRESS(1); + parent_task_info->frame.enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); if (ompt_enabled.ompt_callback_parallel_begin) { int team_size = 1; @@ -1387,8 +1387,8 @@ #if OMPT_SUPPORT serial_team->t.ompt_team_info.master_return_address = codeptr; if (ompt_enabled.enabled && - this_thr->th.ompt_thread_info.state != omp_state_overhead) { - OMPT_CUR_TASK_INFO(this_thr)->frame.exit_frame = OMPT_GET_FRAME_ADDRESS(1); + this_thr->th.ompt_thread_info.state != ompt_state_overhead) { + OMPT_CUR_TASK_INFO(this_thr)->frame.exit_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); ompt_lw_taskteam_t lw_taskteam; __ompt_lw_taskteam_init(&lw_taskteam, this_thr, global_tid, @@ -1408,8 +1408,8 @@ } /* OMPT state */ - this_thr->th.ompt_thread_info.state = omp_state_work_parallel; - OMPT_CUR_TASK_INFO(this_thr)->frame.exit_frame = OMPT_GET_FRAME_ADDRESS(1); + this_thr->th.ompt_thread_info.state = ompt_state_work_parallel; + OMPT_CUR_TASK_INFO(this_thr)->frame.exit_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); } #endif } @@ -1478,7 +1478,7 @@ #if OMPT_SUPPORT ompt_data_t ompt_parallel_data = ompt_data_none; ompt_data_t *parent_task_data; - omp_frame_t *ompt_frame; + ompt_frame_t *ompt_frame; ompt_data_t *implicit_task_data; void *return_address = NULL; @@ -1518,7 +1518,7 @@ parent_task_data, ompt_frame, &ompt_parallel_data, team_size, OMPT_INVOKER(call_context), return_address); } - master_th->th.ompt_thread_info.state = omp_state_overhead; + master_th->th.ompt_thread_info.state = ompt_state_overhead; } #endif @@ -1558,7 +1558,7 @@ if (ompt_enabled.enabled) { __ompt_lw_taskteam_init(&lw_taskteam, master_th, gtid, &ompt_parallel_data, return_address); - exit_runtime_p = &(lw_taskteam.ompt_task_info.frame.exit_frame); + exit_runtime_p = &(lw_taskteam.ompt_task_info.frame.exit_frame.ptr); __ompt_lw_taskteam_link(&lw_taskteam, master_th, 0); // don't use lw_taskteam after linking. content was swaped @@ -1574,7 +1574,7 @@ } /* OMPT state */ - master_th->th.ompt_thread_info.state = omp_state_work_parallel; + master_th->th.ompt_thread_info.state = ompt_state_work_parallel; } else { exit_runtime_p = &dummy; } @@ -1594,7 +1594,7 @@ #if OMPT_SUPPORT *exit_runtime_p = NULL; if (ompt_enabled.enabled) { - OMPT_CUR_TASK_INFO(master_th)->frame.exit_frame = NULL; + OMPT_CUR_TASK_INFO(master_th)->frame.exit_frame = ompt_data_none; if (ompt_enabled.ompt_callback_implicit_task) { ompt_callbacks.ompt_callback(ompt_callback_implicit_task)( ompt_scope_end, NULL, implicit_task_data, 1, @@ -1607,7 +1607,7 @@ OMPT_CUR_TEAM_DATA(master_th), OMPT_CUR_TASK_DATA(master_th), OMPT_INVOKER(call_context), return_address); } - master_th->th.ompt_thread_info.state = omp_state_overhead; + master_th->th.ompt_thread_info.state = ompt_state_overhead; } #endif return TRUE; @@ -1776,7 +1776,7 @@ // don't use lw_taskteam after linking. content was swaped task_info = OMPT_CUR_TASK_INFO(master_th); - exit_runtime_p = &(task_info->frame.exit_frame); + exit_runtime_p = &(task_info->frame.exit_frame.ptr); if (ompt_enabled.ompt_callback_implicit_task) { ompt_callbacks.ompt_callback(ompt_callback_implicit_task)( ompt_scope_begin, OMPT_CUR_TEAM_DATA(master_th), @@ -1786,7 +1786,7 @@ } /* OMPT state */ - master_th->th.ompt_thread_info.state = omp_state_work_parallel; + master_th->th.ompt_thread_info.state = ompt_state_work_parallel; } else { exit_runtime_p = &dummy; } @@ -1819,7 +1819,7 @@ OMPT_CUR_TEAM_DATA(master_th), parent_task_data, OMPT_INVOKER(call_context), return_address); } - master_th->th.ompt_thread_info.state = omp_state_overhead; + master_th->th.ompt_thread_info.state = ompt_state_overhead; } #endif } else if (microtask == (microtask_t)__kmp_teams_master) { @@ -1874,7 +1874,7 @@ __ompt_lw_taskteam_link(&lw_taskteam, master_th, 0); // don't use lw_taskteam after linking. content was swaped task_info = OMPT_CUR_TASK_INFO(master_th); - exit_runtime_p = &(task_info->frame.exit_frame); + exit_runtime_p = &(task_info->frame.exit_frame.ptr); /* OMPT implicit task begin */ implicit_task_data = OMPT_CUR_TASK_DATA(master_th); @@ -1887,7 +1887,7 @@ } /* OMPT state */ - master_th->th.ompt_thread_info.state = omp_state_work_parallel; + master_th->th.ompt_thread_info.state = ompt_state_work_parallel; } else { exit_runtime_p = &dummy; } @@ -1920,7 +1920,7 @@ &ompt_parallel_data, parent_task_data, OMPT_INVOKER(call_context), return_address); } - master_th->th.ompt_thread_info.state = omp_state_overhead; + master_th->th.ompt_thread_info.state = ompt_state_overhead; } #endif #if OMP_40_ENABLED @@ -1932,7 +1932,7 @@ __ompt_lw_taskteam_init(&lwt, master_th, gtid, &ompt_parallel_data, return_address); - lwt.ompt_task_info.frame.exit_frame = NULL; + lwt.ompt_task_info.frame.exit_frame = ompt_data_none; __ompt_lw_taskteam_link(&lwt, master_th, 1); // don't use lw_taskteam after linking. content was swaped #endif @@ -2196,7 +2196,7 @@ &master_th->th.th_current_task->td_icvs, loc); #if OMPT_SUPPORT - master_th->th.ompt_thread_info.state = omp_state_work_parallel; + master_th->th.ompt_thread_info.state = ompt_state_work_parallel; #endif __kmp_release_bootstrap_lock(&__kmp_forkjoin_lock); @@ -2277,7 +2277,7 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { - master_th->th.ompt_thread_info.state = omp_state_overhead; + master_th->th.ompt_thread_info.state = ompt_state_overhead; } #endif @@ -2289,8 +2289,8 @@ kmp_team_t *team) { // restore state outside the region thread->th.ompt_thread_info.state = - ((team->t.t_serialized) ? omp_state_work_serial - : omp_state_work_parallel); + ((team->t.t_serialized) ? ompt_state_work_serial + : ompt_state_work_parallel); } static inline void __kmp_join_ompt(int gtid, kmp_info_t *thread, @@ -2303,7 +2303,7 @@ codeptr); } - task_info->frame.enter_frame = NULL; + task_info->frame.enter_frame = ompt_data_none; __kmp_join_restore_state(thread, team); } #endif @@ -2338,7 +2338,7 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { - master_th->th.ompt_thread_info.state = omp_state_overhead; + master_th->th.ompt_thread_info.state = ompt_state_overhead; } #endif @@ -2517,7 +2517,7 @@ OMPT_CUR_TASK_INFO(master_th)->thread_num); } - task_info->frame.exit_frame = NULL; + task_info->frame.exit_frame = ompt_data_none; task_info->task_data = ompt_data_none; } #endif @@ -3828,7 +3828,7 @@ kmp_info_t *root_thread = ompt_get_thread(); - ompt_set_thread_state(root_thread, omp_state_overhead); + ompt_set_thread_state(root_thread, ompt_state_overhead); if (ompt_enabled.ompt_callback_thread_begin) { ompt_callbacks.ompt_callback(ompt_callback_thread_begin)( @@ -3842,7 +3842,7 @@ // initial task has nothing to return to } - ompt_set_thread_state(root_thread, omp_state_work_serial); + ompt_set_thread_state(root_thread, ompt_state_work_serial); } #endif @@ -3981,7 +3981,7 @@ if (task_team != NULL && task_team->tt.tt_found_proxy_tasks) { #if OMPT_SUPPORT // the runtime is shutting down so we won't report any events - thread->th.ompt_thread_info.state = omp_state_undefined; + thread->th.ompt_thread_info.state = ompt_state_undefined; #endif __kmp_task_team_wait(thread, team USE_ITT_BUILD_ARG(NULL)); } @@ -5604,7 +5604,7 @@ thread_data = &(this_thr->th.ompt_thread_info.thread_data); *thread_data = ompt_data_none; - this_thr->th.ompt_thread_info.state = omp_state_overhead; + this_thr->th.ompt_thread_info.state = ompt_state_overhead; this_thr->th.ompt_thread_info.wait_id = 0; this_thr->th.ompt_thread_info.idle_frame = OMPT_GET_FRAME_ADDRESS(0); if (ompt_enabled.ompt_callback_thread_begin) { @@ -5616,7 +5616,7 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { - this_thr->th.ompt_thread_info.state = omp_state_idle; + this_thr->th.ompt_thread_info.state = ompt_state_idle; } #endif /* This is the place where threads wait for work */ @@ -5632,7 +5632,7 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { - this_thr->th.ompt_thread_info.state = omp_state_overhead; + this_thr->th.ompt_thread_info.state = ompt_state_overhead; } #endif @@ -5652,7 +5652,7 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { - this_thr->th.ompt_thread_info.state = omp_state_work_parallel; + this_thr->th.ompt_thread_info.state = ompt_state_work_parallel; } #endif @@ -5667,9 +5667,9 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { /* no frame set while outside task */ - __ompt_get_task_info_object(0)->frame.exit_frame = NULL; + __ompt_get_task_info_object(0)->frame.exit_frame = ompt_data_none; - this_thr->th.ompt_thread_info.state = omp_state_overhead; + this_thr->th.ompt_thread_info.state = ompt_state_overhead; } #endif /* join barrier after parallel region */ @@ -6963,7 +6963,7 @@ if (ompt_enabled.enabled) { exit_runtime_p = &( - team->t.t_implicit_task_taskdata[tid].ompt_task_info.frame.exit_frame); + team->t.t_implicit_task_taskdata[tid].ompt_task_info.frame.exit_frame.ptr); } else { exit_runtime_p = &dummy; } @@ -7203,10 +7203,10 @@ __kmp_join_barrier(gtid); /* wait for everyone */ #if OMPT_SUPPORT if (ompt_enabled.enabled && - this_thr->th.ompt_thread_info.state == omp_state_wait_barrier_implicit) { + this_thr->th.ompt_thread_info.state == ompt_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; + this_thr->th.ompt_thread_info.state = ompt_state_overhead; #if OMPT_OPTIONAL void *codeptr = NULL; if (KMP_MASTER_TID(ds_tid) && Index: runtime/src/kmp_taskdeps.cpp =================================================================== --- runtime/src/kmp_taskdeps.cpp +++ runtime/src/kmp_taskdeps.cpp @@ -466,9 +466,9 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { OMPT_STORE_RETURN_ADDRESS(gtid); - if (!current_task->ompt_task_info.frame.enter_frame) - current_task->ompt_task_info.frame.enter_frame = - OMPT_GET_FRAME_ADDRESS(1); + if (!current_task->ompt_task_info.frame.enter_frame.ptr) + current_task->ompt_task_info.frame.enter_frame.ptr = + OMPT_GET_FRAME_ADDRESS(0); if (ompt_enabled.ompt_callback_task_create) { ompt_data_t task_data = ompt_data_none; ompt_callbacks.ompt_callback(ompt_callback_task_create)( @@ -479,7 +479,7 @@ OMPT_LOAD_RETURN_ADDRESS(gtid)); } - new_taskdata->ompt_task_info.frame.enter_frame = OMPT_GET_FRAME_ADDRESS(0); + new_taskdata->ompt_task_info.frame.enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); } #if OMPT_OPTIONAL @@ -566,7 +566,7 @@ gtid, loc_ref, new_taskdata)); #if OMPT_SUPPORT if (ompt_enabled.enabled) { - current_task->ompt_task_info.frame.enter_frame = NULL; + current_task->ompt_task_info.frame.enter_frame = ompt_data_none; } #endif return TASK_CURRENT_NOT_QUEUED; @@ -586,7 +586,7 @@ kmp_int32 ret = __kmp_omp_task(gtid, new_task, true); #if OMPT_SUPPORT if (ompt_enabled.enabled) { - current_task->ompt_task_info.frame.enter_frame = NULL; + current_task->ompt_task_info.frame.enter_frame = ompt_data_none; } #endif return ret; Index: runtime/src/kmp_tasking.cpp =================================================================== --- runtime/src/kmp_tasking.cpp +++ runtime/src/kmp_tasking.cpp @@ -547,8 +547,10 @@ static inline void __ompt_task_init(kmp_taskdata_t *task, int tid) { // The calls to __ompt_task_init already have the ompt_enabled condition. task->ompt_task_info.task_data.value = 0; - task->ompt_task_info.frame.exit_frame = NULL; - task->ompt_task_info.frame.enter_frame = NULL; + task->ompt_task_info.frame.exit_frame = ompt_data_none; + task->ompt_task_info.frame.enter_frame = ompt_data_none; + task->ompt_task_info.frame.exit_frame_flags = ompt_frame_runtime | ompt_frame_framepointer; + task->ompt_task_info.frame.enter_frame_flags = ompt_frame_runtime | ompt_frame_framepointer; #if OMP_40_ENABLED task->ompt_task_info.ndeps = 0; task->ompt_task_info.deps = NULL; @@ -627,9 +629,11 @@ #if OMPT_SUPPORT if (ompt) { - if (current_task->ompt_task_info.frame.enter_frame == NULL) { - current_task->ompt_task_info.frame.enter_frame = - taskdata->ompt_task_info.frame.exit_frame = frame_address; + if (current_task->ompt_task_info.frame.enter_frame.ptr == NULL) { + current_task->ompt_task_info.frame.enter_frame.ptr = + taskdata->ompt_task_info.frame.exit_frame.ptr = frame_address; + current_task->ompt_task_info.frame.enter_frame_flags = + taskdata->ompt_task_info.frame.exit_frame_flags = ompt_frame_application | ompt_frame_framepointer; } if (ompt_enabled.ompt_callback_task_create) { ompt_task_info_t *parent_info = &(current_task->ompt_task_info); @@ -964,9 +968,10 @@ #if OMPT_SUPPORT if (ompt) { - omp_frame_t *ompt_frame; + ompt_frame_t *ompt_frame; __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - ompt_frame->enter_frame = NULL; + ompt_frame->enter_frame = ompt_data_none; + ompt_frame->enter_frame_flags = ompt_frame_runtime | ompt_frame_framepointer; } #endif @@ -1460,9 +1465,9 @@ oldInfo = thread->th.ompt_thread_info; thread->th.ompt_thread_info.wait_id = 0; thread->th.ompt_thread_info.state = (thread->th.th_team_serialized) - ? omp_state_work_serial - : omp_state_work_parallel; - taskdata->ompt_task_info.frame.exit_frame = OMPT_GET_FRAME_ADDRESS(0); + ? ompt_state_work_serial + : ompt_state_work_parallel; + taskdata->ompt_task_info.frame.exit_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); } #endif @@ -1588,7 +1593,7 @@ if (UNLIKELY(ompt_enabled.enabled)) { thread->th.ompt_thread_info = oldInfo; if (taskdata->td_flags.tiedness == TASK_TIED) { - taskdata->ompt_task_info.frame.exit_frame = NULL; + taskdata->ompt_task_info.frame.exit_frame = ompt_data_none; } __kmp_task_finish(gtid, task, current_task); } else @@ -1656,7 +1661,7 @@ ANNOTATE_HAPPENS_BEFORE(new_task); #if OMPT_SUPPORT if (UNLIKELY(ompt_enabled.enabled)) { - parent->ompt_task_info.frame.enter_frame = NULL; + parent->ompt_task_info.frame.enter_frame = ompt_data_none; } #endif return TASK_CURRENT_NOT_QUEUED; @@ -1725,8 +1730,8 @@ if (!new_taskdata->td_flags.started) { OMPT_STORE_RETURN_ADDRESS(gtid); parent = new_taskdata->td_parent; - if (!parent->ompt_task_info.frame.enter_frame) { - parent->ompt_task_info.frame.enter_frame = OMPT_GET_FRAME_ADDRESS(1); + if (!parent->ompt_task_info.frame.enter_frame.ptr) { + parent->ompt_task_info.frame.enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); } if (ompt_enabled.ompt_callback_task_create) { ompt_data_t task_data = ompt_data_none; @@ -1743,7 +1748,7 @@ __ompt_task_finish(new_task, new_taskdata->ompt_task_info.scheduling_parent, ompt_task_switch); - new_taskdata->ompt_task_info.frame.exit_frame = NULL; + new_taskdata->ompt_task_info.frame.exit_frame = ompt_data_none; } } #endif @@ -1755,7 +1760,7 @@ gtid, loc_ref, new_taskdata)); #if OMPT_SUPPORT if (UNLIKELY(ompt_enabled.enabled && parent != NULL)) { - parent->ompt_task_info.frame.enter_frame = NULL; + parent->ompt_task_info.frame.enter_frame = ompt_data_none; } #endif return res; @@ -1789,8 +1794,8 @@ kmp_taskdata_t *parent = NULL; if (UNLIKELY(ompt_enabled.enabled && !new_taskdata->td_flags.started)) { parent = new_taskdata->td_parent; - if (!parent->ompt_task_info.frame.enter_frame) - parent->ompt_task_info.frame.enter_frame = OMPT_GET_FRAME_ADDRESS(1); + if (!parent->ompt_task_info.frame.enter_frame.ptr) + parent->ompt_task_info.frame.enter_frame.ptr = OMPT_GET_FRAME_ADDRESS(0); if (ompt_enabled.ompt_callback_task_create) { ompt_data_t task_data = ompt_data_none; ompt_callbacks.ompt_callback(ompt_callback_task_create)( @@ -1810,7 +1815,7 @@ gtid, loc_ref, new_taskdata)); #if OMPT_SUPPORT if (UNLIKELY(ompt_enabled.enabled && parent != NULL)) { - parent->ompt_task_info.frame.enter_frame = NULL; + parent->ompt_task_info.frame.enter_frame = ompt_data_none; } #endif return res; @@ -1839,7 +1844,7 @@ my_task_data = &(taskdata->ompt_task_info.task_data); my_parallel_data = OMPT_CUR_TEAM_DATA(thread); - taskdata->ompt_task_info.frame.enter_frame = frame_address; + taskdata->ompt_task_info.frame.enter_frame.ptr = frame_address; if (ompt_enabled.ompt_callback_sync_region) { ompt_callbacks.ompt_callback(ompt_callback_sync_region)( @@ -1908,7 +1913,7 @@ ompt_sync_region_taskwait, ompt_scope_end, my_parallel_data, my_task_data, return_address); } - taskdata->ompt_task_info.frame.enter_frame = NULL; + taskdata->ompt_task_info.frame.enter_frame = ompt_data_none; } #endif // OMPT_SUPPORT && OMPT_OPTIONAL @@ -1938,7 +1943,7 @@ #if OMPT_SUPPORT && OMPT_OPTIONAL if (UNLIKELY(ompt_enabled.enabled)) { OMPT_STORE_RETURN_ADDRESS(gtid); - return __kmpc_omp_taskwait_ompt(loc_ref, gtid, OMPT_GET_FRAME_ADDRESS(1), + return __kmpc_omp_taskwait_ompt(loc_ref, gtid, OMPT_GET_FRAME_ADDRESS(0), OMPT_LOAD_RETURN_ADDRESS(gtid)); } #endif Index: runtime/src/kmp_wait_release.h =================================================================== --- runtime/src/kmp_wait_release.h +++ runtime/src/kmp_wait_release.h @@ -120,12 +120,12 @@ #if OMPT_SUPPORT static inline void __ompt_implicit_task_end(kmp_info_t *this_thr, - omp_state_t omp_state, + ompt_state_t ompt_state, ompt_data_t *tId, ompt_data_t *pId) { int ds_tid = this_thr->th.th_info.ds.ds_tid; - if (omp_state == omp_state_wait_barrier_implicit) { - this_thr->th.ompt_thread_info.state = omp_state_overhead; + if (ompt_state == ompt_state_wait_barrier_implicit) { + this_thr->th.ompt_thread_info.state = ompt_state_overhead; #if OMPT_OPTIONAL void *codeptr = NULL; if (ompt_enabled.ompt_callback_sync_region_wait) { @@ -143,9 +143,9 @@ ompt_scope_end, NULL, tId, 0, ds_tid); } // return to idle state - this_thr->th.ompt_thread_info.state = omp_state_idle; + this_thr->th.ompt_thread_info.state = ompt_state_idle; } else { - this_thr->th.ompt_thread_info.state = omp_state_overhead; + this_thr->th.ompt_thread_info.state = ompt_state_overhead; } } } @@ -199,27 +199,27 @@ function. Events are triggered in the calling code (__kmp_barrier): - state := omp_state_overhead + state := ompt_state_overhead barrier-begin barrier-wait-begin - state := omp_state_wait_barrier + state := ompt_state_wait_barrier call join-barrier-implementation (finally arrive here) {} call fork-barrier-implementation (finally arrive here) {} - state := omp_state_overhead + state := ompt_state_overhead barrier-wait-end barrier-end - state := omp_state_work_parallel + state := ompt_state_work_parallel __kmp_fork_barrier (after thread creation, before executing implicit task) call fork-barrier-implementation (finally arrive here) - {} // worker arrive here with state = omp_state_idle + {} // worker arrive here with state = ompt_state_idle __kmp_join_barrier (implicit barrier at end of parallel region) - state := omp_state_barrier_implicit + state := ompt_state_barrier_implicit barrier-begin barrier-wait-begin call join-barrier-implementation (finally arrive here @@ -234,19 +234,19 @@ barrier-end implicit-task-end idle-begin - state := omp_state_idle + state := ompt_state_idle - Before leaving, if state = omp_state_idle + Before leaving, if state = ompt_state_idle idle-end - state := omp_state_overhead + state := ompt_state_overhead */ #if OMPT_SUPPORT - omp_state_t ompt_entry_state; + ompt_state_t ompt_entry_state; ompt_data_t *pId = NULL; ompt_data_t *tId; if (ompt_enabled.enabled) { ompt_entry_state = this_thr->th.ompt_thread_info.state; - if (!final_spin || ompt_entry_state != omp_state_wait_barrier_implicit || + if (!final_spin || ompt_entry_state != ompt_state_wait_barrier_implicit || KMP_MASTER_TID(this_thr->th.th_info.ds.ds_tid)) { ompt_lw_taskteam_t *team = this_thr->th.th_team->t.ompt_serialized_team_info; @@ -432,16 +432,16 @@ } #if OMPT_SUPPORT - omp_state_t ompt_exit_state = this_thr->th.ompt_thread_info.state; - if (ompt_enabled.enabled && ompt_exit_state != omp_state_undefined) { + ompt_state_t ompt_exit_state = this_thr->th.ompt_thread_info.state; + if (ompt_enabled.enabled && ompt_exit_state != ompt_state_undefined) { #if OMPT_OPTIONAL if (final_spin) { __ompt_implicit_task_end(this_thr, ompt_exit_state, tId, pId); ompt_exit_state = this_thr->th.ompt_thread_info.state; } #endif - if (ompt_exit_state == omp_state_idle) { - this_thr->th.ompt_thread_info.state = omp_state_overhead; + if (ompt_exit_state == ompt_state_idle) { + this_thr->th.ompt_thread_info.state = ompt_state_overhead; } } #endif Index: runtime/src/ompt-general.cpp =================================================================== --- runtime/src/ompt-general.cpp +++ runtime/src/ompt-general.cpp @@ -52,8 +52,8 @@ typedef struct { const char *state_name; - omp_state_t state_id; -} omp_state_info_t; + ompt_state_t state_id; +} ompt_state_info_t; typedef struct { const char *name; @@ -73,10 +73,10 @@ ompt_callbacks_active_t ompt_enabled; -omp_state_info_t omp_state_info[] = { -#define omp_state_macro(state, code) {#state, state}, - FOREACH_OMP_STATE(omp_state_macro) -#undef omp_state_macro +ompt_state_info_t ompt_state_info[] = { +#define ompt_state_macro(state, code) {#state, state}, + FOREACH_OMPT_STATE(ompt_state_macro) +#undef ompt_state_macro }; kmp_mutex_impl_info_t kmp_mutex_impl_info[] = { @@ -353,7 +353,7 @@ kmp_info_t *root_thread = ompt_get_thread(); - ompt_set_thread_state(root_thread, omp_state_overhead); + ompt_set_thread_state(root_thread, ompt_state_overhead); if (ompt_enabled.ompt_callback_thread_begin) { ompt_callbacks.ompt_callback(ompt_callback_thread_begin)( @@ -366,7 +366,7 @@ NULL, NULL, task_data, ompt_task_initial, 0, NULL); } - ompt_set_thread_state(root_thread, omp_state_work_serial); + ompt_set_thread_state(root_thread, ompt_state_work_serial); } } @@ -388,13 +388,13 @@ OMPT_API_ROUTINE int ompt_enumerate_states(int current_state, int *next_state, const char **next_state_name) { - const static int len = sizeof(omp_state_info) / sizeof(omp_state_info_t); + const static int len = sizeof(ompt_state_info) / sizeof(ompt_state_info_t); int i = 0; for (i = 0; i < len - 1; i++) { - if (omp_state_info[i].state_id == current_state) { - *next_state = omp_state_info[i + 1].state_id; - *next_state_name = omp_state_info[i + 1].state_name; + if (ompt_state_info[i].state_id == current_state) { + *next_state = ompt_state_info[i + 1].state_id; + *next_state_name = ompt_state_info[i + 1].state_name; return 1; } } @@ -482,11 +482,11 @@ team_size); } -OMPT_API_ROUTINE omp_state_t ompt_get_state(omp_wait_id_t *wait_id) { - omp_state_t thread_state = __ompt_get_state_internal(wait_id); +OMPT_API_ROUTINE ompt_state_t ompt_get_state(ompt_wait_id_t *wait_id) { + ompt_state_t thread_state = __ompt_get_state_internal(wait_id); - if (thread_state == omp_state_undefined) { - thread_state = omp_state_work_serial; + if (thread_state == ompt_state_undefined) { + thread_state = ompt_state_work_serial; } return thread_state; @@ -502,7 +502,7 @@ OMPT_API_ROUTINE int ompt_get_task_info(int ancestor_level, int *type, ompt_data_t **task_data, - omp_frame_t **task_frame, + ompt_frame_t **task_frame, ompt_data_t **parallel_data, int *thread_num) { return __ompt_get_task_info_internal(ancestor_level, type, task_data, Index: runtime/src/ompt-internal.h =================================================================== --- runtime/src/ompt-internal.h +++ runtime/src/ompt-internal.h @@ -54,7 +54,7 @@ (info->td_flags.merged_if0 ? ompt_task_mergeable : 0x0) typedef struct { - omp_frame_t frame; + ompt_frame_t frame; ompt_data_t task_data; struct kmp_taskdata *scheduling_parent; int thread_num; @@ -81,8 +81,8 @@ ompt_data_t task_data; /* stored here from implicit barrier-begin until implicit-task-end */ void *return_address; /* stored here on entry of runtime */ - omp_state_t state; - omp_wait_id_t wait_id; + ompt_state_t state; + ompt_wait_id_t wait_id; int ompt_task_yielded; void *idle_frame; } ompt_thread_info_t; Index: runtime/src/ompt-specific.h =================================================================== --- runtime/src/ompt-specific.h +++ runtime/src/ompt-specific.h @@ -41,7 +41,7 @@ int __ompt_get_task_info_internal(int ancestor_level, int *type, ompt_data_t **task_data, - omp_frame_t **task_frame, + ompt_frame_t **task_frame, ompt_data_t **parallel_data, int *thread_num); ompt_data_t *__ompt_get_thread_data_internal(); @@ -93,7 +93,7 @@ return ompt_get_thread_gtid(gtid); } -inline void ompt_set_thread_state(kmp_info_t *thread, omp_state_t state) { +inline void ompt_set_thread_state(kmp_info_t *thread, ompt_state_t state) { thread->th.ompt_thread_info.state = state; } Index: runtime/src/ompt-specific.cpp =================================================================== --- runtime/src/ompt-specific.cpp +++ runtime/src/ompt-specific.cpp @@ -211,10 +211,10 @@ void __ompt_thread_assign_wait_id(void *variable) { kmp_info_t *ti = ompt_get_thread(); - ti->th.ompt_thread_info.wait_id = (omp_wait_id_t)variable; + ti->th.ompt_thread_info.wait_id = (ompt_wait_id_t)variable; } -omp_state_t __ompt_get_state_internal(omp_wait_id_t *omp_wait_id) { +ompt_state_t __ompt_get_state_internal(ompt_wait_id_t *omp_wait_id) { kmp_info_t *ti = ompt_get_thread(); if (ti) { @@ -222,7 +222,7 @@ *omp_wait_id = ti->th.ompt_thread_info.wait_id; return ti->th.ompt_thread_info.state; } - return omp_state_undefined; + return ompt_state_undefined; } //---------------------------------------------------------- @@ -259,8 +259,8 @@ lwt->ompt_team_info.parallel_data = *ompt_pid; lwt->ompt_team_info.master_return_address = codeptr; lwt->ompt_task_info.task_data.value = 0; - lwt->ompt_task_info.frame.enter_frame = NULL; - lwt->ompt_task_info.frame.exit_frame = NULL; + lwt->ompt_task_info.frame.enter_frame = ompt_data_none; + lwt->ompt_task_info.frame.exit_frame = ompt_data_none; lwt->ompt_task_info.scheduling_parent = NULL; lwt->ompt_task_info.deps = NULL; lwt->ompt_task_info.ndeps = 0; @@ -328,7 +328,7 @@ int __ompt_get_task_info_internal(int ancestor_level, int *type, ompt_data_t **task_data, - omp_frame_t **task_frame, + ompt_frame_t **task_frame, ompt_data_t **parallel_data, int *thread_num) { if (__kmp_get_gtid() < 0) Index: runtime/test/ompt/callback.h =================================================================== --- runtime/test/ompt/callback.h +++ runtime/test/ompt/callback.h @@ -79,7 +79,7 @@ static void print_ids(int level) { int task_type, thread_num; - omp_frame_t *frame; + ompt_frame_t *frame; ompt_data_t *task_parallel_data; ompt_data_t *task_data; int exists_task = ompt_get_task_info(level, &task_type, &task_data, &frame, @@ -92,8 +92,8 @@ "task_type=%s=%d, thread_num=%d\n", ompt_get_thread_data()->value, level, exists_task ? task_parallel_data->value : 0, - exists_task ? task_data->value : 0, frame->exit_frame, - frame->enter_frame, buffer, task_type, thread_num); + exists_task ? task_data->value : 0, frame->exit_frame.ptr, + frame->enter_frame.ptr, buffer, task_type, thread_num); } #define get_frame_address(level) __builtin_frame_address(level) @@ -197,7 +197,7 @@ ompt_mutex_t kind, unsigned int hint, unsigned int impl, - omp_wait_id_t wait_id, + ompt_wait_id_t wait_id, const void *codeptr_ra) { switch(kind) @@ -225,7 +225,7 @@ static void on_ompt_callback_mutex_acquired( ompt_mutex_t kind, - omp_wait_id_t wait_id, + ompt_wait_id_t wait_id, const void *codeptr_ra) { switch(kind) @@ -253,7 +253,7 @@ static void on_ompt_callback_mutex_released( ompt_mutex_t kind, - omp_wait_id_t wait_id, + ompt_wait_id_t wait_id, const void *codeptr_ra) { switch(kind) @@ -281,7 +281,7 @@ static void on_ompt_callback_nest_lock( ompt_scope_endpoint_t endpoint, - omp_wait_id_t wait_id, + ompt_wait_id_t wait_id, const void *codeptr_ra) { switch(endpoint) @@ -460,7 +460,7 @@ ompt_mutex_t kind, unsigned int hint, unsigned int impl, - omp_wait_id_t wait_id, + ompt_wait_id_t wait_id, const void *codeptr_ra) { switch(kind) @@ -479,7 +479,7 @@ static void on_ompt_callback_lock_destroy( ompt_mutex_t kind, - omp_wait_id_t wait_id, + ompt_wait_id_t wait_id, const void *codeptr_ra) { switch(kind) @@ -583,7 +583,7 @@ static void on_ompt_callback_parallel_begin( ompt_data_t *encountering_task_data, - const omp_frame_t *encountering_task_frame, ompt_data_t *parallel_data, + const ompt_frame_t *encountering_task_frame, ompt_data_t *parallel_data, uint32_t requested_team_size, int flag, const void *codeptr_ra) { if(parallel_data->ptr) printf("0: parallel_data initially not null\n"); @@ -593,8 +593,8 @@ "parallel_id=%" PRIu64 ", requested_team_size=%" PRIu32 ", codeptr_ra=%p, invoker=%d\n", ompt_get_thread_data()->value, encountering_task_data->value, - encountering_task_frame->exit_frame, - encountering_task_frame->enter_frame, parallel_data->value, + encountering_task_frame->exit_frame.ptr, + encountering_task_frame->enter_frame.ptr, parallel_data->value, requested_team_size, codeptr_ra, flag); } @@ -610,7 +610,7 @@ static void on_ompt_callback_task_create( ompt_data_t *encountering_task_data, - const omp_frame_t *encountering_task_frame, + const ompt_frame_t *encountering_task_frame, ompt_data_t* new_task_data, int type, int has_dependences, @@ -634,7 +634,7 @@ parallel_data->value = ompt_get_unique_id(); } - printf("%" PRIu64 ": ompt_event_task_create: parent_task_id=%" PRIu64 ", parent_task_frame.exit=%p, parent_task_frame.reenter=%p, new_task_id=%" PRIu64 ", codeptr_ra=%p, task_type=%s=%d, has_dependences=%s\n", ompt_get_thread_data()->value, encountering_task_data ? encountering_task_data->value : 0, encountering_task_frame ? encountering_task_frame->exit_frame : NULL, encountering_task_frame ? encountering_task_frame->enter_frame : NULL, new_task_data->value, codeptr_ra, buffer, type, has_dependences ? "yes" : "no"); + printf("%" PRIu64 ": ompt_event_task_create: parent_task_id=%" PRIu64 ", parent_task_frame.exit=%p, parent_task_frame.reenter=%p, new_task_id=%" PRIu64 ", codeptr_ra=%p, task_type=%s=%d, has_dependences=%s\n", ompt_get_thread_data()->value, encountering_task_data ? encountering_task_data->value : 0, encountering_task_frame ? encountering_task_frame->exit_frame.ptr : NULL, encountering_task_frame ? encountering_task_frame->enter_frame.ptr : NULL, new_task_data->value, codeptr_ra, buffer, type, has_dependences ? "yes" : "no"); } static void @@ -692,9 +692,9 @@ void *arg, const void *codeptr_ra) { - omp_frame_t* omptTaskFrame; + ompt_frame_t* omptTaskFrame; ompt_get_task_info(0, NULL, (ompt_data_t**) NULL, &omptTaskFrame, NULL, NULL); - printf("%" PRIu64 ": ompt_event_control_tool: command=%" PRIu64 ", modifier=%" PRIu64 ", arg=%p, codeptr_ra=%p, current_task_frame.exit=%p, current_task_frame.reenter=%p \n", ompt_get_thread_data()->value, command, modifier, arg, codeptr_ra, omptTaskFrame->exit_frame, omptTaskFrame->enter_frame); + printf("%" PRIu64 ": ompt_event_control_tool: command=%" PRIu64 ", modifier=%" PRIu64 ", arg=%p, codeptr_ra=%p, current_task_frame.exit=%p, current_task_frame.reenter=%p \n", ompt_get_thread_data()->value, command, modifier, arg, codeptr_ra, omptTaskFrame->exit_frame.ptr, omptTaskFrame->enter_frame.ptr); return 0; //success } Index: runtime/test/ompt/misc/api_calls_from_other_thread.cpp =================================================================== --- runtime/test/ompt/misc/api_calls_from_other_thread.cpp +++ runtime/test/ompt/misc/api_calls_from_other_thread.cpp @@ -31,7 +31,7 @@ printf("%" PRIu64 ": ompt_get_state()=%d\n", tvalue, ompt_get_state(NULL)); - int state = omp_state_undefined; + int state = ompt_state_undefined; const char *state_name; printf("%" PRIu64 ": ompt_enumerate_states()=%d\n", tvalue, ompt_enumerate_states(state, &state, &state_name)); Index: runtime/test/ompt/misc/api_calls_misc.c =================================================================== --- runtime/test/ompt/misc/api_calls_misc.c +++ runtime/test/ompt/misc/api_calls_misc.c @@ -19,7 +19,7 @@ ompt_get_state(NULL)); // ompt_enumerate_states() - int state = omp_state_undefined; + int state = ompt_state_undefined; const char *state_name; int steps = 0; while (ompt_enumerate_states(state, &state, &state_name) && steps < 1000) { Index: runtime/test/ompt/misc/control_tool.c =================================================================== --- runtime/test/ompt/misc/control_tool.c +++ runtime/test/ompt/misc/control_tool.c @@ -22,7 +22,7 @@ // CHECK: {{^}}[[MASTER_ID:[0-9]+]]: __builtin_frame_address({{.}})=[[EXIT_FRAME:0x[0-f]*]] // CHECK: {{^}}[[MASTER_ID]]: __builtin_frame_address(0)=[[REENTER_FRAME:0x[0-f]*]] - // CHECK: {{^}}[[MASTER_ID]]: ompt_event_control_tool: command=3, modifier=1, arg=[[NULL]], codeptr_ra=[[RETURN_ADDRESS:0x[0-f]*]], current_task_frame.exit=[[EXIT_FRAME]], current_task_frame.reenter=[[REENTER_FRAME]] + // CHECK: {{^}}[[MASTER_ID]]: ompt_event_control_tool: command=3, modifier=1, arg=[[NULL]], codeptr_ra=[[RETURN_ADDRESS:0x[0-f]*]], current_task_frame.exit=[[EXIT_FRAME]], current_task_frame.reenter={{0x[0-f]*}} // CHECK-NEXT: {{^}}[[MASTER_ID]]: current_address={{.*}}[[RETURN_ADDRESS]] return 0; Index: runtime/test/ompt/parallel/nested.c =================================================================== --- runtime/test/ompt/parallel/nested.c +++ runtime/test/ompt/parallel/nested.c @@ -80,25 +80,25 @@ // THREADS: {{^}}0: NULL_POINTER=[[NULL:.*$]] // THREADS: {{^}}[[MASTER_ID:[0-9]+]]: __builtin_frame_address(0)=[[MAIN_REENTER:0x[0-f]+]] - // THREADS: {{^}}[[MASTER_ID]]: ompt_event_parallel_begin: parent_task_id=[[PARENT_TASK_ID:[0-9]+]], parent_task_frame.exit=[[NULL]], parent_task_frame.reenter=[[MAIN_REENTER]], parallel_id=[[PARALLEL_ID:[0-9]+]], requested_team_size=4, codeptr_ra=[[RETURN_ADDRESS:0x[0-f]+]]{{[0-f][0-f]}}, invoker=[[PARALLEL_INVOKER:[0-9]+]] + // THREADS: {{^}}[[MASTER_ID]]: ompt_event_parallel_begin: parent_task_id=[[PARENT_TASK_ID:[0-9]+]], parent_task_frame.exit=[[NULL]], parent_task_frame.reenter=0x{{[0-f]+}}, parallel_id=[[PARALLEL_ID:[0-9]+]], requested_team_size=4, codeptr_ra=[[RETURN_ADDRESS:0x[0-f]+]]{{[0-f][0-f]}}, invoker=[[PARALLEL_INVOKER:[0-9]+]] // nested parallel masters // THREADS: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]] // THREADS: {{^}}[[MASTER_ID]]: __builtin_frame_address({{.}})=[[EXIT:0x[0-f]+]] // THREADS: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[NULL]] - // THREADS: {{^}}[[MASTER_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID:[0-9]+]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=[[MAIN_REENTER]] + // THREADS: {{^}}[[MASTER_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID:[0-9]+]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=0x{{[0-f]+}} // THREADS: {{^}}[[MASTER_ID]]: __builtin_frame_address(0)=[[REENTER:0x[0-f]+]] - // THREADS: {{^}}[[MASTER_ID]]: ompt_event_parallel_begin: parent_task_id=[[IMPLICIT_TASK_ID]], parent_task_frame.exit=[[EXIT]], parent_task_frame.reenter=[[REENTER]], parallel_id=[[NESTED_PARALLEL_ID:[0-9]+]], requested_team_size=4, codeptr_ra=[[NESTED_RETURN_ADDRESS:0x[0-f]+]]{{[0-f][0-f]}}, invoker=[[PARALLEL_INVOKER]] + // THREADS: {{^}}[[MASTER_ID]]: ompt_event_parallel_begin: parent_task_id=[[IMPLICIT_TASK_ID]], parent_task_frame.exit=[[EXIT]], parent_task_frame.reenter=0x{{[0-f]+}}, parallel_id=[[NESTED_PARALLEL_ID:[0-9]+]], requested_team_size=4, codeptr_ra=[[NESTED_RETURN_ADDRESS:0x[0-f]+]]{{[0-f][0-f]}}, invoker=[[PARALLEL_INVOKER]] // THREADS: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_begin: parallel_id=[[NESTED_PARALLEL_ID]], task_id=[[NESTED_IMPLICIT_TASK_ID:[0-9]+]] // THREADS: {{^}}[[MASTER_ID]]: __builtin_frame_address({{.}})=[[NESTED_EXIT:0x[0-f]+]] // THREADS: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[NESTED_PARALLEL_ID]], task_id=[[NESTED_IMPLICIT_TASK_ID]], exit_frame=[[NESTED_EXIT]], reenter_frame=[[NULL]] - // THREADS: {{^}}[[MASTER_ID]]: task level 1: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[REENTER]] - // THREADS: {{^}}[[MASTER_ID]]: task level 2: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=[[MAIN_REENTER]] + // THREADS: {{^}}[[MASTER_ID]]: task level 1: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=0x{{[0-f]+}} + // THREADS: {{^}}[[MASTER_ID]]: task level 2: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=0x{{[0-f]+}} // THREADS: {{^}}[[MASTER_ID]]: __builtin_frame_address(0)=[[NESTED_REENTER:0x[0-f]+]] // THREADS-NOT: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_end // explicit barrier // THREADS: {{^}}[[MASTER_ID]]: ompt_event_barrier_begin: parallel_id=[[NESTED_PARALLEL_ID]], task_id=[[NESTED_IMPLICIT_TASK_ID]], codeptr_ra=[[BARRIER_RETURN_ADDRESS:0x[0-f]+]]{{[0-f][0-f]}} - // THREADS: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[NESTED_PARALLEL_ID]], task_id=[[NESTED_IMPLICIT_TASK_ID]], exit_frame=[[NESTED_EXIT]], reenter_frame=[[NESTED_REENTER]] + // THREADS: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[NESTED_PARALLEL_ID]], task_id=[[NESTED_IMPLICIT_TASK_ID]], exit_frame=[[NESTED_EXIT]], reenter_frame=0x{{[0-f]+}} // THREADS: {{^}}[[MASTER_ID]]: ompt_event_barrier_end: parallel_id=[[NESTED_PARALLEL_ID]], task_id=[[NESTED_IMPLICIT_TASK_ID]] // THREADS: {{^}}[[MASTER_ID]]: fuzzy_address={{.*}}[[BARRIER_RETURN_ADDRESS]] // THREADS: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[NESTED_PARALLEL_ID]], task_id=[[NESTED_IMPLICIT_TASK_ID]], exit_frame=[[NESTED_EXIT]], reenter_frame=[[NULL]] Index: runtime/test/ompt/parallel/nested_thread_num.c =================================================================== --- runtime/test/ompt/parallel/nested_thread_num.c +++ runtime/test/ompt/parallel/nested_thread_num.c @@ -80,7 +80,7 @@ // THREADS: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_parallel_begin: // THREADS-SAME: parent_task_id=[[PARENT_TASK_ID:[0-9]+]], // THREADS-SAME: parent_task_frame.exit=[[NULL]], -// THREADS-SAME: parent_task_frame.reenter=[[MAIN_REENTER]], +// THREADS-SAME: parent_task_frame.reenter=0x{{[0-f]+}}, // THREADS-SAME: parallel_id=[[PARALLEL_ID:[0-9]+]], requested_team_size=2, // THREADS-SAME: codeptr_ra=[[RETURN_ADDRESS:0x[0-f]+]]{{[0-f][0-f]}}, // THREADS-SAME: invoker=[[PARALLEL_INVOKER:[0-9]+]] @@ -101,14 +101,14 @@ // THREADS: {{^}}[[MASTER_ID]]: task level 1: // THREADS-SAME: parallel_id=[[IMPLICIT_PARALLEL_ID:[0-9]+]], // THREADS-SAME: task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], -// THREADS-SAME: reenter_frame=[[MAIN_REENTER]] +// THREADS-SAME: reenter_frame=0x{{[0-f]+}} // THREADS: __builtin_frame_address(0)=[[REENTER:0x[0-f]+]] // THREADS: {{^}}[[MASTER_ID]]: ompt_event_parallel_begin: // THREADS-SAME: parent_task_id=[[IMPLICIT_TASK_ID]], // THREADS-SAME: parent_task_frame.exit=[[EXIT]], -// THREADS-SAME: parent_task_frame.reenter=[[REENTER]], +// THREADS-SAME: parent_task_frame.reenter=0x{{[0-f]+}}, // THREADS-SAME: parallel_id=[[NESTED_PARALLEL_ID:[0-9]+]], // THREADS-SAME: requested_team_size=2, // THREADS-SAME: codeptr_ra=[[NESTED_RETURN_ADDRESS:0x[0-f]+]]{{[0-f][0-f]}}, @@ -129,12 +129,12 @@ // THREADS: {{^}}[[MASTER_ID]]: task level 1: parallel_id=[[PARALLEL_ID]], // THREADS-SAME: task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], -// THREADS-SAME: reenter_frame=[[REENTER]] +// THREADS-SAME: reenter_frame=0x{{[0-f]+}} // THREADS: {{^}}[[MASTER_ID]]: task level 2: // THREADS-SAME: parallel_id=[[IMPLICIT_PARALLEL_ID]], // THREADS-SAME: task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], -// THREADS-SAME: reenter_frame=[[MAIN_REENTER]] +// THREADS-SAME: reenter_frame=0x{{[0-f]+}} // THREADS: __builtin_frame_address(0)=[[NESTED_REENTER:0x[0-f]+]] @@ -149,7 +149,7 @@ // THREADS: {{^}}[[MASTER_ID]]: task level 0: // THREADS-SAME: parallel_id=[[NESTED_PARALLEL_ID]], // THREADS-SAME: task_id=[[NESTED_IMPLICIT_TASK_ID]], -// THREADS-SAME: exit_frame=[[NESTED_EXIT]], reenter_frame=[[NESTED_REENTER]] +// THREADS-SAME: exit_frame=[[NESTED_EXIT]], reenter_frame=0x{{[0-f]+}} // THREADS: {{^}}[[MASTER_ID]]: ompt_event_barrier_end: // THREADS-SAME: parallel_id=[[NESTED_PARALLEL_ID]], Index: runtime/test/ompt/tasks/explicit_task.c =================================================================== --- runtime/test/ompt/tasks/explicit_task.c +++ runtime/test/ompt/tasks/explicit_task.c @@ -52,22 +52,22 @@ // make sure initial data pointers are null // CHECK-NOT: 0: new_task_data initially not null - // CHECK: {{^}}[[MASTER_ID:[0-9]+]]: __builtin_frame_address(0)=[[MAIN_REENTER:0x[0-f]+]] - // CHECK: {{^}}[[MASTER_ID]]: ompt_event_parallel_begin: parent_task_id=[[PARENT_TASK_ID:[0-9]+]], parent_task_frame.exit=[[NULL]], parent_task_frame.reenter=[[MAIN_REENTER]], parallel_id=[[PARALLEL_ID:[0-9]+]], requested_team_size=2, codeptr_ra=0x{{[0-f]+}}, invoker=[[PARALLEL_INVOKER:[0-9]+]] + // CHECK--doesnotwork: {{^}}[[MASTER_ID:[0-9]+]]: __builtin_frame_address(0)=[[MAIN_REENTER:0x[0-f]+]] + // CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_parallel_begin: parent_task_id=[[PARENT_TASK_ID:[0-9]+]], parent_task_frame.exit=[[NULL]], parent_task_frame.reenter=0x{{[0-f]+}}, parallel_id=[[PARALLEL_ID:[0-9]+]], requested_team_size=2, codeptr_ra=0x{{[0-f]+}}, invoker=[[PARALLEL_INVOKER:[0-9]+]] // nested parallel masters // CHECK: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]] // CHECK: {{^}}[[MASTER_ID]]: __builtin_frame_address({{.}})=[[EXIT:0x[0-f]+]] // CHECK: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[NULL]] - // CHECK: {{^}}[[MASTER_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID:[0-9]+]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=[[MAIN_REENTER]] + // CHECK: {{^}}[[MASTER_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID:[0-9]+]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=0x{{[0-f]+}} // CHECK: {{^}}[[MASTER_ID]]: __builtin_frame_address(0)=[[REENTER:0x[0-f]+]] // CHECK: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[NULL]] // <- ompt_event_task_create would be expected here - // CHECK: {{^}}[[MASTER_ID]]: ompt_event_task_create: parent_task_id=[[IMPLICIT_TASK_ID]], parent_task_frame.exit=[[EXIT]], parent_task_frame.reenter=[[REENTER]], new_task_id=[[TASK_ID:[0-9]+]], codeptr_ra=[[RETURN_ADDRESS:0x[0-f]+]]{{[0-f][0-f]}} + // CHECK: {{^}}[[MASTER_ID]]: ompt_event_task_create: parent_task_id=[[IMPLICIT_TASK_ID]], parent_task_frame.exit=[[EXIT]], parent_task_frame.reenter=0x{{[0-f]+}}, new_task_id=[[TASK_ID:[0-9]+]], codeptr_ra=[[RETURN_ADDRESS:0x[0-f]+]]{{[0-f][0-f]}} // CHECK: {{^}}[[MASTER_ID]]: fuzzy_address={{.*}}[[RETURN_ADDRESS]] // CHECK: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[NULL]] // explicit barrier after master // CHECK: {{^}}[[MASTER_ID]]: ompt_event_barrier_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]] - // CHECK: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[REENTER]] + // CHECK: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=0x{{[0-f]+}} // CHECK: {{^}}[[MASTER_ID]]: ompt_event_barrier_end: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]] // implicit barrier parallel // CHECK: {{^}}[[MASTER_ID]]: ompt_event_barrier_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]] @@ -78,16 +78,16 @@ // CHECK: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]] // CHECK: {{^}}[[THREAD_ID]]: __builtin_frame_address({{.}})=[[EXIT:0x[0-f]+]] // CHECK: {{^}}[[THREAD_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[NULL]] - // CHECK: {{^}}[[THREAD_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=[[MAIN_REENTER]] + // CHECK: {{^}}[[THREAD_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=0x{{[0-f]+}} // CHECK: {{^}}[[THREAD_ID]]: __builtin_frame_address(0)=[[REENTER:0x[0-f]+]] // CHECK: {{^}}[[THREAD_ID]]: ompt_event_barrier_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]] - // CHECK: {{^}}[[THREAD_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[REENTER]] + // CHECK: {{^}}[[THREAD_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=0x{{[0-f]+}} // this is expected to come earlier and at MASTER: // CHECK: {{^}}[[THREAD_ID]]: ompt_event_task_schedule: first_task_id=[[IMPLICIT_TASK_ID]], second_task_id=[[TASK_ID]] // CHECK: {{^}}[[THREAD_ID]]: __builtin_frame_address(1)=[[TASK_EXIT:0x[0-f]+]] // CHECK: {{^}}[[THREAD_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[TASK_ID]], exit_frame=[[TASK_EXIT]], reenter_frame=[[NULL]] - // CHECK: {{^}}[[THREAD_ID]]: task level 1: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[REENTER]] - // CHECK: {{^}}[[THREAD_ID]]: task level 2: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=[[MAIN_REENTER]] + // CHECK: {{^}}[[THREAD_ID]]: task level 1: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=0x{{[0-f]+}} + // CHECK: {{^}}[[THREAD_ID]]: task level 2: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=0x{{[0-f]+}} // CHECK: {{^}}[[THREAD_ID]]: ompt_event_task_schedule: first_task_id=[[TASK_ID]], second_task_id=[[IMPLICIT_TASK_ID]] // CHECK: {{^}}[[THREAD_ID]]: ompt_event_task_end: task_id=[[TASK_ID]] // CHECK: {{^}}[[THREAD_ID]]: ompt_event_barrier_end: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]] Index: runtime/test/ompt/tasks/serialized.c =================================================================== --- runtime/test/ompt/tasks/serialized.c +++ runtime/test/ompt/tasks/serialized.c @@ -58,7 +58,7 @@ // CHECK: {{^}}[[MASTER_ID]]: ompt_event_parallel_begin // CHECK-SAME: parent_task_id=[[PARENT_TASK_ID:[0-9]+]] // CHECK-SAME: parent_task_frame.exit=[[NULL]] - // CHECK-SAME: parent_task_frame.reenter=[[MAIN_REENTER]] + // CHECK-SAME: parent_task_frame.reenter=0x{{[0-f]+}} // CHECK-SAME: parallel_id=[[PARALLEL_ID:[0-9]+]], requested_team_size=2 // CHECK-SAME: codeptr_ra=0x{{[0-f]+}}, invoker={{[0-9]+}} @@ -76,13 +76,13 @@ // CHECK: {{^}}[[MASTER_ID]]: task level 1 // CHECK-SAME: parallel_id=[[IMPLICIT_PARALLEL_ID:[0-9]+]] // CHECK-SAME: task_id=[[PARENT_TASK_ID]], - // CHECK-SAME: exit_frame=[[NULL]], reenter_frame=[[MAIN_REENTER]] + // CHECK-SAME: exit_frame=[[NULL]], reenter_frame=0x{{[0-f]+}} // CHECK: {{^}}[[MASTER_ID]]: __builtin_frame_address(0)=[[REENTER:0x[0-f]+]] // CHECK: {{^}}[[MASTER_ID]]: ompt_event_task_create // CHECK-SAME: parent_task_id=[[IMPLICIT_TASK_ID]] // CHECK-SAME: parent_task_frame.exit=[[EXIT]] - // CHECK-SAME: parent_task_frame.reenter=[[REENTER]] + // CHECK-SAME: parent_task_frame.reenter=0x{{[0-f]+}} // CHECK-SAME: new_task_id=[[TASK_ID:[0-9]+]] // CHECK-SAME: codeptr_ra=[[RETURN_ADDRESS:0x[0-f]+]]{{[0-f][0-f]}} @@ -96,12 +96,12 @@ // CHECK: {{^}}[[MASTER_ID]]: task level 1 // CHECK-SAME: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]] - // CHECK-SAME: exit_frame=[[EXIT]], reenter_frame=[[REENTER]] + // CHECK-SAME: exit_frame=[[EXIT]], reenter_frame=0x{{[0-f]+}} // CHECK: {{^}}[[MASTER_ID]]: task level 2 // CHECK-SAME: parallel_id=[[IMPLICIT_PARALLEL_ID]] // CHECK-SAME: task_id=[[PARENT_TASK_ID]] - // CHECK-SAME: exit_frame=[[NULL]], reenter_frame=[[MAIN_REENTER]] + // CHECK-SAME: exit_frame=[[NULL]], reenter_frame=0x{{[0-f]+}} // CHECK: {{^}}[[MASTER_ID]]: ompt_event_task_schedule // CHECK-SAME: first_task_id=[[TASK_ID]], second_task_id=[[IMPLICIT_TASK_ID]] @@ -135,7 +135,7 @@ // CHECK: {{^}}[[THREAD_ID]]: task level 1 // CHECK-SAME: parallel_id=[[IMPLICIT_PARALLEL_ID]] // CHECK-SAME: task_id=[[PARENT_TASK_ID]] - // CHECK-SAME: exit_frame=[[NULL]], reenter_frame=[[MAIN_REENTER]] + // CHECK-SAME: exit_frame=[[NULL]], reenter_frame=0x{{[0-f]+}} // CHECK: {{^}}[[THREAD_ID]]: __builtin_frame_address(0)={{0x[0-f]+}} // CHECK: {{^}}[[THREAD_ID]]: ompt_event_barrier_begin Index: runtime/test/ompt/tasks/task_in_joinbarrier.c =================================================================== --- runtime/test/ompt/tasks/task_in_joinbarrier.c +++ runtime/test/ompt/tasks/task_in_joinbarrier.c @@ -50,16 +50,16 @@ // CHECK-NOT: 0: new_task_data initially not null // CHECK: {{^}}[[MASTER_ID:[0-9]+]]: __builtin_frame_address(0)=[[MAIN_REENTER:0x[0-f]+]] - // CHECK: {{^}}[[MASTER_ID]]: ompt_event_parallel_begin: parent_task_id=[[PARENT_TASK_ID:[0-9]+]], parent_task_frame.exit=[[NULL]], parent_task_frame.reenter=[[MAIN_REENTER]], parallel_id=[[PARALLEL_ID:[0-9]+]], requested_team_size=2, codeptr_ra=0x{{[0-f]+}}, invoker=[[PARALLEL_INVOKER:[0-9]+]] + // CHECK: {{^}}[[MASTER_ID]]: ompt_event_parallel_begin: parent_task_id=[[PARENT_TASK_ID:[0-9]+]], parent_task_frame.exit=[[NULL]], parent_task_frame.reenter=0x{{[0-f]+}}, parallel_id=[[PARALLEL_ID:[0-9]+]], requested_team_size=2, codeptr_ra=0x{{[0-f]+}}, invoker=[[PARALLEL_INVOKER:[0-9]+]] // nested parallel masters // CHECK: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]] // CHECK: {{^}}[[MASTER_ID]]: __builtin_frame_address({{.}})=[[EXIT:0x[0-f]+]] // CHECK: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[NULL]] - // CHECK: {{^}}[[MASTER_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID:[0-9]+]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=[[MAIN_REENTER]] + // CHECK: {{^}}[[MASTER_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID:[0-9]+]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=0x{{[0-f]+}} // CHECK: {{^}}[[MASTER_ID]]: __builtin_frame_address(0)=[[REENTER:0x[0-f]+]] // CHECK: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[NULL]] // <- ompt_event_task_create would be expected here - // CHECK: {{^}}[[MASTER_ID]]: ompt_event_task_create: parent_task_id=[[IMPLICIT_TASK_ID]], parent_task_frame.exit=[[EXIT]], parent_task_frame.reenter=[[REENTER]], new_task_id=[[TASK_ID:[0-9]+]], codeptr_ra=[[TASK_FUNCTION:0x[0-f]+]] + // CHECK: {{^}}[[MASTER_ID]]: ompt_event_task_create: parent_task_id=[[IMPLICIT_TASK_ID]], parent_task_frame.exit=[[EXIT]], parent_task_frame.reenter=0x{{[0-f]+}}, new_task_id=[[TASK_ID:[0-9]+]], codeptr_ra=[[TASK_FUNCTION:0x[0-f]+]] // CHECK: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[NULL]] // implicit barrier parallel // CHECK: {{^}}[[MASTER_ID]]: ompt_event_barrier_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]] @@ -70,7 +70,7 @@ // CHECK: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]] // CHECK: {{^}}[[THREAD_ID]]: __builtin_frame_address({{.}})=[[EXIT:0x[0-f]+]] // CHECK: {{^}}[[THREAD_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[NULL]] - // CHECK: {{^}}[[THREAD_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=[[MAIN_REENTER]] + // CHECK: {{^}}[[THREAD_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=0x{{[0-f]+}} // CHECK: {{^}}[[THREAD_ID]]: __builtin_frame_address(0)=[[REENTER:0x[0-f]+]] // implicit barrier parallel // CHECK: {{^}}[[THREAD_ID]]: ompt_event_barrier_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]] @@ -79,7 +79,7 @@ // CHECK: {{^}}[[THREAD_ID]]: __builtin_frame_address(1)=[[TASK_EXIT:0x[0-f]+]] // CHECK: {{^}}[[THREAD_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[TASK_ID]], exit_frame=[[TASK_EXIT]], reenter_frame=[[NULL]] // CHECK: {{^}}[[THREAD_ID]]: task level 1: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=[[NULL]] - // CHECK: {{^}}[[THREAD_ID]]: task level 2: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=[[MAIN_REENTER]] + // CHECK: {{^}}[[THREAD_ID]]: task level 2: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=0x{{[0-f]+}} // CHECK: {{^}}[[THREAD_ID]]: ompt_event_task_schedule: first_task_id=[[TASK_ID]], second_task_id=[[IMPLICIT_TASK_ID]] // CHECK: {{^}}[[THREAD_ID]]: ompt_event_task_end: task_id=[[TASK_ID]] // CHECK: {{^}}[[THREAD_ID]]: ompt_event_barrier_end: parallel_id={{[0-9]+}}, task_id=[[IMPLICIT_TASK_ID]] Index: runtime/test/ompt/tasks/untied_task.c =================================================================== --- runtime/test/ompt/tasks/untied_task.c +++ runtime/test/ompt/tasks/untied_task.c @@ -60,20 +60,20 @@ // CHECK-NOT: 0: new_task_data initially not null // CHECK: {{^}}[[MASTER_ID:[0-9]+]]: __builtin_frame_address(0)=[[MAIN_REENTER:0x[0-f]+]] - // CHECK: {{^}}[[MASTER_ID]]: ompt_event_parallel_begin: parent_task_id=[[PARENT_TASK_ID:[0-9]+]], parent_task_frame.exit=[[NULL]], parent_task_frame.reenter=[[MAIN_REENTER]], parallel_id=[[PARALLEL_ID:[0-9]+]], requested_team_size=2, codeptr_ra=0x{{[0-f]+}}, invoker=[[PARALLEL_INVOKER:[0-9]+]] + // CHECK: {{^}}[[MASTER_ID]]: ompt_event_parallel_begin: parent_task_id=[[PARENT_TASK_ID:[0-9]+]], parent_task_frame.exit=[[NULL]], parent_task_frame.reenter=0x{{[0-f]+}}, parallel_id=[[PARALLEL_ID:[0-9]+]], requested_team_size=2, codeptr_ra=0x{{[0-f]+}}, invoker=[[PARALLEL_INVOKER:[0-9]+]] // nested parallel masters // CHECK: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]] // CHECK: {{^}}[[MASTER_ID]]: __builtin_frame_address({{.}})=[[EXIT:0x[0-f]+]] // CHECK: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[NULL]] - // CHECK: {{^}}[[MASTER_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID:[0-9]+]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=[[MAIN_REENTER]] + // CHECK: {{^}}[[MASTER_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID:[0-9]+]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=0x{{[0-f]+}} // CHECK: {{^}}[[MASTER_ID]]: __builtin_frame_address(0)=[[REENTER:0x[0-f]+]] // CHECK: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[NULL]] // <- ompt_event_task_create would be expected here - // CHECK: {{^}}[[MASTER_ID]]: ompt_event_task_create: parent_task_id=[[IMPLICIT_TASK_ID]], parent_task_frame.exit=[[EXIT]], parent_task_frame.reenter=[[REENTER]], new_task_id=[[TASK_ID:[0-9]+]], codeptr_ra=[[TASK_FUNCTION:0x[0-f]+]] + // CHECK: {{^}}[[MASTER_ID]]: ompt_event_task_create: parent_task_id=[[IMPLICIT_TASK_ID]], parent_task_frame.exit=[[EXIT]], parent_task_frame.reenter=0x{{[0-f]+}}, new_task_id=[[TASK_ID:[0-9]+]], codeptr_ra=[[TASK_FUNCTION:0x[0-f]+]] // CHECK: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[NULL]] // explicit barrier after master // CHECK: {{^}}[[MASTER_ID]]: ompt_event_barrier_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]] - // CHECK: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[REENTER]] + // CHECK: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=0x{{[0-f]+}} // CHECK: {{^}}[[MASTER_ID]]: ompt_event_barrier_end: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]] // implicit barrier parallel // CHECK: {{^}}[[MASTER_ID]]: ompt_event_barrier_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]] @@ -84,16 +84,16 @@ // CHECK: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]] // CHECK: {{^}}[[THREAD_ID]]: __builtin_frame_address({{.}})=[[EXIT:0x[0-f]+]] // CHECK: {{^}}[[THREAD_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[NULL]] - // CHECK: {{^}}[[THREAD_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=[[MAIN_REENTER]] + // CHECK: {{^}}[[THREAD_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=0x{{[0-f]+}} // CHECK: {{^}}[[THREAD_ID]]: __builtin_frame_address(0)=[[REENTER:0x[0-f]+]] // CHECK: {{^}}[[THREAD_ID]]: ompt_event_barrier_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]] - // CHECK: {{^}}[[THREAD_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[REENTER]] + // CHECK: {{^}}[[THREAD_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=0x{{[0-f]+}} // this is expected to come earlier and at MASTER: // CHECK: {{^}}[[THREAD_ID]]: ompt_event_task_schedule: first_task_id=[[IMPLICIT_TASK_ID]], second_task_id=[[TASK_ID]] // CHECK: {{^}}[[THREAD_ID]]: __builtin_frame_address(1)=[[TASK_EXIT:0x[0-f]+]] // CHECK: {{^}}[[THREAD_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[TASK_ID]], exit_frame=[[TASK_EXIT]], reenter_frame=[[NULL]] - // CHECK: {{^}}[[THREAD_ID]]: task level 1: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[REENTER]] - // CHECK: {{^}}[[THREAD_ID]]: task level 2: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=[[MAIN_REENTER]] + // CHECK: {{^}}[[THREAD_ID]]: task level 1: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=0x{{[0-f]+}} + // CHECK: {{^}}[[THREAD_ID]]: task level 2: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=0x{{[0-f]+}} // CHECK: {{^}}[[THREAD_ID]]: ompt_event_task_schedule: first_task_id=[[TASK_ID]], second_task_id=[[IMPLICIT_TASK_ID]] // CHECK: {{^}}[[THREAD_ID]]: ompt_event_task_end: task_id=[[TASK_ID]] // CHECK: {{^}}[[THREAD_ID]]: ompt_event_barrier_end: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]]