[Openmp-commits] [openmp] r266760 - [ITTNOTIFY] Remove serialized parallel regions from frame notification

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Tue Apr 19 09:55:17 PDT 2016


Author: jlpeyton
Date: Tue Apr 19 11:55:17 2016
New Revision: 266760

URL: http://llvm.org/viewvc/llvm-project?rev=266760&view=rev
Log:
[ITTNOTIFY] Remove serialized parallel regions from frame notification

Modified:
    openmp/trunk/runtime/src/kmp.h
    openmp/trunk/runtime/src/kmp_csupport.c
    openmp/trunk/runtime/src/kmp_itt.h
    openmp/trunk/runtime/src/kmp_itt.inl
    openmp/trunk/runtime/src/kmp_runtime.c

Modified: openmp/trunk/runtime/src/kmp.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp.h?rev=266760&r1=266759&r2=266760&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp.h (original)
+++ openmp/trunk/runtime/src/kmp.h Tue Apr 19 11:55:17 2016
@@ -2351,7 +2351,6 @@ typedef struct KMP_ALIGN_CACHE kmp_base_
     kmp_uint64              th_bar_arrive_time;           /* arrival to barrier timestamp */
     kmp_uint64              th_bar_min_time;              /* minimum arrival time at the barrier */
     kmp_uint64              th_frame_time;                /* frame timestamp */
-    kmp_uint64              th_frame_time_serialized;     /* frame timestamp in serialized parallel */
 #endif /* USE_ITT_BUILD */
     kmp_local_t             th_local;
     struct private_common  *th_pri_head;

Modified: openmp/trunk/runtime/src/kmp_csupport.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_csupport.c?rev=266760&r1=266759&r2=266760&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_csupport.c (original)
+++ openmp/trunk/runtime/src/kmp_csupport.c Tue Apr 19 11:55:17 2016
@@ -585,36 +585,6 @@ __kmpc_end_serialized_parallel(ident_t *
         }
     }
 
-#if USE_ITT_BUILD
-    kmp_uint64 cur_time = 0;
-#if  USE_ITT_NOTIFY
-    if ( __itt_get_timestamp_ptr ) {
-        cur_time = __itt_get_timestamp();
-    }
-#endif /* USE_ITT_NOTIFY */
-    if ( this_thr->th.th_team->t.t_level == 0
-#if OMP_40_ENABLED
-        && this_thr->th.th_teams_microtask == NULL
-#endif
-    ) {
-        // Report the barrier
-        this_thr->th.th_ident = loc;
-        if ( ( __itt_frame_submit_v3_ptr || KMP_ITT_DEBUG ) &&
-            ( __kmp_forkjoin_frames_mode == 3 || __kmp_forkjoin_frames_mode == 1 ) )
-        {
-            __kmp_itt_frame_submit( global_tid, this_thr->th.th_frame_time_serialized,
-                                    cur_time, 0, loc, this_thr->th.th_team_nproc, 0 );
-            if ( __kmp_forkjoin_frames_mode == 3 )
-                // Since barrier frame for serialized region is equal to the region we use the same begin timestamp as for the barrier.
-                __kmp_itt_frame_submit( global_tid, serial_team->t.t_region_time,
-                                        cur_time, 0, loc, this_thr->th.th_team_nproc, 2 );
-        } else if ( ( __itt_frame_end_v3_ptr || KMP_ITT_DEBUG ) &&
-            ! __kmp_forkjoin_frames_mode && __kmp_forkjoin_frames )
-            // Mark the end of the "parallel" region for VTune. Only use one of frame notification scheme at the moment.
-            __kmp_itt_region_joined( global_tid, 1 );
-    }
-#endif /* USE_ITT_BUILD */
-
     if ( __kmp_env_consistency_check )
         __kmp_pop_parallel( global_tid, NULL );
 }

Modified: openmp/trunk/runtime/src/kmp_itt.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_itt.h?rev=266760&r1=266759&r2=266760&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_itt.h (original)
+++ openmp/trunk/runtime/src/kmp_itt.h Tue Apr 19 11:55:17 2016
@@ -53,8 +53,8 @@ void __kmp_itt_destroy();
 //     __kmp_itt_xxxed()  function should be called after action.
 
 // --- Parallel region reporting ---
-__kmp_inline void __kmp_itt_region_forking(  int gtid, int team_size, int barriers, int serialized = 0 ); // Master only, before forking threads.
-__kmp_inline void __kmp_itt_region_joined(   int gtid, int serialized = 0 ); // Master only, after joining threads.
+__kmp_inline void __kmp_itt_region_forking(  int gtid, int team_size, int barriers ); // Master only, before forking threads.
+__kmp_inline void __kmp_itt_region_joined(   int gtid ); // Master only, after joining threads.
     // (*) Note: A thread may execute tasks after this point, though.
 
 // --- Frame reporting ---

