[OMPT] Rename ompt_wait_id to omp_wait_id

Rename ompt_wait_id to omp_wait_id, as defined in the spec.

Differential Revision: https://reviews.llvm.org/D46530

llvm-svn: 333368
This commit is contained in:
Joachim Protze 2018-05-28 08:16:08 +00:00
parent c5836064bb
commit 406361330b
7 changed files with 75 additions and 75 deletions

View File

@ -173,8 +173,8 @@ typedef union ompt_data_t {
static const ompt_data_t ompt_data_none = {0};
typedef uint64_t ompt_wait_id_t;
static const ompt_wait_id_t ompt_wait_id_none = 0;
typedef uint64_t omp_wait_id_t;
static const omp_wait_id_t omp_wait_id_none = 0;
typedef void ompt_device_t;
@ -287,7 +287,7 @@ typedef void (*ompt_callback_thread_end_t) (
);
typedef void (*ompt_wait_callback_t) (
ompt_wait_id_t wait_id /* wait data */
omp_wait_id_t wait_id /* wait data */
);
/* parallel and workshares */
@ -467,19 +467,19 @@ typedef void (*ompt_callback_mutex_acquire_t) (
ompt_mutex_kind_t kind, /* mutex kind */
unsigned int hint, /* mutex hint */
unsigned int impl, /* mutex implementation */
ompt_wait_id_t wait_id, /* id of object being awaited */
omp_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_kind_t kind, /* mutex kind */
ompt_wait_id_t wait_id, /* id of object being awaited */
omp_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 */
ompt_wait_id_t wait_id, /* id of object being awaited */
omp_wait_id_t wait_id, /* id of object being awaited */
const void *codeptr_ra /* return address of runtime call */
);
@ -569,7 +569,7 @@ extern "C" {
/* state */
OMPT_API_FUNCTION(omp_state_t, ompt_get_state, (
ompt_wait_id_t *wait_id
omp_wait_id_t *wait_id
));
/* thread */

View File

@ -364,7 +364,7 @@ static inline void __kmp_acquire_atomic_lock(kmp_atomic_lock_t *lck,
#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, (ompt_wait_id_t)lck,
ompt_mutex_atomic, 0, kmp_mutex_impl_queuing, (omp_wait_id_t)lck,
OMPT_GET_RETURN_ADDRESS(0));
}
#endif
@ -374,7 +374,7 @@ static inline void __kmp_acquire_atomic_lock(kmp_atomic_lock_t *lck,
#if OMPT_SUPPORT && OMPT_OPTIONAL
if (ompt_enabled.ompt_callback_mutex_acquired) {
ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)(
ompt_mutex_atomic, (ompt_wait_id_t)lck, OMPT_GET_RETURN_ADDRESS(0));
ompt_mutex_atomic, (omp_wait_id_t)lck, OMPT_GET_RETURN_ADDRESS(0));
}
#endif
}
@ -390,7 +390,7 @@ static inline void __kmp_release_atomic_lock(kmp_atomic_lock_t *lck,
#if OMPT_SUPPORT && OMPT_OPTIONAL
if (ompt_enabled.ompt_callback_mutex_released) {
ompt_callbacks.ompt_callback(ompt_callback_mutex_released)(
ompt_mutex_atomic, (ompt_wait_id_t)lck, OMPT_GET_RETURN_ADDRESS(0));
ompt_mutex_atomic, (omp_wait_id_t)lck, OMPT_GET_RETURN_ADDRESS(0));
}
#endif
}

View File

