Index: openmp/trunk/libomptarget/src/omptarget.cpp =================================================================== --- openmp/trunk/libomptarget/src/omptarget.cpp +++ openmp/trunk/libomptarget/src/omptarget.cpp @@ -2200,6 +2200,9 @@ 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"); Index: openmp/trunk/runtime/src/include/50/ompt.h.var =================================================================== --- openmp/trunk/runtime/src/include/50/ompt.h.var +++ openmp/trunk/runtime/src/include/50/ompt.h.var @@ -179,9 +179,9 @@ * ompt_frame_t *---------------------*/ -typedef struct ompt_frame_s { - void *exit_runtime_frame; /* next frame is user code */ - void *reenter_runtime_frame; /* previous frame is user code */ +typedef struct ompt_frame_t { + void *exit_frame; /* next frame is user code */ + void *enter_frame; /* previous frame is user code */ } ompt_frame_t; Index: openmp/trunk/runtime/src/kmp_csupport.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_csupport.cpp +++ openmp/trunk/runtime/src/kmp_csupport.cpp @@ -288,7 +288,7 @@ ompt_frame = &( parent_team->t.t_implicit_task_taskdata[tid].ompt_task_info.frame); } - ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); OMPT_STORE_RETURN_ADDRESS(gtid); } #endif @@ -370,7 +370,7 @@ int tid = __kmp_tid_from_gtid(gtid); if (ompt_enabled.enabled) { parent_team->t.t_implicit_task_taskdata[tid] - .ompt_task_info.frame.reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + .ompt_task_info.frame.enter_frame = OMPT_GET_FRAME_ADDRESS(1); } OMPT_STORE_RETURN_ADDRESS(gtid); #endif @@ -482,7 +482,7 @@ #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_runtime_frame = NULL; + OMPT_CUR_TASK_INFO(this_thr)->frame.exit_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 @@ ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->reenter_runtime_frame == NULL) - ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame == NULL) + ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); OMPT_STORE_RETURN_ADDRESS(global_tid); } #endif @@ -696,7 +696,7 @@ __kmp_barrier(bs_plain_barrier, global_tid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->reenter_runtime_frame = NULL; + ompt_frame->enter_frame = NULL; } #endif } @@ -1566,8 +1566,8 @@ ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->reenter_runtime_frame == NULL) - ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame == NULL) + ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); OMPT_STORE_RETURN_ADDRESS(global_tid); } #endif @@ -1577,7 +1577,7 @@ status = __kmp_barrier(bs_plain_barrier, global_tid, TRUE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->reenter_runtime_frame = NULL; + ompt_frame->enter_frame = NULL; } #endif @@ -1628,8 +1628,8 @@ ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->reenter_runtime_frame == NULL) - ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame == NULL) + ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); OMPT_STORE_RETURN_ADDRESS(global_tid); } #endif @@ -1639,7 +1639,7 @@ __kmp_barrier(bs_plain_barrier, global_tid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->reenter_runtime_frame = NULL; + ompt_frame->enter_frame = NULL; } #endif @@ -1978,8 +1978,8 @@ ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->reenter_runtime_frame == NULL) - ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame == NULL) + ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); OMPT_STORE_RETURN_ADDRESS(gtid); } #endif @@ -2007,7 +2007,7 @@ __kmp_barrier(bs_plain_barrier, gtid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->reenter_runtime_frame = NULL; + ompt_frame->enter_frame = NULL; } #endif } @@ -3340,8 +3340,8 @@ ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->reenter_runtime_frame == NULL) - ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame == NULL) + ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); OMPT_STORE_RETURN_ADDRESS(global_tid); } #endif @@ -3354,7 +3354,7 @@ retval = (retval != 0) ? (0) : (1); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->reenter_runtime_frame = NULL; + ompt_frame->enter_frame = NULL; } #endif @@ -3516,8 +3516,8 @@ ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->reenter_runtime_frame == NULL) - ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame == NULL) + ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); OMPT_STORE_RETURN_ADDRESS(global_tid); } #endif @@ -3531,7 +3531,7 @@ retval = (retval != 0) ? (0) : (1); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->reenter_runtime_frame = NULL; + ompt_frame->enter_frame = NULL; } #endif @@ -3587,8 +3587,8 @@ ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->reenter_runtime_frame == NULL) - ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame == NULL) + ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); OMPT_STORE_RETURN_ADDRESS(global_tid); } #endif @@ -3598,7 +3598,7 @@ __kmp_barrier(bs_plain_barrier, global_tid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->reenter_runtime_frame = NULL; + ompt_frame->enter_frame = NULL; } #endif @@ -3611,8 +3611,8 @@ ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->reenter_runtime_frame == NULL) - ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame == NULL) + ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); OMPT_STORE_RETURN_ADDRESS(global_tid); } #endif @@ -3622,7 +3622,7 @@ __kmp_barrier(bs_plain_barrier, global_tid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->reenter_runtime_frame = NULL; + ompt_frame->enter_frame = NULL; } #endif @@ -3632,8 +3632,8 @@ ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - if (ompt_frame->reenter_runtime_frame == NULL) - ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + if (ompt_frame->enter_frame == NULL) + ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); OMPT_STORE_RETURN_ADDRESS(global_tid); } #endif @@ -3644,7 +3644,7 @@ __kmp_barrier(bs_plain_barrier, global_tid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->reenter_runtime_frame = NULL; + ompt_frame->enter_frame = NULL; } #endif Index: openmp/trunk/runtime/src/kmp_ftn_entry.h =================================================================== --- openmp/trunk/runtime/src/kmp_ftn_entry.h +++ openmp/trunk/runtime/src/kmp_ftn_entry.h @@ -356,9 +356,9 @@ } kmp_info_t *this_thr = __kmp_threads[__kmp_entry_gtid()]; ompt_task_info_t *parent_task_info = OMPT_CUR_TASK_INFO(this_thr); - parent_task_info->frame.reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + parent_task_info->frame.enter_frame = OMPT_GET_FRAME_ADDRESS(1); int ret = __kmp_control_tool(command, modifier, arg); - parent_task_info->frame.reenter_runtime_frame = 0; + parent_task_info->frame.enter_frame = 0; return ret; #endif } Index: openmp/trunk/runtime/src/kmp_gsupport.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_gsupport.cpp +++ openmp/trunk/runtime/src/kmp_gsupport.cpp @@ -35,14 +35,14 @@ ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + ompt_frame->enter_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->reenter_runtime_frame = NULL; + ompt_frame->enter_frame = NULL; } #endif } @@ -181,7 +181,7 @@ ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); OMPT_STORE_RETURN_ADDRESS(gtid); } #endif @@ -198,7 +198,7 @@ __kmp_barrier(bs_plain_barrier, gtid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->reenter_runtime_frame = NULL; + ompt_frame->enter_frame = NULL; } #endif return retval; @@ -217,7 +217,7 @@ ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + ompt_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); OMPT_STORE_RETURN_ADDRESS(gtid); } #endif @@ -230,7 +230,7 @@ __kmp_barrier(bs_plain_barrier, gtid, FALSE, 0, NULL, NULL); #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.enabled) { - ompt_frame->reenter_runtime_frame = NULL; + ompt_frame->enter_frame = NULL; } #endif } @@ -297,7 +297,7 @@ // set task frame __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - ompt_frame->exit_runtime_frame = OMPT_GET_FRAME_ADDRESS(0); + ompt_frame->exit_frame = OMPT_GET_FRAME_ADDRESS(0); } #endif @@ -306,7 +306,7 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { // clear task frame - ompt_frame->exit_runtime_frame = NULL; + ompt_frame->exit_frame = NULL; // restore enclosing state thr->th.ompt_thread_info.state = enclosing_state; @@ -346,7 +346,7 @@ // set task frame __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - ompt_frame->exit_runtime_frame = OMPT_GET_FRAME_ADDRESS(0); + ompt_frame->exit_frame = OMPT_GET_FRAME_ADDRESS(0); } #endif @@ -356,7 +356,7 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { // clear task frame - ompt_frame->exit_runtime_frame = NULL; + ompt_frame->exit_frame = NULL; // reset enclosing state thr->th.ompt_thread_info.state = enclosing_state; @@ -428,7 +428,7 @@ if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &parent_frame, NULL, NULL); - parent_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + parent_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); } OMPT_STORE_RETURN_ADDRESS(gtid); #endif @@ -450,7 +450,7 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &frame, NULL, NULL); - frame->exit_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + frame->exit_frame = OMPT_GET_FRAME_ADDRESS(1); } #endif } @@ -474,7 +474,7 @@ // Implicit task is finished here, in the barrier we might schedule // deferred tasks, // these don't see the implicit task on the stack - OMPT_CUR_TASK_INFO(thr)->frame.exit_runtime_frame = NULL; + OMPT_CUR_TASK_INFO(thr)->frame.exit_frame = NULL; } #endif @@ -641,14 +641,14 @@ ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + ompt_frame->enter_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->reenter_runtime_frame = NULL; + ompt_frame->enter_frame = NULL; } #endif @@ -831,13 +831,13 @@ ompt_frame_t *parent_frame; \ if (ompt_enabled.enabled) { \ __ompt_get_task_info_internal(0, NULL, NULL, &parent_frame, NULL, NULL); \ - parent_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); \ + parent_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); \ } \ OMPT_STORE_RETURN_ADDRESS(gtid); #define OMPT_LOOP_POST() \ if (ompt_enabled.enabled) { \ - parent_frame->reenter_runtime_frame = NULL; \ + parent_frame->enter_frame = NULL; \ } #else @@ -913,8 +913,7 @@ if (ompt_enabled.enabled) { OMPT_STORE_RETURN_ADDRESS(gtid); current_task = __kmp_threads[gtid]->th.th_current_task; - current_task->ompt_task_info.frame.reenter_runtime_frame = - OMPT_GET_FRAME_ADDRESS(1); + current_task->ompt_task_info.frame.enter_frame = OMPT_GET_FRAME_ADDRESS(1); } #endif @@ -950,8 +949,7 @@ 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_runtime_frame = - OMPT_GET_FRAME_ADDRESS(0); + taskdata->ompt_task_info.frame.exit_frame = OMPT_GET_FRAME_ADDRESS(0); OMPT_STORE_RETURN_ADDRESS(gtid); } #endif @@ -963,13 +961,13 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { thread->th.ompt_thread_info = oldInfo; - taskdata->ompt_task_info.frame.exit_runtime_frame = NULL; + taskdata->ompt_task_info.frame.exit_frame = NULL; } #endif } #if OMPT_SUPPORT if (ompt_enabled.enabled) { - current_task->ompt_task_info.frame.reenter_runtime_frame = NULL; + current_task->ompt_task_info.frame.enter_frame = NULL; } #endif @@ -1056,7 +1054,7 @@ if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &parent_frame, NULL, NULL); - parent_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + parent_frame->enter_frame = OMPT_GET_FRAME_ADDRESS(1); } OMPT_STORE_RETURN_ADDRESS(gtid); #endif @@ -1078,7 +1076,7 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { - parent_frame->reenter_runtime_frame = NULL; + parent_frame->enter_frame = NULL; } #endif @@ -1095,14 +1093,14 @@ ompt_frame_t *ompt_frame; if (ompt_enabled.enabled) { __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - ompt_frame->reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + ompt_frame->enter_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->reenter_runtime_frame = NULL; + ompt_frame->enter_frame = NULL; } #endif @@ -1132,7 +1130,7 @@ ompt_task_info_t *parent_task_info, *task_info; if (ompt_enabled.enabled) { parent_task_info = __ompt_get_task_info_object(0); - parent_task_info->frame.reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + parent_task_info->frame.enter_frame = OMPT_GET_FRAME_ADDRESS(1); } OMPT_STORE_RETURN_ADDRESS(gtid); #endif @@ -1152,7 +1150,7 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { task_info = __ompt_get_task_info_object(0); - task_info->frame.exit_runtime_frame = OMPT_GET_FRAME_ADDRESS(0); + task_info->frame.exit_frame = OMPT_GET_FRAME_ADDRESS(0); } #endif task(data); @@ -1164,8 +1162,8 @@ xexpand(KMP_API_NAME_GOMP_PARALLEL_END)(); #if OMPT_SUPPORT if (ompt_enabled.enabled) { - task_info->frame.exit_runtime_frame = NULL; - parent_task_info->frame.reenter_runtime_frame = NULL; + task_info->frame.exit_frame = NULL; + parent_task_info->frame.enter_frame = NULL; } #endif } Index: openmp/trunk/runtime/src/kmp_runtime.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_runtime.cpp +++ openmp/trunk/runtime/src/kmp_runtime.cpp @@ -1205,7 +1205,7 @@ ompt_task_info_t *parent_task_info; parent_task_info = OMPT_CUR_TASK_INFO(this_thr); - parent_task_info->frame.reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + parent_task_info->frame.enter_frame = OMPT_GET_FRAME_ADDRESS(1); if (ompt_enabled.ompt_callback_parallel_begin) { int team_size = 1; @@ -1371,8 +1371,7 @@ 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_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + OMPT_CUR_TASK_INFO(this_thr)->frame.exit_frame = OMPT_GET_FRAME_ADDRESS(1); ompt_lw_taskteam_t lw_taskteam; __ompt_lw_taskteam_init(&lw_taskteam, this_thr, global_tid, @@ -1391,8 +1390,7 @@ /* OMPT state */ this_thr->th.ompt_thread_info.state = omp_state_work_parallel; - OMPT_CUR_TASK_INFO(this_thr) - ->frame.exit_runtime_frame = OMPT_GET_FRAME_ADDRESS(1); + OMPT_CUR_TASK_INFO(this_thr)->frame.exit_frame = OMPT_GET_FRAME_ADDRESS(1); } #endif } @@ -1542,8 +1540,7 @@ if (ompt_enabled.enabled) { __ompt_lw_taskteam_init(&lw_taskteam, master_th, gtid, &ompt_parallel_data, return_address); - exit_runtime_p = - &(lw_taskteam.ompt_task_info.frame.exit_runtime_frame); + exit_runtime_p = &(lw_taskteam.ompt_task_info.frame.exit_frame); __ompt_lw_taskteam_link(&lw_taskteam, master_th, 0); // don't use lw_taskteam after linking. content was swaped @@ -1577,7 +1574,7 @@ #if OMPT_SUPPORT *exit_runtime_p = NULL; if (ompt_enabled.enabled) { - OMPT_CUR_TASK_INFO(master_th)->frame.exit_runtime_frame = NULL; + OMPT_CUR_TASK_INFO(master_th)->frame.exit_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, @@ -1760,7 +1757,7 @@ // don't use lw_taskteam after linking. content was swaped task_info = OMPT_CUR_TASK_INFO(master_th); - exit_runtime_p = &(task_info->frame.exit_runtime_frame); + exit_runtime_p = &(task_info->frame.exit_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), @@ -1860,7 +1857,7 @@ __ompt_lw_taskteam_link(&lw_taskteam, master_th, 0); // don't use lw_taskteam after linking. content was swaped task_info = OMPT_CUR_TASK_INFO(master_th); - exit_runtime_p = &(task_info->frame.exit_runtime_frame); + exit_runtime_p = &(task_info->frame.exit_frame); /* OMPT implicit task begin */ implicit_task_data = OMPT_CUR_TASK_DATA(master_th); @@ -1916,7 +1913,7 @@ __ompt_lw_taskteam_init(&lwt, master_th, gtid, &ompt_parallel_data, return_address); - lwt.ompt_task_info.frame.exit_runtime_frame = NULL; + lwt.ompt_task_info.frame.exit_frame = NULL; __ompt_lw_taskteam_link(&lwt, master_th, 1); // don't use lw_taskteam after linking. content was swaped #endif @@ -2288,7 +2285,7 @@ codeptr); } - task_info->frame.reenter_runtime_frame = NULL; + task_info->frame.enter_frame = NULL; __kmp_join_restore_state(thread, team); } #endif @@ -2502,7 +2499,7 @@ __kmp_tid_from_gtid(gtid)); } - task_info->frame.exit_runtime_frame = NULL; + task_info->frame.exit_frame = NULL; task_info->task_data = ompt_data_none; } #endif @@ -5678,7 +5675,7 @@ #if OMPT_SUPPORT if (ompt_enabled.enabled) { /* no frame set while outside task */ - __ompt_get_task_info_object(0)->frame.exit_runtime_frame = NULL; + __ompt_get_task_info_object(0)->frame.exit_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); @@ -6955,8 +6952,8 @@ int ompt_team_size; if (ompt_enabled.enabled) { - exit_runtime_p = &(team->t.t_implicit_task_taskdata[tid] - .ompt_task_info.frame.exit_runtime_frame); + exit_runtime_p = &( + team->t.t_implicit_task_taskdata[tid].ompt_task_info.frame.exit_frame); } else { exit_runtime_p = &dummy; } Index: openmp/trunk/runtime/src/kmp_taskdeps.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_taskdeps.cpp +++ openmp/trunk/runtime/src/kmp_taskdeps.cpp @@ -489,8 +489,7 @@ OMPT_LOAD_RETURN_ADDRESS(gtid)); } - new_taskdata->ompt_task_info.frame.reenter_runtime_frame = - OMPT_GET_FRAME_ADDRESS(0); + new_taskdata->ompt_task_info.frame.enter_frame = OMPT_GET_FRAME_ADDRESS(0); } #if OMPT_OPTIONAL Index: openmp/trunk/runtime/src/kmp_tasking.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_tasking.cpp +++ openmp/trunk/runtime/src/kmp_tasking.cpp @@ -458,8 +458,8 @@ 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_runtime_frame = NULL; - task->ompt_task_info.frame.reenter_runtime_frame = NULL; + task->ompt_task_info.frame.exit_frame = NULL; + task->ompt_task_info.frame.enter_frame = NULL; #if OMP_40_ENABLED task->ompt_task_info.ndeps = 0; task->ompt_task_info.deps = NULL; @@ -540,9 +540,9 @@ #if OMPT_SUPPORT if (ompt) { - 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 (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 (ompt_enabled.ompt_callback_task_create) { ompt_task_info_t *parent_info = &(current_task->ompt_task_info); @@ -854,7 +854,7 @@ __ompt_task_finish(task, NULL); ompt_frame_t *ompt_frame; __ompt_get_task_info_internal(0, NULL, NULL, &ompt_frame, NULL, NULL); - ompt_frame->reenter_runtime_frame = NULL; + ompt_frame->enter_frame = NULL; } #endif @@ -1314,8 +1314,7 @@ 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_runtime_frame = - OMPT_GET_FRAME_ADDRESS(0); + taskdata->ompt_task_info.frame.exit_frame = OMPT_GET_FRAME_ADDRESS(0); } #endif @@ -1402,7 +1401,7 @@ #if OMPT_SUPPORT if (UNLIKELY(ompt_enabled.enabled)) { thread->th.ompt_thread_info = oldInfo; - taskdata->ompt_task_info.frame.exit_runtime_frame = NULL; + taskdata->ompt_task_info.frame.exit_frame = NULL; } #endif @@ -1483,7 +1482,7 @@ ANNOTATE_HAPPENS_BEFORE(new_task); #if OMPT_SUPPORT if (UNLIKELY(ompt_enabled.enabled)) { - parent->ompt_task_info.frame.reenter_runtime_frame = NULL; + parent->ompt_task_info.frame.enter_frame = NULL; } #endif return TASK_CURRENT_NOT_QUEUED; @@ -1551,9 +1550,8 @@ 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.reenter_runtime_frame) - parent->ompt_task_info.frame.reenter_runtime_frame = - OMPT_GET_FRAME_ADDRESS(1); + if (!parent->ompt_task_info.frame.enter_frame) + parent->ompt_task_info.frame.enter_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)( @@ -1573,7 +1571,7 @@ gtid, loc_ref, new_taskdata)); #if OMPT_SUPPORT if (UNLIKELY(ompt_enabled.enabled && parent != NULL)) { - parent->ompt_task_info.frame.reenter_runtime_frame = NULL; + parent->ompt_task_info.frame.enter_frame = NULL; } #endif return res; @@ -1602,7 +1600,7 @@ my_task_data = &(taskdata->ompt_task_info.task_data); my_parallel_data = OMPT_CUR_TEAM_DATA(thread); - taskdata->ompt_task_info.frame.reenter_runtime_frame = frame_address; + taskdata->ompt_task_info.frame.enter_frame = frame_address; if (ompt_enabled.ompt_callback_sync_region) { ompt_callbacks.ompt_callback(ompt_callback_sync_region)( @@ -1671,7 +1669,7 @@ ompt_sync_region_taskwait, ompt_scope_end, my_parallel_data, my_task_data, return_address); } - taskdata->ompt_task_info.frame.reenter_runtime_frame = NULL; + taskdata->ompt_task_info.frame.enter_frame = NULL; } #endif // OMPT_SUPPORT && OMPT_OPTIONAL Index: openmp/trunk/runtime/src/ompt-specific.cpp =================================================================== --- openmp/trunk/runtime/src/ompt-specific.cpp +++ openmp/trunk/runtime/src/ompt-specific.cpp @@ -240,8 +240,8 @@ lwt->ompt_team_info.parallel_data = *ompt_pid; lwt->ompt_team_info.master_return_address = codeptr; lwt->ompt_task_info.task_data.value = 0; - lwt->ompt_task_info.frame.reenter_runtime_frame = NULL; - lwt->ompt_task_info.frame.exit_runtime_frame = NULL; + lwt->ompt_task_info.frame.enter_frame = NULL; + lwt->ompt_task_info.frame.exit_frame = NULL; lwt->ompt_task_info.scheduling_parent = NULL; lwt->ompt_task_info.deps = NULL; lwt->ompt_task_info.ndeps = 0; Index: openmp/trunk/runtime/test/ompt/callback.h =================================================================== --- openmp/trunk/runtime/test/ompt/callback.h +++ openmp/trunk/runtime/test/ompt/callback.h @@ -50,7 +50,7 @@ int exists_task = ompt_get_task_info(level, NULL, &task_data, &frame, ¶llel_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_runtime_frame, frame->reenter_runtime_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); } 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 @@ 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_runtime_frame, parent_task_frame->reenter_runtime_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_frame, parent_task_frame->enter_frame, parallel_data->value, requested_team_size, codeptr_ra, invoker); } static void @@ -527,7 +527,7 @@ parallel_data->value = ompt_get_unique_id(); } - printf("%" PRIu64 ": ompt_event_task_create: parent_task_id=%" PRIu64 ", parent_task_frame.exit=%p, parent_task_frame.reenter=%p, new_task_id=%" PRIu64 ", codeptr_ra=%p, task_type=%s=%d, has_dependences=%s\n", ompt_get_thread_data()->value, 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"); + 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"); } static void @@ -587,7 +587,7 @@ { 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_runtime_frame, omptTaskFrame->reenter_runtime_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, omptTaskFrame->enter_frame); return 0; //success }