Revert "Rename fields of ompt_frame_t"

This reverts commit r317338 which discarded some recent commits.

llvm-svn: 317347
This commit is contained in:
Jonas Hahnfeld 2017-11-03 18:28:25 +00:00
parent f0a1c65fb0
commit b71424fda5
10 changed files with 106 additions and 101 deletions

View File

@ -2200,9 +2200,6 @@ static int target(int32_t device_id, void *host_ptr, int32_t arg_num,
tgt_args.push_back(TgtPtrBegin);
tgt_offsets.push_back(TgtBaseOffset);
}
// Push omp handle.
tgt_args.push_back((void *)0);
tgt_offsets.push_back(0);
assert(tgt_args.size() == tgt_offsets.size() &&
"Size mismatch in arguments and offsets");

View File

@ -179,9 +179,9 @@ typedef void ompt_device_t;
* ompt_frame_t
*---------------------*/
typedef struct ompt_frame_t {
void *exit_frame; /* next frame is user code */
void *enter_frame; /* previous frame is user code */
typedef struct ompt_frame_s {
void *exit_runtime_frame; /* next frame is user code */
void *reenter_runtime_frame; /* previous frame is user code */
} ompt_frame_t;

View File

@ -288,7 +288,7 @@ void __kmpc_fork_call(ident_t *loc, kmp_int32 argc, kmpc_micro microtask, ...) {
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->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
OMPT_STORE_RETURN_ADDRESS(gtid);
}
#endif
@ -370,7 +370,7 @@ void __kmpc_fork_teams(ident_t *loc, kmp_int32 argc, kmpc_micro microtask,
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.reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
}
OMPT_STORE_RETURN_ADDRESS(gtid);
#endif
@ -482,7 +482,7 @@ void __kmpc_end_serialized_parallel(ident_t *loc, kmp_int32 global_tid) {
#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;
OMPT_CUR_TASK_INFO(this_thr)->frame.exit_runtime_frame = NULL;
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,
@ -680,8 +680,8 @@ void __kmpc_barrier(ident_t *loc, kmp_int32 global_tid) {
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->reenter_runtime_frame == NULL)
ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
OMPT_STORE_RETURN_ADDRESS(global_tid);
}
#endif
@ -696,7 +696,7 @@ void __kmpc_barrier(ident_t *loc, kmp_int32 global_tid) {
__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->reenter_runtime_frame = NULL;
}
#endif
}
@ -1566,8 +1566,8 @@ kmp_int32 __kmpc_barrier_master(ident_t *loc, kmp_int32 global_tid) {
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->reenter_runtime_frame == NULL)
ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
OMPT_STORE_RETURN_ADDRESS(global_tid);
}
#endif
@ -1577,7 +1577,7 @@ kmp_int32 __kmpc_barrier_master(ident_t *loc, kmp_int32 global_tid) {
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->reenter_runtime_frame = NULL;
}
#endif
@ -1628,8 +1628,8 @@ kmp_int32 __kmpc_barrier_master_nowait(ident_t *loc, kmp_int32 global_tid) {
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->reenter_runtime_frame == NULL)
ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
OMPT_STORE_RETURN_ADDRESS(global_tid);
}
#endif
@ -1639,7 +1639,7 @@ kmp_int32 __kmpc_barrier_master_nowait(ident_t *loc, kmp_int32 global_tid) {
__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->reenter_runtime_frame = NULL;
}
#endif
@ -1978,8 +1978,8 @@ void __kmpc_copyprivate(ident_t *loc, kmp_int32 gtid, size_t cpy_size,
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->reenter_runtime_frame == NULL)
ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
OMPT_STORE_RETURN_ADDRESS(gtid);
}
#endif
@ -2007,7 +2007,7 @@ void __kmpc_copyprivate(ident_t *loc, kmp_int32 gtid, size_t cpy_size,
__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->reenter_runtime_frame = NULL;
}
#endif
}
@ -3340,8 +3340,8 @@ __kmpc_reduce_nowait(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars,
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->reenter_runtime_frame == NULL)
ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
OMPT_STORE_RETURN_ADDRESS(global_tid);
}
#endif
@ -3354,7 +3354,7 @@ __kmpc_reduce_nowait(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars,
retval = (retval != 0) ? (0) : (1);
#if OMPT_SUPPORT && OMPT_OPTIONAL
if (ompt_enabled.enabled) {
ompt_frame->enter_frame = NULL;
ompt_frame->reenter_runtime_frame = NULL;
}
#endif
@ -3516,8 +3516,8 @@ kmp_int32 __kmpc_reduce(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars,
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->reenter_runtime_frame == NULL)
ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
OMPT_STORE_RETURN_ADDRESS(global_tid);
}
#endif
@ -3531,7 +3531,7 @@ kmp_int32 __kmpc_reduce(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars,
retval = (retval != 0) ? (0) : (1);
#if OMPT_SUPPORT && OMPT_OPTIONAL
if (ompt_enabled.enabled) {
ompt_frame->enter_frame = NULL;
ompt_frame->reenter_runtime_frame = NULL;
}
#endif
@ -3587,8 +3587,8 @@ void __kmpc_end_reduce(ident_t *loc, kmp_int32 global_tid,
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->reenter_runtime_frame == NULL)
ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
OMPT_STORE_RETURN_ADDRESS(global_tid);
}
#endif
@ -3598,7 +3598,7 @@ void __kmpc_end_reduce(ident_t *loc, kmp_int32 global_tid,
__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->reenter_runtime_frame = NULL;
}
#endif
@ -3611,8 +3611,8 @@ void __kmpc_end_reduce(ident_t *loc, kmp_int32 global_tid,
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->reenter_runtime_frame == NULL)
ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
OMPT_STORE_RETURN_ADDRESS(global_tid);
}
#endif
@ -3622,7 +3622,7 @@ void __kmpc_end_reduce(ident_t *loc, kmp_int32 global_tid,
__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->reenter_runtime_frame = NULL;
}
#endif
@ -3632,8 +3632,8 @@ void __kmpc_end_reduce(ident_t *loc, kmp_int32 global_tid,
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->reenter_runtime_frame == NULL)
ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
OMPT_STORE_RETURN_ADDRESS(global_tid);
}
#endif
@ -3644,7 +3644,7 @@ void __kmpc_end_reduce(ident_t *loc, kmp_int32 global_tid,
__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->reenter_runtime_frame = NULL;
}
#endif