@ -815,12 +815,12 @@ void __kmpc_ordered(ident_t *loc, kmp_int32 gtid) {
#if OMPT_SUPPORT && OMPT_OPTIONAL
kmp_team_t *team;
ompt_wait_id_t lck;
omp_wait_id_t lck;
void *codeptr_ra;
if (ompt_enabled.enabled) {
OMPT_STORE_RETURN_ADDRESS(gtid);
team = __kmp_team_from_gtid(gtid);
lck = (ompt_wait_id_t)&team->t.t_ordered.dt.t_value;
lck = (omp_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;
@ -830,7 +830,7 @@ void __kmpc_ordered(ident_t *loc, kmp_int32 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,
(ompt_wait_id_t)lck, codeptr_ra);
(omp_wait_id_t)lck, codeptr_ra);
}
}
#endif
@ -849,7 +849,7 @@ void __kmpc_ordered(ident_t *loc, kmp_int32 gtid) {
/* OMPT event callback */
if (ompt_enabled.ompt_callback_mutex_acquired) {
ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)(
ompt_mutex_ordered, (ompt_wait_id_t)lck, codeptr_ra);
ompt_mutex_ordered, (omp_wait_id_t)lck, codeptr_ra);
}
}
#endif
@ -889,7 +889,7 @@ void __kmpc_end_ordered(ident_t *loc, kmp_int32 gtid) {
if (ompt_enabled.ompt_callback_mutex_released) {
ompt_callbacks.ompt_callback(ompt_callback_mutex_released)(
ompt_mutex_ordered,
(ompt_wait_id_t)&__kmp_team_from_gtid(gtid)->t.t_ordered.dt.t_value,
(omp_wait_id_t)&__kmp_team_from_gtid(gtid)->t.t_ordered.dt.t_value,
OMPT_LOAD_RETURN_ADDRESS(gtid));
}
#endif
@ -1162,7 +1162,7 @@ void __kmpc_critical(ident_t *loc, kmp_int32 global_tid,
ti = __kmp_threads[global_tid]->th.ompt_thread_info;
/* OMPT state update */
prev_state = ti.state;
ti.wait_id = (ompt_wait_id_t)lck;
ti.wait_id = (omp_wait_id_t)lck;
ti.state = omp_state_wait_critical;
/* OMPT event callback */
@ -1170,7 +1170,7 @@ void __kmpc_critical(ident_t *loc, kmp_int32 global_tid,
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(),
(ompt_wait_id_t)crit, codeptr_ra);
(omp_wait_id_t)crit, codeptr_ra);
}
}
#endif
@ -1190,7 +1190,7 @@ void __kmpc_critical(ident_t *loc, kmp_int32 global_tid,
/* OMPT event callback */
if (ompt_enabled.ompt_callback_mutex_acquired) {
ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)(
ompt_mutex_critical, (ompt_wait_id_t)crit, codeptr_ra);
ompt_mutex_critical, (omp_wait_id_t)crit, codeptr_ra);
}
}
#endif
@ -1372,14 +1372,14 @@ void __kmpc_critical_with_hint(ident_t *loc, kmp_int32 global_tid,
ti = __kmp_threads[global_tid]->th.ompt_thread_info;
/* OMPT state update */
prev_state = ti.state;
ti.wait_id = (ompt_wait_id_t)lck;
ti.wait_id = (omp_wait_id_t)lck;
ti.state = omp_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), (ompt_wait_id_t)crit, codeptr);
__ompt_get_mutex_impl_type(crit), (omp_wait_id_t)crit, codeptr);
}
}
#endif
@ -1410,14 +1410,14 @@ void __kmpc_critical_with_hint(ident_t *loc, kmp_int32 global_tid,
ti = __kmp_threads[global_tid]->th.ompt_thread_info;
/* OMPT state update */
prev_state = ti.state;
ti.wait_id = (ompt_wait_id_t)lck;
ti.wait_id = (omp_wait_id_t)lck;
ti.state = omp_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), (ompt_wait_id_t)crit, codeptr);
__ompt_get_mutex_impl_type(0, ilk), (omp_wait_id_t)crit, codeptr);
}
}
#endif
@ -1436,7 +1436,7 @@ void __kmpc_critical_with_hint(ident_t *loc, kmp_int32 global_tid,
/* OMPT event callback */
if (ompt_enabled.ompt_callback_mutex_acquired) {
ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)(
ompt_mutex_critical, (ompt_wait_id_t)crit, codeptr);
ompt_mutex_critical, (omp_wait_id_t)crit, codeptr);
}
}
#endif
@ -1534,7 +1534,7 @@ void __kmpc_end_critical(ident_t *loc, kmp_int32 global_tid,
OMPT_STORE_RETURN_ADDRESS(global_tid);
if (ompt_enabled.ompt_callback_mutex_released) {
ompt_callbacks.ompt_callback(ompt_callback_mutex_released)(
ompt_mutex_critical, (ompt_wait_id_t)crit, OMPT_LOAD_RETURN_ADDRESS(0));
ompt_mutex_critical, (omp_wait_id_t)crit, OMPT_LOAD_RETURN_ADDRESS(0));
}
#endif
@ -2105,7 +2105,7 @@ void __kmpc_init_lock_with_hint(ident_t *loc, kmp_int32 gtid, void **user_lock,
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), (ompt_wait_id_t)user_lock,
__ompt_get_mutex_impl_type(user_lock), (omp_wait_id_t)user_lock,
codeptr);
}
#endif
@ -2129,7 +2129,7 @@ void __kmpc_init_nest_lock_with_hint(ident_t *loc, kmp_int32 gtid,
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), (ompt_wait_id_t)user_lock,
__ompt_get_mutex_impl_type(user_lock), (omp_wait_id_t)user_lock,
codeptr);
}
#endif
@ -2155,7 +2155,7 @@ void __kmpc_init_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
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), (ompt_wait_id_t)user_lock,
__ompt_get_mutex_impl_type(user_lock), (omp_wait_id_t)user_lock,
codeptr);
}
#endif
@ -2198,7 +2198,7 @@ void __kmpc_init_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
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(),
(ompt_wait_id_t)user_lock, codeptr);
(omp_wait_id_t)user_lock, codeptr);
}
#endif
@ -2227,7 +2227,7 @@ void __kmpc_init_nest_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
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), (ompt_wait_id_t)user_lock,
__ompt_get_mutex_impl_type(user_lock), (omp_wait_id_t)user_lock,
codeptr);
}
#endif
@ -2273,7 +2273,7 @@ void __kmpc_init_nest_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
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(),
(ompt_wait_id_t)user_lock, codeptr);
(omp_wait_id_t)user_lock, codeptr);
}
#endif
@ -2309,7 +2309,7 @@ void __kmpc_destroy_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
lck = (kmp_user_lock_p)user_lock;
}
ompt_callbacks.ompt_callback(ompt_callback_lock_destroy)(
ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr);
ompt_mutex_lock, (omp_wait_id_t)user_lock, codeptr);
}
#endif
KMP_D_LOCK_FUNC(user_lock, destroy)((kmp_dyna_lock_t *)user_lock);
@ -2337,7 +2337,7 @@ void __kmpc_destroy_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
codeptr = OMPT_GET_RETURN_ADDRESS(0);
if (ompt_enabled.ompt_callback_lock_destroy) {
ompt_callbacks.ompt_callback(ompt_callback_lock_destroy)(
ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr);
ompt_mutex_lock, (omp_wait_id_t)user_lock, codeptr);
}
#endif
@ -2377,7 +2377,7 @@ void __kmpc_destroy_nest_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
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, (ompt_wait_id_t)user_lock, codeptr);
ompt_mutex_nest_lock, (omp_wait_id_t)user_lock, codeptr);
}
#endif
KMP_D_LOCK_FUNC(user_lock, destroy)((kmp_dyna_lock_t *)user_lock);
@ -2409,7 +2409,7 @@ void __kmpc_destroy_nest_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
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, (ompt_wait_id_t)user_lock, codeptr);
ompt_mutex_nest_lock, (omp_wait_id_t)user_lock, codeptr);
}
#endif
@ -2454,7 +2454,7 @@ void __kmpc_set_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
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), (ompt_wait_id_t)user_lock,
__ompt_get_mutex_impl_type(user_lock), (omp_wait_id_t)user_lock,
codeptr);
}
#endif
@ -2476,7 +2476,7 @@ void __kmpc_set_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
#if OMPT_SUPPORT && OMPT_OPTIONAL
if (ompt_enabled.ompt_callback_mutex_acquired) {
ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)(
ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr);
ompt_mutex_lock, (omp_wait_id_t)user_lock, codeptr);
}
#endif
@ -2509,7 +2509,7 @@ void __kmpc_set_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
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(),
(ompt_wait_id_t)lck, codeptr);
(omp_wait_id_t)lck, codeptr);
}
#endif
@ -2522,7 +2522,7 @@ void __kmpc_set_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
#if OMPT_SUPPORT && OMPT_OPTIONAL
if (ompt_enabled.ompt_callback_mutex_acquired) {
ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)(
ompt_mutex_lock, (ompt_wait_id_t)lck, codeptr);
ompt_mutex_lock, (omp_wait_id_t)lck, codeptr);
}
#endif
@ -2544,7 +2544,7 @@ void __kmpc_set_nest_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
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), (ompt_wait_id_t)user_lock,
__ompt_get_mutex_impl_type(user_lock), (omp_wait_id_t)user_lock,
codeptr);
}
}
@ -2561,13 +2561,13 @@ void __kmpc_set_nest_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
if (ompt_enabled.ompt_callback_mutex_acquired) {
// lock_first
ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)(
ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr);
ompt_mutex_nest_lock, (omp_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, (ompt_wait_id_t)user_lock, codeptr);
ompt_scope_begin, (omp_wait_id_t)user_lock, codeptr);
}
}
}
@ -2605,7 +2605,7 @@ void __kmpc_set_nest_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
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(), (ompt_wait_id_t)lck, codeptr);
__ompt_get_mutex_impl_type(), (omp_wait_id_t)lck, codeptr);
}
}
#endif
@ -2622,13 +2622,13 @@ void __kmpc_set_nest_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
if (ompt_enabled.ompt_callback_mutex_acquired) {
// lock_first
ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)(
ompt_mutex_nest_lock, (ompt_wait_id_t)lck, codeptr);
ompt_mutex_nest_lock, (omp_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, (ompt_wait_id_t)lck, codeptr);
ompt_scope_begin, (omp_wait_id_t)lck, codeptr);
}
}
}
@ -2664,7 +2664,7 @@ void __kmpc_unset_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
codeptr = OMPT_GET_RETURN_ADDRESS(0);
if (ompt_enabled.ompt_callback_mutex_released) {
ompt_callbacks.ompt_callback(ompt_callback_mutex_released)(
ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr);
ompt_mutex_lock, (omp_wait_id_t)user_lock, codeptr);
}
#endif
@ -2693,7 +2693,7 @@ void __kmpc_unset_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
codeptr = OMPT_GET_RETURN_ADDRESS(0);
if (ompt_enabled.ompt_callback_mutex_released) {
ompt_callbacks.ompt_callback(ompt_callback_mutex_released)(
ompt_mutex_lock, (ompt_wait_id_t)lck, codeptr);
ompt_mutex_lock, (omp_wait_id_t)lck, codeptr);
}
#endif
@ -2725,7 +2725,7 @@ void __kmpc_unset_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
codeptr = OMPT_GET_RETURN_ADDRESS(0);
if (ompt_enabled.ompt_callback_mutex_released) {
ompt_callbacks.ompt_callback(ompt_callback_mutex_released)(
ompt_mutex_lock, (ompt_wait_id_t)lck, codeptr);
ompt_mutex_lock, (omp_wait_id_t)lck, codeptr);
}
#endif
@ -2752,12 +2752,12 @@ void __kmpc_unset_nest_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
if (ompt_enabled.ompt_callback_mutex_released) {
// release_lock_last
ompt_callbacks.ompt_callback(ompt_callback_mutex_released)(
ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr);
ompt_mutex_nest_lock, (omp_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, (ompt_wait_id_t)user_lock, codeptr);
ompt_scope_end, (omp_wait_id_t)user_lock, codeptr);
}
}
#endif
@ -2801,12 +2801,12 @@ void __kmpc_unset_nest_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
if (ompt_enabled.ompt_callback_mutex_released) {
// release_lock_last
ompt_callbacks.ompt_callback(ompt_callback_mutex_released)(
ompt_mutex_nest_lock, (ompt_wait_id_t)lck, codeptr);
ompt_mutex_nest_lock, (omp_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, (ompt_wait_id_t)lck, codeptr);
ompt_mutex_scope_end, (omp_wait_id_t)lck, codeptr);
}
}
#endif
@ -2843,12 +2843,12 @@ void __kmpc_unset_nest_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
if (ompt_enabled.ompt_callback_mutex_released) {
// release_lock_last
ompt_callbacks.ompt_callback(ompt_callback_mutex_released)(
ompt_mutex_nest_lock, (ompt_wait_id_t)lck, codeptr);
ompt_mutex_nest_lock, (omp_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, (ompt_wait_id_t)lck, codeptr);
ompt_mutex_scope_end, (omp_wait_id_t)lck, codeptr);
}
}
#endif
@ -2874,7 +2874,7 @@ int __kmpc_test_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
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), (ompt_wait_id_t)user_lock,
__ompt_get_mutex_impl_type(user_lock), (omp_wait_id_t)user_lock,
codeptr);
}
#endif
@ -2897,7 +2897,7 @@ int __kmpc_test_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
#if OMPT_SUPPORT && OMPT_OPTIONAL
if (ompt_enabled.ompt_callback_mutex_acquired) {
ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)(
ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr);
ompt_mutex_lock, (omp_wait_id_t)user_lock, codeptr);
}
#endif
return FTN_TRUE;
@ -2938,7 +2938,7 @@ int __kmpc_test_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
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(),
(ompt_wait_id_t)lck, codeptr);
(omp_wait_id_t)lck, codeptr);
}
#endif
@ -2953,7 +2953,7 @@ int __kmpc_test_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
#if OMPT_SUPPORT && OMPT_OPTIONAL
if (rc && ompt_enabled.ompt_callback_mutex_acquired) {
ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)(
ompt_mutex_lock, (ompt_wait_id_t)lck, codeptr);
ompt_mutex_lock, (omp_wait_id_t)lck, codeptr);
}
#endif
@ -2979,7 +2979,7 @@ int __kmpc_test_nest_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
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), (ompt_wait_id_t)user_lock,
__ompt_get_mutex_impl_type(user_lock), (omp_wait_id_t)user_lock,
codeptr);
}
#endif
@ -2997,13 +2997,13 @@ int __kmpc_test_nest_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
if (ompt_enabled.ompt_callback_mutex_acquired) {
// lock_first
ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)(
ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr);
ompt_mutex_nest_lock, (omp_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, (ompt_wait_id_t)user_lock, codeptr);
ompt_scope_begin, (omp_wait_id_t)user_lock, codeptr);
}
}
}
@ -3044,7 +3044,7 @@ int __kmpc_test_nest_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
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(), (ompt_wait_id_t)lck, codeptr);
__ompt_get_mutex_impl_type(), (omp_wait_id_t)lck, codeptr);
}
#endif
@ -3062,13 +3062,13 @@ int __kmpc_test_nest_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
if (ompt_enabled.ompt_callback_mutex_acquired) {
// lock_first
ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)(
ompt_mutex_nest_lock, (ompt_wait_id_t)lck, codeptr);
ompt_mutex_nest_lock, (omp_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, (ompt_wait_id_t)lck, codeptr);
ompt_mutex_scope_begin, (omp_wait_id_t)lck, codeptr);
}
}
}

