[Openmp-commits] [openmp] r349458 - [OMPT] First chunk of final OMPT 5.0 interface updates
Joachim Protze via Openmp-commits
openmp-commits at lists.llvm.org
Tue Dec 18 00:52:30 PST 2018
Author: jprotze
Date: Tue Dec 18 00:52:30 2018
New Revision: 349458
URL: http://llvm.org/viewvc/llvm-project?rev=349458&view=rev
Log:
[OMPT] First chunk of final OMPT 5.0 interface updates
This patch updates the implementation of the ompt_frame_t, ompt_wait_id_t
and ompt_state_t. The final version of the OpenMP 5.0 spec added the "t"
for these types.
Furthermore the structure for ompt_frame_t changed and allows to specify
that the reenter frame belongs to the runtime.
Patch partially prepared by Simon Convent
Reviewers: hbae
Modified:
openmp/trunk/runtime/src/include/50/ompt.h.var
openmp/trunk/runtime/src/kmp_atomic.h
openmp/trunk/runtime/src/kmp_barrier.cpp
openmp/trunk/runtime/src/kmp_csupport.cpp
openmp/trunk/runtime/src/kmp_ftn_entry.h
openmp/trunk/runtime/src/kmp_gsupport.cpp
openmp/trunk/runtime/src/kmp_lock.cpp
openmp/trunk/runtime/src/kmp_runtime.cpp
openmp/trunk/runtime/src/kmp_taskdeps.cpp
openmp/trunk/runtime/src/kmp_tasking.cpp
openmp/trunk/runtime/src/kmp_wait_release.h
openmp/trunk/runtime/src/ompt-general.cpp
openmp/trunk/runtime/src/ompt-internal.h
openmp/trunk/runtime/src/ompt-specific.cpp
openmp/trunk/runtime/src/ompt-specific.h
openmp/trunk/runtime/test/ompt/callback.h
openmp/trunk/runtime/test/ompt/misc/api_calls_from_other_thread.cpp
openmp/trunk/runtime/test/ompt/misc/api_calls_misc.c
openmp/trunk/runtime/test/ompt/misc/control_tool.c
openmp/trunk/runtime/test/ompt/parallel/nested.c
openmp/trunk/runtime/test/ompt/parallel/nested_thread_num.c
openmp/trunk/runtime/test/ompt/tasks/explicit_task.c
openmp/trunk/runtime/test/ompt/tasks/serialized.c
openmp/trunk/runtime/test/ompt/tasks/task_in_joinbarrier.c
openmp/trunk/runtime/test/ompt/tasks/untied_task.c
Modified: openmp/trunk/runtime/src/include/50/ompt.h.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/50/ompt.h.var?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/50/ompt.h.var (original)
+++ openmp/trunk/runtime/src/include/50/ompt.h.var Tue Dec 18 00:52:30 2018
@@ -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 @@ typedef union ompt_data_t {
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 struct ompt_task_dependence_t {
*---------------------*/
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 @@ typedef enum ompt_thread_t {
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_callback_thread_end_
);
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_implicit_ta
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_schedu
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 @@ typedef void (*ompt_callback_mutex_acqui
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 @@ extern "C" {
***************************************************************************/
/* 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 @@ OMPT_API_FUNCTION(int, ompt_get_task_inf
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
));
Modified: openmp/trunk/runtime/src/kmp_atomic.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_atomic.h?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_atomic.h (original)
+++ openmp/trunk/runtime/src/kmp_atomic.h Tue Dec 18 00:52:30 2018
@@ -364,7 +364,7 @@ static inline void __kmp_acquire_atomic_
#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 @@ static inline void __kmp_acquire_atomic_
#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 @@ static inline void __kmp_release_atomic_
#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
}
Modified: openmp/trunk/runtime/src/kmp_barrier.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_barrier.cpp?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_barrier.cpp (original)
+++ openmp/trunk/runtime/src/kmp_barrier.cpp Tue Dec 18 00:52:30 2018
@@ -1253,7 +1253,7 @@ int __kmp_barrier(enum barrier_type bt,
// 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 @@ int __kmp_barrier(enum barrier_type bt,
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 @@ void __kmp_join_barrier(int gtid) {
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
@@ -1887,12 +1887,12 @@ void __kmp_fork_barrier(int gtid, int ti
#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) &&
Modified: openmp/trunk/runtime/src/kmp_csupport.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_csupport.cpp?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_csupport.cpp (original)
+++ openmp/trunk/runtime/src/kmp_csupport.cpp Tue Dec 18 00:52:30 2018
@@ -293,7 +293,7 @@ void __kmpc_fork_call(ident_t *loc, kmp_
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 @@ void __kmpc_fork_call(ident_t *loc, kmp_
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 @@ void __kmpc_fork_teams(ident_t *loc, kmp
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 @@ void __kmpc_end_serialized_parallel(iden
#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 @@ void __kmpc_end_serialized_parallel(iden
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 @@ void __kmpc_end_serialized_parallel(iden
#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 @@ void __kmpc_barrier(ident_t *loc, kmp_in
}
#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 @@ void __kmpc_barrier(ident_t *loc, kmp_in
__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 @@ void __kmpc_ordered(ident_t *loc, kmp_in
#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 @@ void __kmpc_ordered(ident_t *loc, kmp_in
#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 @@ void __kmpc_end_ordered(ident_t *loc, km
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 @@ void __kmpc_critical(ident_t *loc, kmp_i
#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 @@ void __kmpc_critical(ident_t *loc, kmp_i
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 @@ void __kmpc_critical(ident_t *loc, kmp_i
/* 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 @@ void __kmpc_critical_with_hint(ident_t *
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 @@ void __kmpc_critical_with_hint(ident_t *
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 @@ void __kmpc_critical_with_hint(ident_t *
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 @@ void __kmpc_critical_with_hint(ident_t *
/* 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 @@ void __kmpc_end_critical(ident_t *loc, k
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_int32 __kmpc_barrier_master(ident_t
__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 @@ kmp_int32 __kmpc_barrier_master(ident_t
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 @@ kmp_int32 __kmpc_barrier_master_nowait(i
}
#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_int32 __kmpc_barrier_master_nowait(i
__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
@@ -2059,11 +2059,11 @@ void __kmpc_copyprivate(ident_t *loc, km
*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
@@ -2091,7 +2091,7 @@ void __kmpc_copyprivate(ident_t *loc, km
__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
}
@@ -2189,7 +2189,7 @@ void __kmpc_init_lock_with_hint(ident_t
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
@@ -2213,7 +2213,7 @@ void __kmpc_init_nest_lock_with_hint(ide
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
@@ -2239,7 +2239,7 @@ void __kmpc_init_lock(ident_t *loc, kmp_
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
@@ -2282,7 +2282,7 @@ void __kmpc_init_lock(ident_t *loc, kmp_
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
@@ -2311,7 +2311,7 @@ void __kmpc_init_nest_lock(ident_t *loc,
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
@@ -2357,7 +2357,7 @@ void __kmpc_init_nest_lock(ident_t *loc,
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
@@ -2393,7 +2393,7 @@ void __kmpc_destroy_lock(ident_t *loc, k
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);
@@ -2421,7 +2421,7 @@ void __kmpc_destroy_lock(ident_t *loc, k
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
@@ -2461,7 +2461,7 @@ void __kmpc_destroy_nest_lock(ident_t *l
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);
@@ -2493,7 +2493,7 @@ void __kmpc_destroy_nest_lock(ident_t *l
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
@@ -2538,7 +2538,7 @@ void __kmpc_set_lock(ident_t *loc, kmp_i
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
@@ -2560,7 +2560,7 @@ void __kmpc_set_lock(ident_t *loc, kmp_i
#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
@@ -2593,7 +2593,7 @@ void __kmpc_set_lock(ident_t *loc, kmp_i
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
@@ -2606,7 +2606,7 @@ void __kmpc_set_lock(ident_t *loc, kmp_i
#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
@@ -2628,7 +2628,7 @@ void __kmpc_set_nest_lock(ident_t *loc,
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);
}
}
@@ -2646,13 +2646,13 @@ void __kmpc_set_nest_lock(ident_t *loc,
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);
}
}
}
@@ -2690,7 +2690,7 @@ void __kmpc_set_nest_lock(ident_t *loc,
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
@@ -2707,13 +2707,13 @@ void __kmpc_set_nest_lock(ident_t *loc,
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);
}
}
}
@@ -2749,7 +2749,7 @@ void __kmpc_unset_lock(ident_t *loc, kmp
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
@@ -2778,7 +2778,7 @@ void __kmpc_unset_lock(ident_t *loc, kmp
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
@@ -2810,7 +2810,7 @@ void __kmpc_unset_lock(ident_t *loc, kmp
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
@@ -2838,12 +2838,12 @@ void __kmpc_unset_nest_lock(ident_t *loc
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
@@ -2887,12 +2887,12 @@ void __kmpc_unset_nest_lock(ident_t *loc
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
@@ -2929,12 +2929,12 @@ void __kmpc_unset_nest_lock(ident_t *loc
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
@@ -2960,7 +2960,7 @@ int __kmpc_test_lock(ident_t *loc, kmp_i
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
@@ -2983,7 +2983,7 @@ int __kmpc_test_lock(ident_t *loc, kmp_i
#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;
@@ -3024,7 +3024,7 @@ int __kmpc_test_lock(ident_t *loc, kmp_i
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
@@ -3039,7 +3039,7 @@ int __kmpc_test_lock(ident_t *loc, kmp_i
#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
@@ -3065,7 +3065,7 @@ int __kmpc_test_nest_lock(ident_t *loc,
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
@@ -3083,13 +3083,13 @@ int __kmpc_test_nest_lock(ident_t *loc,
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);
}
}
}
@@ -3130,7 +3130,7 @@ int __kmpc_test_nest_lock(ident_t *loc,
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
@@ -3148,13 +3148,13 @@ int __kmpc_test_nest_lock(ident_t *loc,
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);
}
}
}
@@ -3445,11 +3445,11 @@ __kmpc_reduce_nowait(ident_t *loc, kmp_i
// 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
@@ -3462,7 +3462,7 @@ __kmpc_reduce_nowait(ident_t *loc, kmp_i
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
@@ -3626,11 +3626,11 @@ kmp_int32 __kmpc_reduce(ident_t *loc, km
// 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
@@ -3644,7 +3644,7 @@ kmp_int32 __kmpc_reduce(ident_t *loc, km
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
@@ -3712,11 +3712,11 @@ void __kmpc_end_reduce(ident_t *loc, kmp
// 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
@@ -3726,7 +3726,7 @@ void __kmpc_end_reduce(ident_t *loc, kmp
__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
@@ -3736,11 +3736,11 @@ void __kmpc_end_reduce(ident_t *loc, kmp
// 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
@@ -3750,18 +3750,18 @@ void __kmpc_end_reduce(ident_t *loc, kmp
__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
@@ -3772,7 +3772,7 @@ void __kmpc_end_reduce(ident_t *loc, kmp
__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
Modified: openmp/trunk/runtime/src/kmp_ftn_entry.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_ftn_entry.h?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_ftn_entry.h (original)
+++ openmp/trunk/runtime/src/kmp_ftn_entry.h Tue Dec 18 00:52:30 2018
@@ -361,9 +361,9 @@ int FTN_STDCALL FTN_CONTROL_TOOL(int com
}
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
}
Modified: openmp/trunk/runtime/src/kmp_gsupport.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_gsupport.cpp?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_gsupport.cpp (original)
+++ openmp/trunk/runtime/src/kmp_gsupport.cpp Tue Dec 18 00:52:30 2018
@@ -32,17 +32,17 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_B
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 @@ void *KMP_EXPAND_NAME(KMP_API_NAME_GOMP_
// 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 @@ void *KMP_EXPAND_NAME(KMP_API_NAME_GOMP_
__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 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_S
// 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 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_S
__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 @@ static
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 @@ static
// 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 @@ static
#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 @@ static
#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 @@ static
#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 @@ static
&(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 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_P
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 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_P
#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 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_P
// 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 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_L
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 @@ LOOP_DOACROSS_RUNTIME_START_ULL(
#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 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_T
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 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_T
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 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_T
#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 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_P
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 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_P
#if OMPT_SUPPORT
if (ompt_enabled.enabled) {
- parent_frame->enter_frame = NULL;
+ parent_frame->enter_frame = ompt_data_none;
}
#endif
@@ -1342,17 +1342,17 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_S
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 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_P
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 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_P
#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 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_P
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
}
Modified: openmp/trunk/runtime/src/kmp_lock.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_lock.cpp?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_lock.cpp (original)
+++ openmp/trunk/runtime/src/kmp_lock.cpp Tue Dec 18 00:52:30 2018
@@ -1108,7 +1108,7 @@ __kmp_acquire_queuing_lock_timed_templat
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 @@ __kmp_acquire_queuing_lock_timed_templat
#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 @@ __kmp_acquire_queuing_lock_timed_templat
}
#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
Modified: openmp/trunk/runtime/src/kmp_runtime.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_runtime.cpp?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_runtime.cpp (original)
+++ openmp/trunk/runtime/src/kmp_runtime.cpp Tue Dec 18 00:52:30 2018
@@ -1226,12 +1226,12 @@ void __kmp_serialized_parallel(ident_t *
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;
@@ -1414,8 +1414,8 @@ void __kmp_serialized_parallel(ident_t *
#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,
@@ -1435,8 +1435,8 @@ void __kmp_serialized_parallel(ident_t *
}
/* 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
}
@@ -1505,7 +1505,7 @@ int __kmp_fork_call(ident_t *loc, int gt
#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;
@@ -1545,7 +1545,7 @@ int __kmp_fork_call(ident_t *loc, int gt
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
@@ -1585,7 +1585,7 @@ int __kmp_fork_call(ident_t *loc, int gt
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
@@ -1601,7 +1601,7 @@ int __kmp_fork_call(ident_t *loc, int gt
}
/* 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;
}
@@ -1621,7 +1621,7 @@ int __kmp_fork_call(ident_t *loc, int gt
#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,
@@ -1634,7 +1634,7 @@ int __kmp_fork_call(ident_t *loc, int gt
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;
@@ -1803,7 +1803,7 @@ int __kmp_fork_call(ident_t *loc, int gt
// 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),
@@ -1813,7 +1813,7 @@ int __kmp_fork_call(ident_t *loc, int gt
}
/* 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;
}
@@ -1846,7 +1846,7 @@ int __kmp_fork_call(ident_t *loc, int gt
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) {
@@ -1901,7 +1901,7 @@ int __kmp_fork_call(ident_t *loc, int gt
__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);
@@ -1914,7 +1914,7 @@ int __kmp_fork_call(ident_t *loc, int gt
}
/* 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;
}
@@ -1947,7 +1947,7 @@ int __kmp_fork_call(ident_t *loc, int gt
&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
@@ -1959,7 +1959,7 @@ int __kmp_fork_call(ident_t *loc, int gt
__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
@@ -2223,7 +2223,7 @@ int __kmp_fork_call(ident_t *loc, int gt
&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);
@@ -2304,7 +2304,7 @@ int __kmp_fork_call(ident_t *loc, int gt
#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
@@ -2316,8 +2316,8 @@ static inline void __kmp_join_restore_st
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,
@@ -2330,7 +2330,7 @@ static inline void __kmp_join_ompt(int g
codeptr);
}
- task_info->frame.enter_frame = NULL;
+ task_info->frame.enter_frame = ompt_data_none;
__kmp_join_restore_state(thread, team);
}
#endif
@@ -2365,7 +2365,7 @@ void __kmp_join_call(ident_t *loc, int g
#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
@@ -2544,7 +2544,7 @@ void __kmp_join_call(ident_t *loc, int g
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
@@ -3857,7 +3857,7 @@ int __kmp_register_root(int initial_thre
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)(
@@ -3871,7 +3871,7 @@ int __kmp_register_root(int initial_thre
// 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
@@ -4010,7 +4010,7 @@ void __kmp_unregister_root_current_threa
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));
}
@@ -5670,7 +5670,7 @@ void *__kmp_launch_thread(kmp_info_t *th
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) {
@@ -5682,7 +5682,7 @@ void *__kmp_launch_thread(kmp_info_t *th
#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 */
@@ -5698,7 +5698,7 @@ void *__kmp_launch_thread(kmp_info_t *th
#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
@@ -5718,7 +5718,7 @@ void *__kmp_launch_thread(kmp_info_t *th
#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
@@ -5733,9 +5733,9 @@ void *__kmp_launch_thread(kmp_info_t *th
#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 */
@@ -7029,7 +7029,7 @@ int __kmp_invoke_task_func(int gtid) {
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;
}
@@ -7269,10 +7269,10 @@ void __kmp_internal_join(ident_t *id, in
__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) &&
Modified: openmp/trunk/runtime/src/kmp_taskdeps.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_taskdeps.cpp?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_taskdeps.cpp (original)
+++ openmp/trunk/runtime/src/kmp_taskdeps.cpp Tue Dec 18 00:52:30 2018
@@ -466,9 +466,9 @@ kmp_int32 __kmpc_omp_task_with_deps(iden
#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 @@ kmp_int32 __kmpc_omp_task_with_deps(iden
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 @@ kmp_int32 __kmpc_omp_task_with_deps(iden
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 __kmpc_omp_task_with_deps(iden
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;
Modified: openmp/trunk/runtime/src/kmp_tasking.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_tasking.cpp?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_tasking.cpp (original)
+++ openmp/trunk/runtime/src/kmp_tasking.cpp Tue Dec 18 00:52:30 2018
@@ -547,8 +547,10 @@ static void __kmp_task_start(kmp_int32 g
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 @@ static void __kmpc_omp_task_begin_if0_te
#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);
@@ -966,9 +970,10 @@ static void __kmpc_omp_task_complete_if0
#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
@@ -1462,9 +1467,9 @@ static void __kmp_invoke_task(kmp_int32
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
@@ -1590,7 +1595,7 @@ static void __kmp_invoke_task(kmp_int32
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<true>(gtid, task, current_task);
} else
@@ -1658,7 +1663,7 @@ kmp_int32 __kmpc_omp_task_parts(ident_t
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;
@@ -1727,8 +1732,8 @@ kmp_int32 __kmpc_omp_task(ident_t *loc_r
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;
@@ -1745,7 +1750,7 @@ kmp_int32 __kmpc_omp_task(ident_t *loc_r
__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
@@ -1757,7 +1762,7 @@ kmp_int32 __kmpc_omp_task(ident_t *loc_r
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;
@@ -1791,8 +1796,8 @@ kmp_int32 __kmp_omp_taskloop_task(ident_
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)(
@@ -1812,7 +1817,7 @@ kmp_int32 __kmp_omp_taskloop_task(ident_
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;
@@ -1841,7 +1846,7 @@ static kmp_int32 __kmpc_omp_taskwait_tem
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)(
@@ -1910,7 +1915,7 @@ static kmp_int32 __kmpc_omp_taskwait_tem
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
@@ -1940,7 +1945,7 @@ kmp_int32 __kmpc_omp_taskwait(ident_t *l
#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
Modified: openmp/trunk/runtime/src/kmp_wait_release.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_wait_release.h?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_wait_release.h (original)
+++ openmp/trunk/runtime/src/kmp_wait_release.h Tue Dec 18 00:52:30 2018
@@ -120,12 +120,12 @@ public:
#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 @@ static inline void __ompt_implicit_task_
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 @@ THIS function is called from
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 @@ final_spin=FALSE)
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 @@ final_spin=FALSE)
}
#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
Modified: openmp/trunk/runtime/src/ompt-general.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/ompt-general.cpp?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/src/ompt-general.cpp (original)
+++ openmp/trunk/runtime/src/ompt-general.cpp Tue Dec 18 00:52:30 2018
@@ -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 @@ enum tool_setting_e {
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 @@ void ompt_post_init() {
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 @@ void ompt_post_init() {
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 @@ void ompt_fini() {
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 @@ OMPT_API_ROUTINE int ompt_get_parallel_i
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 ompt_data_t *ompt_get_t
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,
Modified: openmp/trunk/runtime/src/ompt-internal.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/ompt-internal.h?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/src/ompt-internal.h (original)
+++ openmp/trunk/runtime/src/ompt-internal.h Tue Dec 18 00:52:30 2018
@@ -54,7 +54,7 @@ typedef struct ompt_callbacks_active_s {
(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 @@ typedef struct {
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;
Modified: openmp/trunk/runtime/src/ompt-specific.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/ompt-specific.cpp?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/src/ompt-specific.cpp (original)
+++ openmp/trunk/runtime/src/ompt-specific.cpp Tue Dec 18 00:52:30 2018
@@ -211,10 +211,10 @@ ompt_data_t *__ompt_get_thread_data_inte
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_state_t __ompt_get_state_internal(om
*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 @@ void __ompt_lw_taskteam_init(ompt_lw_tas
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 @@ void __ompt_lw_taskteam_unlink(kmp_info_
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)
Modified: openmp/trunk/runtime/src/ompt-specific.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/ompt-specific.h?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/src/ompt-specific.h (original)
+++ openmp/trunk/runtime/src/ompt-specific.h Tue Dec 18 00:52:30 2018
@@ -41,7 +41,7 @@ int __ompt_get_parallel_info_internal(in
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 @@ inline kmp_info_t *ompt_get_thread() {
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;
}
Modified: openmp/trunk/runtime/test/ompt/callback.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/ompt/callback.h?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/test/ompt/callback.h (original)
+++ openmp/trunk/runtime/test/ompt/callback.h Tue Dec 18 00:52:30 2018
@@ -79,7 +79,7 @@ static ompt_enumerate_mutex_impls_t ompt
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 @@ static void print_ids(int level)
"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 @@ on_ompt_callback_mutex_acquire(
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 @@ on_ompt_callback_mutex_acquire(
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 @@ on_ompt_callback_mutex_acquired(
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 @@ on_ompt_callback_mutex_released(
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 @@ on_ompt_callback_lock_init(
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 @@ on_ompt_callback_lock_init(
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 @@ on_ompt_callback_master(
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 @@ static void on_ompt_callback_parallel_be
"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_parallel_en
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 @@ on_ompt_callback_task_create(
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 @@ on_ompt_callback_control_tool(
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
}
Modified: openmp/trunk/runtime/test/ompt/misc/api_calls_from_other_thread.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/ompt/misc/api_calls_from_other_thread.cpp?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/test/ompt/misc/api_calls_from_other_thread.cpp (original)
+++ openmp/trunk/runtime/test/ompt/misc/api_calls_from_other_thread.cpp Tue Dec 18 00:52:30 2018
@@ -31,7 +31,7 @@ void f() {
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));
Modified: openmp/trunk/runtime/test/ompt/misc/api_calls_misc.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/ompt/misc/api_calls_misc.c?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/test/ompt/misc/api_calls_misc.c (original)
+++ openmp/trunk/runtime/test/ompt/misc/api_calls_misc.c Tue Dec 18 00:52:30 2018
@@ -19,7 +19,7 @@ int main() {
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) {
Modified: openmp/trunk/runtime/test/ompt/misc/control_tool.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/ompt/misc/control_tool.c?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/test/ompt/misc/control_tool.c (original)
+++ openmp/trunk/runtime/test/ompt/misc/control_tool.c Tue Dec 18 00:52:30 2018
@@ -22,7 +22,7 @@ int main()
// 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;
Modified: openmp/trunk/runtime/test/ompt/parallel/nested.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/ompt/parallel/nested.c?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/test/ompt/parallel/nested.c (original)
+++ openmp/trunk/runtime/test/ompt/parallel/nested.c Tue Dec 18 00:52:30 2018
@@ -80,25 +80,25 @@ int main()
// 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]]
Modified: openmp/trunk/runtime/test/ompt/parallel/nested_thread_num.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/ompt/parallel/nested_thread_num.c?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/test/ompt/parallel/nested_thread_num.c (original)
+++ openmp/trunk/runtime/test/ompt/parallel/nested_thread_num.c Tue Dec 18 00:52:30 2018
@@ -80,7 +80,7 @@ int main() {
// 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 @@ int main() {
// 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 @@ int main() {
// 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 @@ int main() {
// 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]],
Modified: openmp/trunk/runtime/test/ompt/tasks/explicit_task.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/ompt/tasks/explicit_task.c?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/test/ompt/tasks/explicit_task.c (original)
+++ openmp/trunk/runtime/test/ompt/tasks/explicit_task.c Tue Dec 18 00:52:30 2018
@@ -52,22 +52,22 @@ int main()
// 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 @@ int main()
// 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]]
Modified: openmp/trunk/runtime/test/ompt/tasks/serialized.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/ompt/tasks/serialized.c?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/test/ompt/tasks/serialized.c (original)
+++ openmp/trunk/runtime/test/ompt/tasks/serialized.c Tue Dec 18 00:52:30 2018
@@ -58,7 +58,7 @@ int main() {
// 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 @@ int main() {
// 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 @@ int main() {
// 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 @@ int main() {
// 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
Modified: openmp/trunk/runtime/test/ompt/tasks/task_in_joinbarrier.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/ompt/tasks/task_in_joinbarrier.c?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/test/ompt/tasks/task_in_joinbarrier.c (original)
+++ openmp/trunk/runtime/test/ompt/tasks/task_in_joinbarrier.c Tue Dec 18 00:52:30 2018
@@ -50,16 +50,16 @@ int main()
// 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 @@ int main()
// 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 @@ int main()
// 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]]
Modified: openmp/trunk/runtime/test/ompt/tasks/untied_task.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/ompt/tasks/untied_task.c?rev=349458&r1=349457&r2=349458&view=diff
==============================================================================
--- openmp/trunk/runtime/test/ompt/tasks/untied_task.c (original)
+++ openmp/trunk/runtime/test/ompt/tasks/untied_task.c Tue Dec 18 00:52:30 2018
@@ -60,20 +60,20 @@ int main()
// 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 @@ int main()
// 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]]
More information about the Openmp-commits
mailing list