summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r--openmp/runtime/src/kmp_config.h.cmake2
-rw-r--r--openmp/runtime/src/kmp_csupport.c2
-rw-r--r--openmp/runtime/src/kmp_runtime.c4
3 files changed, 5 insertions, 3 deletions
diff --git a/openmp/runtime/src/kmp_config.h.cmake b/openmp/runtime/src/kmp_config.h.cmake
index dc37da09a1b..f5ac6f1a0e3 100644
--- a/openmp/runtime/src/kmp_config.h.cmake
+++ b/openmp/runtime/src/kmp_config.h.cmake
@@ -85,7 +85,7 @@
#define KMP_ADJUST_BLOCKTIME 1
#define BUILD_PARALLEL_ORDERED 1
#define KMP_ASM_INTRINS 1
-#define USE_ITT_BUILD 1
+#define USE_ITT_BUILD LIBOMP_USE_ITT_NOTIFY
#define INTEL_ITTNOTIFY_PREFIX __kmp_itt_
#if ! KMP_MIC
# define USE_LOAD_BALANCE 1
diff --git a/openmp/runtime/src/kmp_csupport.c b/openmp/runtime/src/kmp_csupport.c
index a34c8059e8a..75ac2dbeb21 100644
--- a/openmp/runtime/src/kmp_csupport.c
+++ b/openmp/runtime/src/kmp_csupport.c
@@ -507,7 +507,7 @@ __kmpc_end_serialized_parallel(ident_t *loc, kmp_int32 global_tid)
// we need to wait for the proxy tasks before finishing the thread
if ( task_team != NULL && task_team->tt.tt_found_proxy_tasks )
- __kmp_task_team_wait(this_thr, serial_team, NULL ); // is an ITT object needed here?
+ __kmp_task_team_wait(this_thr, serial_team USE_ITT_BUILD_ARG(NULL) ); // is an ITT object needed here?
#endif
KMP_MB();
diff --git a/openmp/runtime/src/kmp_runtime.c b/openmp/runtime/src/kmp_runtime.c
index 56fa1b01542..72ecd7ee6ec 100644
--- a/openmp/runtime/src/kmp_runtime.c
+++ b/openmp/runtime/src/kmp_runtime.c
@@ -3734,7 +3734,9 @@ __kmp_register_root( int initial_thread )
/* prepare the master thread for get_gtid() */
__kmp_gtid_set_specific( gtid );
+#if USE_ITT_BUILD
__kmp_itt_thread_name( gtid );
+#endif /* USE_ITT_BUILD */
#ifdef KMP_TDATA_GTID
__kmp_gtid = gtid;
@@ -3908,7 +3910,7 @@ __kmp_unregister_root_current_thread( int gtid )
// the runtime is shutting down so we won't report any events
thread->th.ompt_thread_info.state = ompt_state_undefined;
#endif
- __kmp_task_team_wait(thread, team, NULL );
+ __kmp_task_team_wait(thread, team USE_ITT_BUILD_ARG(NULL));
}
#endif
OpenPOWER on IntegriCloud