[Openmp-commits] [openmp] 3020586 - [OpenMP][OMPT] Fix ifdefs for OMPT code
Joachim Protze via Openmp-commits
openmp-commits at lists.llvm.org
Sun Jul 5 13:51:14 PDT 2020
Author: Joachim Protze
Date: 2020-07-05T22:39:25+02:00
New Revision: 30205865d96aab4a39464674bafe7600fd1dabaa
URL: https://github.com/llvm/llvm-project/commit/30205865d96aab4a39464674bafe7600fd1dabaa
DIFF: https://github.com/llvm/llvm-project/commit/30205865d96aab4a39464674bafe7600fd1dabaa.diff
LOG: [OpenMP][OMPT] Fix ifdefs for OMPT code
Fixes build with LIBOMP_OMPT_SUPPORT=off
Reported by: Jason Edson
Reviewed by: Hahnfeld
Differential Revision: https://reviews.llvm.org/D83171
Added:
Modified:
openmp/runtime/src/kmp_taskdeps.cpp
Removed:
################################################################################
diff --git a/openmp/runtime/src/kmp_taskdeps.cpp b/openmp/runtime/src/kmp_taskdeps.cpp
index f42eea54a84b..a654951f5b3b 100644
--- a/openmp/runtime/src/kmp_taskdeps.cpp
+++ b/openmp/runtime/src/kmp_taskdeps.cpp
@@ -638,9 +638,9 @@ kmp_int32 __kmpc_omp_task_with_deps(ident_t *loc_ref, kmp_int32 gtid,
return ret;
}
+#if OMPT_SUPPORT
void __ompt_taskwait_dep_finish(kmp_taskdata_t *current_task,
ompt_data_t *taskwait_task_data) {
-#if OMPT_SUPPORT
if (ompt_enabled.ompt_callback_task_schedule) {
ompt_data_t task_data = ompt_data_none;
ompt_callbacks.ompt_callback(ompt_callback_task_schedule)(
@@ -652,8 +652,8 @@ void __ompt_taskwait_dep_finish(kmp_taskdata_t *current_task,
}
current_task->ompt_task_info.frame.enter_frame.ptr = NULL;
*taskwait_task_data = ompt_data_none;
-#endif /* OMPT_SUPPORT */
}
+#endif /* OMPT_SUPPORT */
/*!
@ingroup TASKING
@@ -763,7 +763,9 @@ void __kmpc_omp_wait_deps(ident_t *loc_ref, kmp_int32 gtid, kmp_int32 ndeps,
KA_TRACE(10, ("__kmpc_omp_wait_deps(exit): T#%d has no blocking "
"dependencies : loc=%p\n",
gtid, loc_ref));
+#if OMPT_SUPPORT
__ompt_taskwait_dep_finish(current_task, taskwait_task_data);
+#endif /* OMPT_SUPPORT */
return;
}
@@ -776,7 +778,9 @@ void __kmpc_omp_wait_deps(ident_t *loc_ref, kmp_int32 gtid, kmp_int32 ndeps,
KA_TRACE(10, ("__kmpc_omp_wait_deps(exit): T#%d has no blocking "
"dependencies : loc=%p\n",
gtid, loc_ref));
+#if OMPT_SUPPORT
__ompt_taskwait_dep_finish(current_task, taskwait_task_data);
+#endif /* OMPT_SUPPORT */
return;
}
@@ -788,7 +792,9 @@ void __kmpc_omp_wait_deps(ident_t *loc_ref, kmp_int32 gtid, kmp_int32 ndeps,
__kmp_task_stealing_constraint);
}
+#if OMPT_SUPPORT
__ompt_taskwait_dep_finish(current_task, taskwait_task_data);
+#endif /* OMPT_SUPPORT */
KA_TRACE(10, ("__kmpc_omp_wait_deps(exit): T#%d finished waiting : loc=%p\n",
gtid, loc_ref));
}
More information about the Openmp-commits
mailing list