Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Mar 2019 13:43:07 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r345233 - head/contrib/openmp/runtime/src
Message-ID:  <201903161343.x2GDh7EW005761@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sat Mar 16 13:43:07 2019
New Revision: 345233
URL: https://svnweb.freebsd.org/changeset/base/345233

Log:
  Merge openmp release_80 branch r356034 (effectively, 8.0.0 rc5).
  
  PR:		236062
  MFC after:	1 month
  X-MFC-With:	r344779

Modified:
  head/contrib/openmp/runtime/src/ompt-general.cpp
Directory Properties:
  head/contrib/openmp/   (props changed)

Modified: head/contrib/openmp/runtime/src/ompt-general.cpp
==============================================================================
--- head/contrib/openmp/runtime/src/ompt-general.cpp	Sat Mar 16 13:42:00 2019	(r345232)
+++ head/contrib/openmp/runtime/src/ompt-general.cpp	Sat Mar 16 13:43:07 2019	(r345233)
@@ -450,9 +450,6 @@ OMPT_API_ROUTINE ompt_set_result_t ompt_set_callback(o
 
 OMPT_API_ROUTINE int ompt_get_callback(ompt_callbacks_t which,
                                        ompt_callback_t *callback) {
-  if (!ompt_enabled.enabled)
-    return ompt_get_callback_failure;
-
   switch (which) {
 
 #define ompt_event_macro(event_name, callback_type, event_id)                  \
@@ -460,7 +457,7 @@ OMPT_API_ROUTINE int ompt_get_callback(ompt_callbacks_
     if (ompt_event_implementation_status(event_name)) {                        \
       ompt_callback_t mycb =                                                   \
           (ompt_callback_t)ompt_callbacks.ompt_callback(event_name);           \
-      if (ompt_enabled.event_name && mycb) {                                   \
+      if (mycb) {                                                              \
         *callback = mycb;                                                      \
         return ompt_get_callback_success;                                      \
       }                                                                        \
@@ -483,15 +480,11 @@ OMPT_API_ROUTINE int ompt_get_callback(ompt_callbacks_
 OMPT_API_ROUTINE int ompt_get_parallel_info(int ancestor_level,
                                             ompt_data_t **parallel_data,
                                             int *team_size) {
-  if (!ompt_enabled.enabled)
-    return 0;
   return __ompt_get_parallel_info_internal(ancestor_level, parallel_data,
                                            team_size);
 }
 
 OMPT_API_ROUTINE int ompt_get_state(ompt_wait_id_t *wait_id) {
-  if (!ompt_enabled.enabled)
-    return ompt_state_work_serial;
   int thread_state = __ompt_get_state_internal(wait_id);
 
   if (thread_state == ompt_state_undefined) {
@@ -506,8 +499,6 @@ OMPT_API_ROUTINE int ompt_get_state(ompt_wait_id_t *wa
  ****************************************************************************/
 
 OMPT_API_ROUTINE ompt_data_t *ompt_get_thread_data(void) {
-  if (!ompt_enabled.enabled)
-    return NULL;
   return __ompt_get_thread_data_internal();
 }
 
@@ -516,8 +507,6 @@ OMPT_API_ROUTINE int ompt_get_task_info(int ancestor_l
                                         ompt_frame_t **task_frame,
                                         ompt_data_t **parallel_data,
                                         int *thread_num) {
-  if (!ompt_enabled.enabled)
-    return 0;
   return __ompt_get_task_info_internal(ancestor_level, type, task_data,
                                        task_frame, parallel_data, thread_num);
 }
@@ -592,7 +581,7 @@ OMPT_API_ROUTINE int ompt_get_place_num(void) {
 #if !KMP_AFFINITY_SUPPORTED
   return -1;
 #else
-  if (!ompt_enabled.enabled || __kmp_get_gtid() < 0)
+  if (__kmp_get_gtid() < 0)
     return -1;
 
   int gtid;
@@ -613,7 +602,7 @@ OMPT_API_ROUTINE int ompt_get_partition_place_nums(int
 #if !KMP_AFFINITY_SUPPORTED
   return 0;
 #else
-  if (!ompt_enabled.enabled || __kmp_get_gtid() < 0)
+  if (__kmp_get_gtid() < 0)
     return 0;
 
   int i, gtid, place_num, first_place, last_place, start, end;
@@ -648,7 +637,7 @@ OMPT_API_ROUTINE int ompt_get_partition_place_nums(int
  ****************************************************************************/
 
 OMPT_API_ROUTINE int ompt_get_proc_id(void) {
-  if (!ompt_enabled.enabled || __kmp_get_gtid() < 0)
+  if (__kmp_get_gtid() < 0)
     return -1;
 #if KMP_OS_LINUX
   return sched_getcpu();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903161343.x2GDh7EW005761>