diff options
author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2015-09-21 18:11:22 +0000 |
---|---|---|
committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2015-09-21 18:11:22 +0000 |
commit | b68a85d1f68203ce2d51c83bc43657a1cd21491a (patch) | |
tree | 7eac31f92d23430f516ec9a28c060997a13adc6b /openmp/runtime/src/kmp_dispatch.cpp | |
parent | be58ff82325e8892dc8199f2ca0acba887507895 (diff) | |
download | bcm5719-llvm-b68a85d1f68203ce2d51c83bc43657a1cd21491a.tar.gz bcm5719-llvm-b68a85d1f68203ce2d51c83bc43657a1cd21491a.zip |
[OMPT] Simplify control variable logic for OMPT
Prior to this change, OMPT had a status flag ompt_status, which could take
several values. This was due to an earlier OMPT design that had several levels
of enablement (ready, disabled, tracking state, tracking callbacks). The
current OMPT design has OMPT support either on or off.
This revision replaces ompt_status with a boolean flag ompt_enabled, which
simplifies the runtime logic for OMPT.
Patch by John Mellor-Crummey
Differential Revision: http://reviews.llvm.org/D12999
llvm-svn: 248189
Diffstat (limited to 'openmp/runtime/src/kmp_dispatch.cpp')
-rw-r--r-- | openmp/runtime/src/kmp_dispatch.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openmp/runtime/src/kmp_dispatch.cpp b/openmp/runtime/src/kmp_dispatch.cpp index c0bd71b12d4..a1d0fc44f2b 100644 --- a/openmp/runtime/src/kmp_dispatch.cpp +++ b/openmp/runtime/src/kmp_dispatch.cpp @@ -1209,7 +1209,7 @@ __kmp_dispatch_init( #endif // ( KMP_STATIC_STEAL_ENABLED && USE_STEALING ) #if OMPT_SUPPORT && OMPT_TRACE - if ((ompt_status == ompt_status_track_callback) && + if (ompt_enabled && ompt_callbacks.ompt_callback(ompt_event_loop_begin)) { ompt_team_info_t *team_info = __ompt_get_teaminfo(0, NULL); ompt_task_info_t *task_info = __ompt_get_taskinfo(0); @@ -1373,7 +1373,7 @@ __kmp_dispatch_finish_chunk( int gtid, ident_t *loc ) #if OMPT_SUPPORT && OMPT_TRACE #define OMPT_LOOP_END \ if (status == 0) { \ - if ((ompt_status == ompt_status_track_callback) && \ + if (ompt_enabled && \ ompt_callbacks.ompt_callback(ompt_event_loop_end)) { \ ompt_team_info_t *team_info = __ompt_get_teaminfo(0, NULL); \ ompt_task_info_t *task_info = __ompt_get_taskinfo(0); \ |