View File

@ -356,9 +356,9 @@ int FTN_STDCALL FTN_CONTROL_TOOL(uint64_t command, uint64_t modifier,
}
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.reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
int ret = __kmp_control_tool(command, modifier, arg);
parent_task_info->frame.enter_frame = 0;
parent_task_info->frame.reenter_runtime_frame = 0;
return ret;
#endif
}

View File

@ -35,14 +35,14 @@ void xexpand(KMP_API_NAME_GOMP_BARRIER)(void) {
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->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
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->reenter_runtime_frame = NULL;
}
#endif
}
@ -181,7 +181,7 @@ void *xexpand(KMP_API_NAME_GOMP_SINGLE_COPY_START)(void) {
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->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
OMPT_STORE_RETURN_ADDRESS(gtid);
}
#endif
@ -198,7 +198,7 @@ void *xexpand(KMP_API_NAME_GOMP_SINGLE_COPY_START)(void) {
__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->reenter_runtime_frame = NULL;
}
#endif
return retval;
@ -217,7 +217,7 @@ void xexpand(KMP_API_NAME_GOMP_SINGLE_COPY_END)(void *data) {
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->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
OMPT_STORE_RETURN_ADDRESS(gtid);
}
#endif
@ -230,7 +230,7 @@ void xexpand(KMP_API_NAME_GOMP_SINGLE_COPY_END)(void *data) {
__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->reenter_runtime_frame = NULL;
}
#endif
}
@ -297,7 +297,7 @@ static
// 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_runtime_frame = 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_runtime_frame = NULL;
// restore enclosing state
thr->th.ompt_thread_info.state = enclosing_state;
@ -346,7 +346,7 @@ static
// 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_runtime_frame = OMPT_GET_FRAME_ADDRESS(0);
}
#endif
@ -356,7 +356,7 @@ static
#if OMPT_SUPPORT
if (ompt_enabled.enabled) {
// clear task frame
ompt_frame->exit_frame = NULL;
ompt_frame->exit_runtime_frame = NULL;
// reset enclosing state
thr->th.ompt_thread_info.state = enclosing_state;
@ -428,7 +428,7 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL_START)(void (*task)(void *), void *data,
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->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
}
OMPT_STORE_RETURN_ADDRESS(gtid);
#endif
@ -450,7 +450,7 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL_START)(void (*task)(void *), void *data,
#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_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
}
#endif
}
@ -474,7 +474,7 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL_END)(void) {
// 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_runtime_frame = NULL;
}
#endif
@ -641,14 +641,14 @@ void xexpand(KMP_API_NAME_GOMP_LOOP_END)(void) {
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->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
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->reenter_runtime_frame = NULL;
}
#endif
@ -831,13 +831,13 @@ LOOP_NEXT_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT),
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->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); \
} \
OMPT_STORE_RETURN_ADDRESS(gtid);
#define OMPT_LOOP_POST() \
if (ompt_enabled.enabled) { \
parent_frame->enter_frame = NULL; \
parent_frame->reenter_runtime_frame = NULL; \
}
#else
@ -913,7 +913,8 @@ void xexpand(KMP_API_NAME_GOMP_TASK)(void (*func)(void *), void *data,
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.reenter_runtime_frame =
OMPT_GET_FRAME_ADDRESS(1);
}
#endif
@ -949,7 +950,8 @@ void xexpand(KMP_API_NAME_GOMP_TASK)(void (*func)(void *), void *data,
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);
taskdata->ompt_task_info.frame.exit_runtime_frame =
OMPT_GET_FRAME_ADDRESS(0);
OMPT_STORE_RETURN_ADDRESS(gtid);
}
#endif
@ -961,13 +963,13 @@ void xexpand(KMP_API_NAME_GOMP_TASK)(void (*func)(void *), void *data,
#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_runtime_frame = NULL;
}
#endif
}
#if OMPT_SUPPORT
if (ompt_enabled.enabled) {
current_task->ompt_task_info.frame.enter_frame = NULL;
current_task->ompt_task_info.frame.reenter_runtime_frame = NULL;
}
#endif
@ -1054,7 +1056,7 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL_SECTIONS_START)(void (*task)(void *),
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->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
}
OMPT_STORE_RETURN_ADDRESS(gtid);
#endif
@ -1076,7 +1078,7 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL_SECTIONS_START)(void (*task)(void *),
#if OMPT_SUPPORT
if (ompt_enabled.enabled) {
parent_frame->enter_frame = NULL;
parent_frame->reenter_runtime_frame = NULL;
}
#endif
@ -1093,14 +1095,14 @@ void xexpand(KMP_API_NAME_GOMP_SECTIONS_END)(void) {
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->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
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->reenter_runtime_frame = NULL;
}
#endif
@ -1130,7 +1132,7 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL)(void (*task)(void *), void *data,
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.reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
}
OMPT_STORE_RETURN_ADDRESS(gtid);
#endif
@ -1150,7 +1152,7 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL)(void (*task)(void *), void *data,
#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_runtime_frame = OMPT_GET_FRAME_ADDRESS(0);
}
#endif
task(data);
@ -1162,8 +1164,8 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL)(void (*task)(void *), void *data,
xexpand(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_runtime_frame = NULL;
parent_task_info->frame.reenter_runtime_frame = NULL;
}
#endif
}

