summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2016-02-12 12:19:59 +0000
committerJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2016-02-12 12:19:59 +0000
commit867aa20b1ec9833fd510e7990aa7894a995cb414 (patch)
tree95ac1665d9e9b491709f4ef4a64ce667d07f63ca
parent02f99ea13de2fa61a027b2bb25753be7d942350f (diff)
downloadbcm5719-llvm-867aa20b1ec9833fd510e7990aa7894a995cb414.tar.gz
bcm5719-llvm-867aa20b1ec9833fd510e7990aa7894a995cb414.zip
[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 llvm-svn: 260674
-rw-r--r--openmp/runtime/src/kmp_tasking.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/openmp/runtime/src/kmp_tasking.c b/openmp/runtime/src/kmp_tasking.c
index 9aaef8b2f00..10933f36b80 100644
--- a/openmp/runtime/src/kmp_tasking.c
+++ b/openmp/runtime/src/kmp_tasking.c
@@ -1358,6 +1358,7 @@ __kmpc_omp_taskwait( ident_t *loc_ref, kmp_int32 gtid )
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, kmp_int32 gtid )
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
}
OpenPOWER on IntegriCloud