[Openmp-commits] [openmp] r317435 - Rename fields of ompt_frame_t

Joachim Protze via Openmp-commits openmp-commits at lists.llvm.org
Sun Nov 5 06:11:10 PST 2017


Author: jprotze
Date: Sun Nov  5 06:11:10 2017
New Revision: 317435

URL: http://llvm.org/viewvc/llvm-project?rev=317435&view=rev
Log:
Rename fields of ompt_frame_t

This is part of the renaming of data types from OpenMP TR4 to TR6

Patch by Simon Convent

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

Modified:
    openmp/trunk/runtime/src/include/50/ompt.h.var
    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_runtime.cpp
    openmp/trunk/runtime/src/kmp_taskdeps.cpp
    openmp/trunk/runtime/src/kmp_tasking.cpp
    openmp/trunk/runtime/src/ompt-specific.cpp
    openmp/trunk/runtime/test/ompt/callback.h

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=317435&r1=317434&r2=317435&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/50/ompt.h.var (original)
+++ openmp/trunk/runtime/src/include/50/ompt.h.var Sun Nov  5 06:11:10 2017
@@ -179,9 +179,9 @@ typedef void ompt_device_t;
  * 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;
 
 

Modified: openmp/trunk/runtime/src/kmp_csupport.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_csupport.cpp?rev=317435&r1=317434&r2=317435&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_csupport.cpp (original)
+++ openmp/trunk/runtime/src/kmp_csupport.cpp Sun Nov  5 06:11:10 2017
@@ -288,7 +288,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->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 @@ 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.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 @@ 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_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 @@ void __kmpc_barrier(ident_t *loc, kmp_in
   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 @@ 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->reenter_runtime_frame = NULL;
+    ompt_frame->enter_frame = NULL;
   }
 #endif
 }
@@ -1566,8 +1566,8 @@ kmp_int32 __kmpc_barrier_master(ident_t
   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 @@ 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->reenter_runtime_frame = NULL;
+    ompt_frame->enter_frame = NULL;
   }
 #endif
 
@@ -1628,8 +1628,8 @@ kmp_int32 __kmpc_barrier_master_nowait(i
   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_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->reenter_runtime_frame = NULL;
+    ompt_frame->enter_frame = NULL;
   }
 #endif
 
@@ -1978,8 +1978,8 @@ void __kmpc_copyprivate(ident_t *loc, km
   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 @@ 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->reenter_runtime_frame = NULL;
+    ompt_frame->enter_frame = NULL;
   }
 #endif
 }