Modified: openmp/trunk/runtime/src/kmp_itt.inl
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_itt.inl?rev=266760&r1=266759&r2=266760&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_itt.inl (original)
+++ openmp/trunk/runtime/src/kmp_itt.inl Tue Apr 19 11:55:17 2016
@@ -89,10 +89,10 @@ static kmp_bootstrap_lock_t  metadata_lo
 // -------------------------------------------------------------------------------------------------
 
 LINKAGE void
-__kmp_itt_region_forking( int gtid, int team_size, int barriers, int serialized ) {
+__kmp_itt_region_forking( int gtid, int team_size, int barriers ) {
 #if USE_ITT_NOTIFY
     kmp_team_t *      team = __kmp_team_from_gtid( gtid );
-    if (team->t.t_active_level + serialized > 1)
+    if (team->t.t_active_level > 1)
     {
         // The frame notifications are only supported for the outermost teams.
         return;
@@ -176,8 +176,8 @@ __kmp_itt_region_forking( int gtid, int
             }
         }
         KMP_ITT_DEBUG_LOCK();
-        KMP_ITT_DEBUG_PRINT( "[frm beg] gtid=%d, idx=%x, serialized:%d, loc:%p\n",
-                         gtid, loc->reserved_2, serialized, loc );
+        KMP_ITT_DEBUG_PRINT( "[frm beg] gtid=%d, idx=%x, loc:%p\n",
+                         gtid, loc->reserved_2, loc );
     }
 #endif
 } // __kmp_itt_region_forking
@@ -409,10 +409,10 @@ __kmp_itt_region_finished( int gtid ) {
 // -------------------------------------------------------------------------------------------------
 
 LINKAGE void
-__kmp_itt_region_joined( int gtid, int serialized ) {
+__kmp_itt_region_joined( int gtid ) {
 #if USE_ITT_NOTIFY
     kmp_team_t *      team = __kmp_team_from_gtid( gtid );
-    if (team->t.t_active_level + serialized > 1)
+    if (team->t.t_active_level > 1)
     {
         // The frame notifications are only supported for the outermost teams.
         return;
@@ -424,8 +424,8 @@ __kmp_itt_region_joined( int gtid, int s
         if(frm < KMP_MAX_FRAME_DOMAINS) {
             KMP_ITT_DEBUG_LOCK();
             __itt_frame_end_v3(__kmp_itt_region_domains[frm], NULL);
-            KMP_ITT_DEBUG_PRINT( "[frm end] gtid=%d, idx=%x, serialized:%d, loc:%p\n",
-                         gtid, loc->reserved_2, serialized, loc );
+            KMP_ITT_DEBUG_PRINT( "[frm end] gtid=%d, idx=%x, loc:%p\n",
+                         gtid, loc->reserved_2, loc );
         }
     }
 #endif

Modified: openmp/trunk/runtime/src/kmp_runtime.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_runtime.c?rev=266760&r1=266759&r2=266760&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_runtime.c (original)
+++ openmp/trunk/runtime/src/kmp_runtime.c Tue Apr 19 11:55:17 2016
@@ -1374,30 +1374,6 @@ __kmp_serialized_parallel(ident_t *loc,
     if ( __kmp_env_consistency_check )
         __kmp_push_parallel( global_tid, NULL );
 
-#if USE_ITT_BUILD
-    // Mark the start of the "parallel" region for VTune. Only use one of frame notification scheme at the moment
-    if ( serial_team->t.t_level == 1
-#if OMP_40_ENABLED
-        && this_thr->th.th_teams_microtask == NULL
-#endif
-    ) {
-#if USE_ITT_NOTIFY
-        // Save the start of the "parallel" region for VTune. This is the frame begin at the same time.
-        if ( ( __itt_get_timestamp_ptr || KMP_ITT_DEBUG ) &&
-            ( __kmp_forkjoin_frames_mode == 3 || __kmp_forkjoin_frames_mode == 1 ) )
-        {
-             serial_team->t.t_region_time = this_thr->th.th_frame_time_serialized = __itt_get_timestamp();
-        } else // only one notification scheme (either "submit" or "forking/joined", not both)
-#endif
-        if ( ( __itt_frame_begin_v3_ptr || KMP_ITT_DEBUG ) &&
-             __kmp_forkjoin_frames && ! __kmp_forkjoin_frames_mode )
-        {
-            this_thr->th.th_ident = loc;
-            // 0 - no barriers; 1 - serialized parallel
-            __kmp_itt_region_forking( global_tid, this_thr->th.th_team_nproc, 0, 1 );
-        }
-    }
-#endif /* USE_ITT_BUILD */
 }
 
 /* most of the work for a fork */




More information about the Openmp-commits mailing list