From 848d69069780e3483c4e266b8b97823f2f01ae78 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Wed, 14 Sep 2016 13:59:39 +0000 Subject: [OMPT] fix task frame information for gomp interface Previous differencials D23305-D23310 changed task frame information management only for the kmp interface, but not for the whole gomp interface. This broke some testcases when building with gcc. This patch fixes the broken task frame information for the gomp interface. Patch by Joachim Protze! Differential Revision: https://reviews.llvm.org/D24502 llvm-svn: 281468 --- openmp/runtime/src/kmp_csupport.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'openmp/runtime/src/kmp_csupport.c') diff --git a/openmp/runtime/src/kmp_csupport.c b/openmp/runtime/src/kmp_csupport.c index e50f14e78ab..f774ac14c00 100644 --- a/openmp/runtime/src/kmp_csupport.c +++ b/openmp/runtime/src/kmp_csupport.c @@ -346,11 +346,6 @@ __kmpc_fork_call(ident_t *loc, kmp_int32 argc, kmpc_micro microtask, ...) va_end( ap ); -#if OMPT_SUPPORT - if (ompt_enabled) { - ompt_frame->reenter_runtime_frame = NULL; - } -#endif } } @@ -434,13 +429,6 @@ __kmpc_fork_teams(ident_t *loc, kmp_int32 argc, kmpc_micro microtask, ...) #endif ); -#if OMPT_SUPPORT - if (ompt_enabled) { - parent_team->t.t_implicit_task_taskdata[tid]. - ompt_task_info.frame.reenter_runtime_frame = NULL; - } -#endif - this_thr->th.th_teams_microtask = NULL; this_thr->th.th_teams_level = 0; *(kmp_int64*)(&this_thr->th.th_teams_size) = 0L; @@ -688,9 +676,9 @@ __kmpc_barrier(ident_t *loc, kmp_int32 global_tid) #if OMPT_SUPPORT && OMPT_TRACE ompt_frame_t * ompt_frame; if (ompt_enabled ) { - ompt_frame = &( __kmp_threads[ global_tid ] -> th.th_team -> - t.t_implicit_task_taskdata[__kmp_tid_from_gtid(global_tid)].ompt_task_info.frame); - ompt_frame->reenter_runtime_frame = __builtin_frame_address(1); + ompt_frame = __ompt_get_task_frame_internal(0); + if ( ompt_frame->reenter_runtime_frame == NULL ) + ompt_frame->reenter_runtime_frame = __builtin_frame_address(1); } #endif __kmp_threads[ global_tid ]->th.th_ident = loc; -- cgit v1.2.3