@@ -3340,8 +3340,8 @@ __kmpc_reduce_nowait(ident_t *loc, kmp_i
     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 @@ __kmpc_reduce_nowait(ident_t *loc, kmp_i
     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 @@ kmp_int32 __kmpc_reduce(ident_t *loc, km
     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 @@ kmp_int32 __kmpc_reduce(ident_t *loc, km
     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 @@ void __kmpc_end_reduce(ident_t *loc, kmp
     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 @@ 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->reenter_runtime_frame = NULL;
+      ompt_frame->enter_frame = NULL;
     }
 #endif
 
@@ -3611,8 +3611,8 @@ void __kmpc_end_reduce(ident_t *loc, kmp
     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 @@ 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->reenter_runtime_frame = NULL;
+      ompt_frame->enter_frame = NULL;
     }
 #endif
 
@@ -3632,8 +3632,8 @@ void __kmpc_end_reduce(ident_t *loc, kmp
     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 @@ 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->reenter_runtime_frame = NULL;
+      ompt_frame->enter_frame = NULL;
     }
 #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=317435&r1=317434&r2=317435&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_ftn_entry.h (original)
+++ openmp/trunk/runtime/src/kmp_ftn_entry.h Sun Nov  5 06:11:10 2017
@@ -356,9 +356,9 @@ int FTN_STDCALL FTN_CONTROL_TOOL(uint64_
   }
   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
 }

Modified: openmp/trunk/runtime/src/kmp_gsupport.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_gsupport.cpp?rev=317435&r1=317434&r2=317435&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_gsupport.cpp (original)
+++ openmp/trunk/runtime/src/kmp_gsupport.cpp Sun Nov  5 06:11:10 2017
@@ -35,14 +35,14 @@ void xexpand(KMP_API_NAME_GOMP_BARRIER)(
   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 @@ void *xexpand(KMP_API_NAME_GOMP_SINGLE_C
   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 @@ void *xexpand(KMP_API_NAME_GOMP_SINGLE_C
   __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 @@ void xexpand(KMP_API_NAME_GOMP_SINGLE_CO
   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 @@ void xexpand(KMP_API_NAME_GOMP_SINGLE_CO
   __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 @@ static
 
     // 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 @@ static
 #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 @@ static
 
     // 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 @@ static
 #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 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL_
 
   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 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL_
 #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 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL_
       // 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 @@ void xexpand(KMP_API_NAME_GOMP_LOOP_END)
   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 @@ LOOP_NEXT_ULL(xexpand(KMP_API_NAME_GOMP_
   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 @@ void xexpand(KMP_API_NAME_GOMP_TASK)(voi
   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 @@ void xexpand(KMP_API_NAME_GOMP_TASK)(voi
       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 @@ void xexpand(KMP_API_NAME_GOMP_TASK)(voi
 #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 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL_
 
   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 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL_
 
 #if OMPT_SUPPORT
   if (ompt_enabled.enabled) {
-    parent_frame->reenter_runtime_frame = NULL;
+    parent_frame->enter_frame = NULL;
   }
 #endif
 
@@ -1095,14 +1093,14 @@ void xexpand(KMP_API_NAME_GOMP_SECTIONS_
   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 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL)
   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 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL)
 #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 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL)
   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
 }

Modified: openmp/trunk/runtime/src/kmp_runtime.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_runtime.cpp?rev=317435&r1=317434&r2=317435&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_runtime.cpp (original)
+++ openmp/trunk/runtime/src/kmp_runtime.cpp Sun Nov  5 06:11:10 2017
@@ -1205,7 +1205,7 @@ void __kmp_serialized_parallel(ident_t *
     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 @@ void __kmp_serialized_parallel(ident_t *
   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 @@ 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_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 @@ 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_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 @@ 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_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 @@ 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_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 @@ 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_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 @@ 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_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 @@ static inline void __kmp_join_ompt(int g
         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 @@ void __kmp_join_call(ident_t *loc, int g
           __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 @@ 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_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 __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_runtime_frame);
+    exit_runtime_p = &(
+        team->t.t_implicit_task_taskdata[tid].ompt_task_info.frame.exit_frame);
   } else {
     exit_runtime_p = &dummy;
   }

Modified: openmp/trunk/runtime/src/kmp_taskdeps.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_taskdeps.cpp?rev=317435&r1=317434&r2=317435&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_taskdeps.cpp (original)
+++ openmp/trunk/runtime/src/kmp_taskdeps.cpp Sun Nov  5 06:11:10 2017
@@ -489,8 +489,7 @@ kmp_int32 __kmpc_omp_task_with_deps(iden
           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

Modified: openmp/trunk/runtime/src/kmp_tasking.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_tasking.cpp?rev=317435&r1=317434&r2=317435&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_tasking.cpp (original)
+++ openmp/trunk/runtime/src/kmp_tasking.cpp Sun Nov  5 06:11:10 2017
@@ -458,8 +458,8 @@ 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_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 @@ static void __kmpc_omp_task_begin_if0_te
 
 #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 @@ static void __kmpc_omp_task_complete_if0
     __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 @@ static void __kmp_invoke_task(kmp_int32
     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 @@ static void __kmp_invoke_task(kmp_int32
 #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 @@ 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.reenter_runtime_frame = NULL;
+    parent->ompt_task_info.frame.enter_frame = NULL;
   }
 #endif
   return TASK_CURRENT_NOT_QUEUED;
@@ -1551,9 +1550,8 @@ kmp_int32 __kmpc_omp_task(ident_t *loc_r
   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 @@ 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.reenter_runtime_frame = NULL;
+    parent->ompt_task_info.frame.enter_frame = NULL;
   }
 #endif
   return res;
@@ -1602,7 +1600,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.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 @@ 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.reenter_runtime_frame = NULL;
+      taskdata->ompt_task_info.frame.enter_frame = NULL;
     }
 #endif // OMPT_SUPPORT && OMPT_OPTIONAL
 

Modified: openmp/trunk/runtime/src/ompt-specific.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/ompt-specific.cpp?rev=317435&r1=317434&r2=317435&view=diff
==============================================================================
--- openmp/trunk/runtime/src/ompt-specific.cpp (original)
+++ openmp/trunk/runtime/src/ompt-specific.cpp Sun Nov  5 06:11:10 2017
@@ -240,8 +240,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.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;

Modified: openmp/trunk/runtime/test/ompt/callback.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/ompt/callback.h?rev=317435&r1=317434&r2=317435&view=diff
==============================================================================
--- openmp/trunk/runtime/test/ompt/callback.h (original)
+++ openmp/trunk/runtime/test/ompt/callback.h Sun Nov  5 06:11:10 2017
@@ -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_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 @@ 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_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 @@ 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_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 @@ 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_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
 }
 




More information about the Openmp-commits mailing list