svn commit: r345156 - vendor/llvm-openmp/dist-release_80/runtime/src
Dimitry Andric
dim at FreeBSD.org
Thu Mar 14 20:32:47 UTC 2019
Author: dim
Date: Thu Mar 14 20:32:46 2019
New Revision: 345156
URL: https://svnweb.freebsd.org/changeset/base/345156
Log:
Vendor import of LLVM openmp release_80 branch r356034:
https://llvm.org/svn/llvm-project/openmp/branches/release_80@356034
Modified:
vendor/llvm-openmp/dist-release_80/runtime/src/ompt-general.cpp
Modified: vendor/llvm-openmp/dist-release_80/runtime/src/ompt-general.cpp
==============================================================================
--- vendor/llvm-openmp/dist-release_80/runtime/src/ompt-general.cpp Thu Mar 14 20:11:46 2019 (r345155)
+++ vendor/llvm-openmp/dist-release_80/runtime/src/ompt-general.cpp Thu Mar 14 20:32:46 2019 (r345156)
@@ -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();
More information about the svn-src-all
mailing list