View File

@ -1205,7 +1205,7 @@ void __kmp_serialized_parallel(ident_t *loc, kmp_int32 global_tid) {
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.reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
if (ompt_enabled.ompt_callback_parallel_begin) {
int team_size = 1;
@ -1371,7 +1371,8 @@ void __kmp_serialized_parallel(ident_t *loc, kmp_int32 global_tid) {
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);
OMPT_CUR_TASK_INFO(this_thr)
->frame.exit_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
ompt_lw_taskteam_t lw_taskteam;
__ompt_lw_taskteam_init(&lw_taskteam, this_thr, global_tid,
@ -1390,7 +1391,8 @@ void __kmp_serialized_parallel(ident_t *loc, kmp_int32 global_tid) {
/* 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);
OMPT_CUR_TASK_INFO(this_thr)
->frame.exit_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
}
#endif
}
@ -1540,7 +1542,8 @@ int __kmp_fork_call(ident_t *loc, int gtid,
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_runtime_frame);
__ompt_lw_taskteam_link(&lw_taskteam, master_th, 0);
// don't use lw_taskteam after linking. content was swaped
@ -1574,7 +1577,7 @@ int __kmp_fork_call(ident_t *loc, int gtid,
#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_runtime_frame = NULL;
if (ompt_enabled.ompt_callback_implicit_task) {
ompt_callbacks.ompt_callback(ompt_callback_implicit_task)(
ompt_scope_end, NULL, implicit_task_data, 1,
@ -1757,7 +1760,7 @@ int __kmp_fork_call(ident_t *loc, int gtid,
// 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_runtime_frame);
if (ompt_enabled.ompt_callback_implicit_task) {
ompt_callbacks.ompt_callback(ompt_callback_implicit_task)(
ompt_scope_begin, OMPT_CUR_TEAM_DATA(master_th),
@ -1857,7 +1860,7 @@ int __kmp_fork_call(ident_t *loc, int gtid,
__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_runtime_frame);
/* OMPT implicit task begin */
implicit_task_data = OMPT_CUR_TASK_DATA(master_th);
@ -1913,7 +1916,7 @@ int __kmp_fork_call(ident_t *loc, int gtid,
__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_runtime_frame = NULL;
__ompt_lw_taskteam_link(&lwt, master_th, 1);
// don't use lw_taskteam after linking. content was swaped
#endif
@ -2285,7 +2288,7 @@ static inline void __kmp_join_ompt(int gtid, kmp_info_t *thread,
codeptr);
}
task_info->frame.enter_frame = NULL;
task_info->frame.reenter_runtime_frame = NULL;
__kmp_join_restore_state(thread, team);
}
#endif
@ -2499,7 +2502,7 @@ void __kmp_join_call(ident_t *loc, int gtid
__kmp_tid_from_gtid(gtid));
}
task_info->frame.exit_frame = NULL;
task_info->frame.exit_runtime_frame = NULL;
task_info->task_data = ompt_data_none;
}
#endif
@ -5675,7 +5678,7 @@ void *__kmp_launch_thread(kmp_info_t *this_thr) {
#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_runtime_frame = NULL;
this_thr->th.ompt_thread_info.state = omp_state_overhead;
this_thr->th.ompt_thread_info.task_data = *OMPT_CUR_TASK_DATA(this_thr);
@ -6952,8 +6955,8 @@ int __kmp_invoke_task_func(int gtid) {
int ompt_team_size;
if (ompt_enabled.enabled) {
exit_runtime_p = &(
team->t.t_implicit_task_taskdata[tid].ompt_task_info.frame.exit_frame);
exit_runtime_p = &(team->t.t_implicit_task_taskdata[tid]
.ompt_task_info.frame.exit_runtime_frame);
} else {
exit_runtime_p = &dummy;
}

View File

@ -489,7 +489,8 @@ kmp_int32 __kmpc_omp_task_with_deps(ident_t *loc_ref, kmp_int32 gtid,
OMPT_LOAD_RETURN_ADDRESS(gtid));
}
new_taskdata->ompt_task_info.frame.enter_frame = OMPT_GET_FRAME_ADDRESS(0);
new_taskdata->ompt_task_info.frame.reenter_runtime_frame =
OMPT_GET_FRAME_ADDRESS(0);
}
#if OMPT_OPTIONAL

View File

@ -458,8 +458,8 @@ static void __kmp_task_start(kmp_int32 gtid, kmp_task_t *task,
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_runtime_frame = NULL;
task->ompt_task_info.frame.reenter_runtime_frame = NULL;
#if OMP_40_ENABLED
task->ompt_task_info.ndeps = 0;
task->ompt_task_info.deps = NULL;
@ -540,9 +540,9 @@ static void __kmpc_omp_task_begin_if0_template(ident_t *loc_ref, kmp_int32 gtid,
#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.reenter_runtime_frame == NULL) {
current_task->ompt_task_info.frame.reenter_runtime_frame =
taskdata->ompt_task_info.frame.exit_runtime_frame = frame_address;
}
if (ompt_enabled.ompt_callback_task_create) {
ompt_task_info_t *parent_info = &(current_task->ompt_task_info);
@ -854,7 +854,7 @@ static void __kmpc_omp_task_complete_if0_template(ident_t *loc_ref,
__ompt_task_finish(task, NULL);
ompt_frame_t *ompt_frame;
__ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL);
ompt_frame->enter_frame = NULL;
ompt_frame->reenter_runtime_frame = NULL;
}
#endif
@ -1314,7 +1314,8 @@ static void __kmp_invoke_task(kmp_int32 gtid, kmp_task_t *task,
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);
taskdata->ompt_task_info.frame.exit_runtime_frame =
OMPT_GET_FRAME_ADDRESS(0);
}
#endif
@ -1401,7 +1402,7 @@ static void __kmp_invoke_task(kmp_int32 gtid, kmp_task_t *task,
#if OMPT_SUPPORT
if (UNLIKELY(ompt_enabled.enabled)) {
thread->th.ompt_thread_info = oldInfo;
taskdata->ompt_task_info.frame.exit_frame = NULL;
taskdata->ompt_task_info.frame.exit_runtime_frame = NULL;
}
#endif
@ -1482,7 +1483,7 @@ kmp_int32 __kmpc_omp_task_parts(ident_t *loc_ref, kmp_int32 gtid,
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.reenter_runtime_frame = NULL;
}
#endif
return TASK_CURRENT_NOT_QUEUED;
@ -1550,8 +1551,9 @@ kmp_int32 __kmpc_omp_task(ident_t *loc_ref, kmp_int32 gtid,
if (UNLIKELY(ompt_enabled.enabled && !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.reenter_runtime_frame)
parent->ompt_task_info.frame.reenter_runtime_frame =
OMPT_GET_FRAME_ADDRESS(1);
if (ompt_enabled.ompt_callback_task_create) {
ompt_data_t task_data = ompt_data_none;
ompt_callbacks.ompt_callback(ompt_callback_task_create)(
@ -1571,7 +1573,7 @@ kmp_int32 __kmpc_omp_task(ident_t *loc_ref, kmp_int32 gtid,
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.reenter_runtime_frame = NULL;
}
#endif
return res;
@ -1600,7 +1602,7 @@ static kmp_int32 __kmpc_omp_taskwait_template(ident_t *loc_ref, kmp_int32 gtid,
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.reenter_runtime_frame = frame_address;
if (ompt_enabled.ompt_callback_sync_region) {
ompt_callbacks.ompt_callback(ompt_callback_sync_region)(
@ -1669,7 +1671,7 @@ static kmp_int32 __kmpc_omp_taskwait_template(ident_t *loc_ref, kmp_int32 gtid,
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.reenter_runtime_frame = NULL;
}
#endif // OMPT_SUPPORT && OMPT_OPTIONAL

View File

@ -240,8 +240,8 @@ void __ompt_lw_taskteam_init(ompt_lw_taskteam_t *lwt, kmp_info_t *thr, int gtid,
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.reenter_runtime_frame = NULL;
lwt->ompt_task_info.frame.exit_runtime_frame = NULL;
lwt->ompt_task_info.scheduling_parent = NULL;
lwt->ompt_task_info.deps = NULL;
lwt->ompt_task_info.ndeps = 0;

View File

@ -50,7 +50,7 @@ static void print_ids(int level)
int exists_task = ompt_get_task_info(level, NULL, &task_data, &frame, &parallel_data, NULL);
if (frame)
{
printf("%" PRIu64 ": task level %d: parallel_id=%" PRIu64 ", task_id=%" PRIu64 ", exit_frame=%p, reenter_frame=%p\n", ompt_get_thread_data()->value, level, exists_task ? parallel_data->value : 0, exists_task ? task_data->value : 0, frame->exit_frame, frame->enter_frame);
printf("%" PRIu64 ": task level %d: parallel_id=%" PRIu64 ", task_id=%" PRIu64 ", exit_frame=%p, reenter_frame=%p\n", ompt_get_thread_data()->value, level, exists_task ? parallel_data->value : 0, exists_task ? task_data->value : 0, frame->exit_runtime_frame, frame->reenter_runtime_frame);
}
else
printf("%" PRIu64 ": task level %d: parallel_id=%" PRIu64 ", task_id=%" PRIu64 ", frame=%p\n", ompt_get_thread_data()->value, level, exists_task ? parallel_data->value : 0, exists_task ? task_data->value : 0, frame);
@ -487,7 +487,7 @@ on_ompt_callback_parallel_begin(
if(parallel_data->ptr)
printf("%s\n", "0: parallel_data initially not null");
parallel_data->value = ompt_get_unique_id();
printf("%" PRIu64 ": ompt_event_parallel_begin: parent_task_id=%" PRIu64 ", parent_task_frame.exit=%p, parent_task_frame.reenter=%p, parallel_id=%" PRIu64 ", requested_team_size=%" PRIu32 ", codeptr_ra=%p, invoker=%d\n", ompt_get_thread_data()->value, parent_task_data->value, parent_task_frame->exit_frame, parent_task_frame->enter_frame, parallel_data->value, requested_team_size, codeptr_ra, invoker);
printf("%" PRIu64 ": ompt_event_parallel_begin: parent_task_id=%" PRIu64 ", parent_task_frame.exit=%p, parent_task_frame.reenter=%p, parallel_id=%" PRIu64 ", requested_team_size=%" PRIu32 ", codeptr_ra=%p, invoker=%d\n", ompt_get_thread_data()->value, parent_task_data->value, parent_task_frame->exit_runtime_frame, parent_task_frame->reenter_runtime_frame, parallel_data->value, requested_team_size, codeptr_ra, invoker);
}
static void
@ -527,7 +527,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, parent_task_data ? parent_task_data->value : 0, parent_frame ? parent_frame->exit_frame : NULL, parent_frame ? parent_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, parent_task_data ? parent_task_data->value : 0, parent_frame ? parent_frame->exit_runtime_frame : NULL, parent_frame ? parent_frame->reenter_runtime_frame : NULL, new_task_data->value, codeptr_ra, buffer, type, has_dependences ? "yes" : "no");
}
static void
@ -587,7 +587,7 @@ on_ompt_callback_control_tool(
{
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_runtime_frame, omptTaskFrame->reenter_runtime_frame);
return 0; //success
}