[Openmp-commits] [openmp] r260674 - [OMPT] Frame information for openmp taskwait

Jonas Hahnfeld via Openmp-commits openmp-commits at lists.llvm.org
Fri Feb 12 04:19:59 PST 2016


Author: hahnfeld
Date: Fri Feb 12 06:19:59 2016
New Revision: 260674

URL: http://llvm.org/viewvc/llvm-project?rev=260674&view=rev
Log:
[OMPT] Frame information for openmp taskwait

For pragma omp taskwait the runtime is called from the task context.
Therefore, the reentry frame information should be updated.

The information should be available for both taskwait event calls; therefore,
set before the first event and reset after the last event.

Patch by Joachim Protze
Differential Revision: http://reviews.llvm.org/D17145

Modified:
    openmp/trunk/runtime/src/kmp_tasking.c

Modified: openmp/trunk/runtime/src/kmp_tasking.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_tasking.c?rev=260674&r1=260673&r2=260674&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_tasking.c (original)
+++ openmp/trunk/runtime/src/kmp_tasking.c Fri Feb 12 06:19:59 2016
@@ -1358,6 +1358,7 @@ __kmpc_omp_taskwait( ident_t *loc_ref, k
             my_task_id = taskdata->ompt_task_info.task_id;
             my_parallel_id = team->t.ompt_team_info.parallel_id;
             
+            taskdata->ompt_task_info.frame.reenter_runtime_frame = __builtin_frame_address(0);
             if (ompt_callbacks.ompt_callback(ompt_event_taskwait_begin)) {
                 ompt_callbacks.ompt_callback(ompt_event_taskwait_begin)(
                                 my_parallel_id, my_task_id);
@@ -1400,10 +1401,12 @@ __kmpc_omp_taskwait( ident_t *loc_ref, k
         taskdata->td_taskwait_thread = - taskdata->td_taskwait_thread;
 
 #if OMPT_SUPPORT && OMPT_TRACE
-        if (ompt_enabled &&
-            ompt_callbacks.ompt_callback(ompt_event_taskwait_end)) {
-            ompt_callbacks.ompt_callback(ompt_event_taskwait_end)(
+        if (ompt_enabled) {
+            if (ompt_callbacks.ompt_callback(ompt_event_taskwait_end)) {
+                ompt_callbacks.ompt_callback(ompt_event_taskwait_end)(
                                 my_parallel_id, my_task_id);
+            }
+            taskdata->ompt_task_info.frame.reenter_runtime_frame = 0;
         }
 #endif
     }




More information about the Openmp-commits mailing list