[Openmp-commits] [openmp] r256314 - Fix build error: OMPT_SUPPORT=true was not tested after hinted lock changes
Jonathan Peyton via Openmp-commits
openmp-commits at lists.llvm.org
Tue Dec 22 18:34:05 PST 2015
Author: jlpeyton
Date: Tue Dec 22 20:34:03 2015
New Revision: 256314
URL: http://llvm.org/viewvc/llvm-project?rev=256314&view=rev
Log:
Fix build error: OMPT_SUPPORT=true was not tested after hinted lock changes
Recent changes to support dynamic locks didn't consider the code compiled when
OMPT_SUPPORT=true. As a result, the OMPT support was broken by recent changes
to nested locks to support dynamic locks. For OMPT to work with dynamic locks,
they need to provide a return code indicating whether a nested lock acquisition
was the first or not.
This patch moves the OMPT support for nested locks into the #else case when
DYNAMIC locks were not used. New support is needed for dynamic locks. This patch
fixes the build and leaves a placeholder where the missing OMPT callbacks can be
added either the author of the OMPT support for locks, or the dynamic
locking support.
Patch by John Mellor-Crummey
Differential Revision: http://reviews.llvm.org/D15656
Modified:
openmp/trunk/runtime/src/kmp_csupport.c
Modified: openmp/trunk/runtime/src/kmp_csupport.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_csupport.c?rev=256314&r1=256313&r2=256314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_csupport.c (original)
+++ openmp/trunk/runtime/src/kmp_csupport.c Tue Dec 22 20:34:03 2015
@@ -2202,6 +2202,12 @@ __kmpc_set_nest_lock( ident_t * loc, kmp
__kmp_itt_lock_acquired((kmp_user_lock_p)user_lock);
#endif
+#if OMPT_SUPPORT && OMPT_TRACE
+ if (ompt_enabled) {
+ // missing support here: need to know whether acquired first or not
+ }
+#endif
+
#else // KMP_USE_DYNAMIC_LOCK
int acquire_status;
kmp_user_lock_p lck;
@@ -2230,7 +2236,6 @@ __kmpc_set_nest_lock( ident_t * loc, kmp
#if USE_ITT_BUILD
__kmp_itt_lock_acquired( lck );
#endif /* USE_ITT_BUILD */
-#endif // KMP_USE_DYNAMIC_LOCK
#if OMPT_SUPPORT && OMPT_TRACE
if (ompt_enabled) {
@@ -2243,6 +2248,8 @@ __kmpc_set_nest_lock( ident_t * loc, kmp
}
}
#endif
+
+#endif // KMP_USE_DYNAMIC_LOCK
}
void
More information about the Openmp-commits
mailing list