[Openmp-commits] [PATCH] D55788: Fix performance regression in SPEC kdtree test

Jonathan Peyton via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Dec 17 13:33:02 PST 2018


jlpeyton created this revision.
jlpeyton added reviewers: AndreyChurbanov, tlwilmar.
jlpeyton added a project: OpenMP.

Make `__ompt_implicit_task_end` a static function and remove the inline part.  This fixes small regression in SPEC kdtree benchmark.  Also reformat some of `__ompt_implicit_task_end`.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D55788

Files:
  runtime/src/kmp_wait_release.h


Index: runtime/src/kmp_wait_release.h
===================================================================
--- runtime/src/kmp_wait_release.h
+++ runtime/src/kmp_wait_release.h
@@ -119,10 +119,10 @@
 };
 
 #if OMPT_SUPPORT
-static inline void __ompt_implicit_task_end(kmp_info_t *this_thr,
-                                            omp_state_t omp_state,
-                                            ompt_data_t *tId,
-                                            ompt_data_t *pId) {
+OMPT_NOINLINE
+static void __ompt_implicit_task_end(kmp_info_t *this_thr,
+                                     omp_state_t omp_state, ompt_data_t *tId,
+                                     ompt_data_t *pId) {
   int ds_tid = this_thr->th.th_info.ds.ds_tid;
   if (omp_state == omp_state_wait_barrier_implicit) {
     this_thr->th.ompt_thread_info.state = omp_state_overhead;
@@ -251,18 +251,15 @@
       ompt_lw_taskteam_t *team =
           this_thr->th.th_team->t.ompt_serialized_team_info;
       if (team) {
-        pId = &(team->ompt_team_info.parallel_data);
         tId = &(team->ompt_task_info.task_data);
       } else {
-        pId = OMPT_CUR_TEAM_DATA(this_thr);
         tId = OMPT_CUR_TASK_DATA(this_thr);
       }
     } else {
-      pId = NULL;
       tId = &(this_thr->th.ompt_thread_info.task_data);
     }
-        if (final_spin && (__kmp_tasking_mode == tskm_immediate_exec ||
-                           this_thr->th.th_task_team == NULL)) {
+    if (final_spin && (__kmp_tasking_mode == tskm_immediate_exec ||
+                       this_thr->th.th_task_team == NULL)) {
       // implicit task is done. Either no taskqueue, or task-team finished
       __ompt_implicit_task_end(this_thr, ompt_entry_state, tId, pId);
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55788.178522.patch
Type: text/x-patch
Size: 1740 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20181217/5bb8bb59/attachment.bin>


More information about the Openmp-commits mailing list