View File

@ -482,7 +482,7 @@ OMPT_API_ROUTINE int ompt_get_parallel_info(int ancestor_level,
team_size);
}
OMPT_API_ROUTINE omp_state_t ompt_get_state(ompt_wait_id_t *wait_id) {
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);
if (thread_state == omp_state_undefined) {

View File

@ -81,7 +81,7 @@ typedef struct {
implicit-task-end */
void *return_address; /* stored here on entry of runtime */
omp_state_t state;
ompt_wait_id_t wait_id;
omp_wait_id_t wait_id;
int ompt_task_yielded;
void *idle_frame;
} ompt_thread_info_t;

View File

@ -211,15 +211,15 @@ ompt_data_t *__ompt_get_thread_data_internal() {
void __ompt_thread_assign_wait_id(void *variable) {
kmp_info_t *ti = ompt_get_thread();
ti->th.ompt_thread_info.wait_id = (ompt_wait_id_t)variable;
ti->th.ompt_thread_info.wait_id = (omp_wait_id_t)variable;
}
omp_state_t __ompt_get_state_internal(ompt_wait_id_t *ompt_wait_id) {
omp_state_t __ompt_get_state_internal(omp_wait_id_t *omp_wait_id) {
kmp_info_t *ti = ompt_get_thread();
if (ti) {
if (ompt_wait_id)
*ompt_wait_id = ti->th.ompt_thread_info.wait_id;
if (omp_wait_id)
*omp_wait_id = ti->th.ompt_thread_info.wait_id;
return ti->th.ompt_thread_info.state;
}
return omp_state_undefined;

View File

@ -189,7 +189,7 @@ on_ompt_callback_mutex_acquire(
ompt_mutex_kind_t kind,
unsigned int hint,
unsigned int impl,
ompt_wait_id_t wait_id,
omp_wait_id_t wait_id,
const void *codeptr_ra)
{
switch(kind)
@ -217,7 +217,7 @@ on_ompt_callback_mutex_acquire(
static void
on_ompt_callback_mutex_acquired(
ompt_mutex_kind_t kind,
ompt_wait_id_t wait_id,
omp_wait_id_t wait_id,
const void *codeptr_ra)
{
switch(kind)
@ -245,7 +245,7 @@ on_ompt_callback_mutex_acquired(
static void
on_ompt_callback_mutex_released(
ompt_mutex_kind_t kind,
ompt_wait_id_t wait_id,
omp_wait_id_t wait_id,
const void *codeptr_ra)
{
switch(kind)
@ -273,7 +273,7 @@ on_ompt_callback_mutex_released(
static void
on_ompt_callback_nest_lock(
ompt_scope_endpoint_t endpoint,
ompt_wait_id_t wait_id,
omp_wait_id_t wait_id,
const void *codeptr_ra)
{
switch(endpoint)
@ -447,7 +447,7 @@ on_ompt_callback_lock_init(
ompt_mutex_kind_t kind,
unsigned int hint,
unsigned int impl,
ompt_wait_id_t wait_id,
omp_wait_id_t wait_id,
const void *codeptr_ra)
{
switch(kind)
@ -466,7 +466,7 @@ on_ompt_callback_lock_init(
static void
on_ompt_callback_lock_destroy(
ompt_mutex_kind_t kind,
ompt_wait_id_t wait_id,
omp_wait_id_t wait_id,
const void *codeptr_ra)
{
switch(kind)