diff options
author | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2015-05-06 19:22:36 +0000 |
---|---|---|
committer | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2015-05-06 19:22:36 +0000 |
commit | 51aecb82cdb1031186a345201abe73f4bc5cf90c (patch) | |
tree | 6593303efd46c1276edeeb8109c801b762752834 /openmp/runtime/src/kmp_dispatch.cpp | |
parent | 036181471c86f2801100ce947e4a747a5b3fe16e (diff) | |
download | bcm5719-llvm-51aecb82cdb1031186a345201abe73f4bc5cf90c.tar.gz bcm5719-llvm-51aecb82cdb1031186a345201abe73f4bc5cf90c.zip |
D9302.partial2: cleanup of ittnotify checks, that eliminats redundant notifications in case of nested regions.
llvm-svn: 236631
Diffstat (limited to 'openmp/runtime/src/kmp_dispatch.cpp')
-rw-r--r-- | openmp/runtime/src/kmp_dispatch.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/openmp/runtime/src/kmp_dispatch.cpp b/openmp/runtime/src/kmp_dispatch.cpp index 2cf3d7f42cd..6e93049b9d1 100644 --- a/openmp/runtime/src/kmp_dispatch.cpp +++ b/openmp/runtime/src/kmp_dispatch.cpp @@ -633,6 +633,12 @@ __kmp_dispatch_init( #if USE_ITT_BUILD kmp_uint64 cur_chunk = chunk; + int itt_need_metadata_reporting = __itt_metadata_add_ptr && __kmp_forkjoin_frames_mode == 3 && + KMP_MASTER_GTID(gtid) && +#if OMP_40_ENABLED + th->th.th_teams_microtask == NULL && +#endif + team->t.t_active_level == 1; #endif if ( ! active ) { pr = reinterpret_cast< dispatch_private_info_template< T >* > @@ -869,9 +875,8 @@ __kmp_dispatch_init( } #if USE_ITT_BUILD // Calculate chunk for metadata report - if( __itt_metadata_add_ptr && __kmp_forkjoin_frames_mode == 3 ) { + if ( itt_need_metadata_reporting ) cur_chunk = limit - init + 1; - } #endif if ( st == 1 ) { pr->u.p.lb = lb + init; @@ -1124,16 +1129,10 @@ __kmp_dispatch_init( if ( pr->ordered ) { __kmp_itt_ordered_init( gtid ); }; // if -#endif /* USE_ITT_BUILD */ - }; // if - -#if USE_ITT_BUILD - // Report loop metadata - if( __itt_metadata_add_ptr && __kmp_forkjoin_frames_mode == 3 ) { - kmp_uint32 tid = __kmp_tid_from_gtid( gtid ); - if (KMP_MASTER_TID(tid)) { + // Report loop metadata + if ( itt_need_metadata_reporting ) { + // Only report metadata by master of active team at level 1 kmp_uint64 schedtype = 0; - switch ( schedule ) { case kmp_sch_static_chunked: case kmp_sch_static_balanced:// Chunk is calculated in the switch above @@ -1156,8 +1155,8 @@ __kmp_dispatch_init( } __kmp_itt_metadata_loop(loc, schedtype, tc, cur_chunk); } - } #endif /* USE_ITT_BUILD */ + }; // if #ifdef KMP_DEBUG { |