[Openmp-commits] [PATCH] D38185: Implementation of OMPT as specified in OpenMP 5.0 Preview 1

Olga Malysheva via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Oct 4 07:14:50 PDT 2017


omalyshe added inline comments.


================
Comment at: runtime/src/kmp_barrier.cpp:1892
+      ompt_data_t *tId =
+          (team) ? &(this_thr->th.th_current_task->ompt_task_info.task_data)
+                 : &(this_thr->th.ompt_thread_info.task_data);
----------------
OMPT_CUR_TASK_DATA(this_thr) is defined for this.


================
Comment at: runtime/src/kmp_csupport.cpp:489
+      this_thr->th.ompt_thread_info.state != omp_state_overhead) {
+    this_thr->th.th_current_task->ompt_task_info.frame.exit_runtime_frame =
+        NULL;
----------------
OMPT_CUR_TASK_INFO () to be used


================
Comment at: runtime/src/kmp_csupport.cpp:494
+          ompt_scope_end, NULL,
+          &(this_thr->th.th_current_task->ompt_task_info.task_data), 1,
+          __kmp_tid_from_gtid(global_tid));
----------------
OMPT_CUR_TASK_DATA(this_thr) is defined for this


================
Comment at: runtime/src/kmp_ftn_entry.h:361
+  ompt_task_info_t *parent_task_info =
+      &(this_thr->th.th_current_task->ompt_task_info);
+  parent_task_info->frame.reenter_runtime_frame = OMPT_GET_FRAME_ADDRESS(1);
----------------
OMPT_CUR_TASK_INFO() to be used


================
Comment at: runtime/src/kmp_runtime.cpp:1209
+    //        if (serial_team->t.t_level > 1)
+    parent_task_info = &(this_thr->th.th_current_task->ompt_task_info);
+    //        else
----------------
OMPT_CUR_TASK_INFO() to be used


================
Comment at: runtime/src/kmp_runtime.cpp:1402
+    implicit_task_data =
+        &(this_thr->th.th_current_task->ompt_task_info.task_data);
+    if (ompt_enabled.ompt_callback_implicit_task) {
----------------
OMPT_CUR_TASK_DATA(this_thr) is defined for this


================
Comment at: runtime/src/kmp_runtime.cpp:7225
+    ompt_data_t *tId =
+        &(this_thr->th.th_current_task->ompt_task_info.task_data);
+    ompt_data_t *pId = &(this_thr->th.th_team->t.ompt_team_info.parallel_data);
----------------
OMPT_CUR_TASK_DATA(this_thr) is defined for this


================
Comment at: runtime/src/kmp_runtime.cpp:7226
+        &(this_thr->th.th_current_task->ompt_task_info.task_data);
+    ompt_data_t *pId = &(this_thr->th.th_team->t.ompt_team_info.parallel_data);
+    this_thr->th.ompt_thread_info.state = omp_state_overhead;
----------------
OMPT_CUR_TEAM_DATA to be used


================
Comment at: runtime/src/kmp_runtime.cpp:7233
+        ompt_callbacks.ompt_callback(ompt_callback_sync_region)))
+        codeptr = this_thr->th.th_team->t.ompt_team_info.master_return_address;
+
----------------
OMPT_CUR_TEAM_INFO() to be used


================
Comment at: runtime/src/kmp_tasking.cpp:1612
+    my_task_data = &(taskdata->ompt_task_info.task_data);
+    my_parallel_data = &(thread->th.th_team->t.ompt_team_info.parallel_data);
+
----------------
OMPT_CUR_TEAM_DATA() to be used


================
Comment at: runtime/src/kmp_wait_release.h:111
+      if (ompt_enabled.ompt_callback_implicit_task) {
+        // don't access *pteam here: it may have already been freed
+        // by the master thread behind the barrier (possible race)
----------------
What is pteam?


================
Comment at: runtime/src/kmp_wait_release.h:225
       } else {
-        pId = this_thr->th.th_team->t.ompt_team_info.parallel_id;
-        tId = this_thr->th.th_current_task->ompt_task_info.task_id;
+        pId = &(this_thr->th.th_team->t.ompt_team_info.parallel_data);
+        tId = &(this_thr->th.th_current_task->ompt_task_info.task_data);
----------------
OMPT_CUR_TEAM_DATA(this_thr) to be used


================
Comment at: runtime/src/kmp_wait_release.h:226
+        pId = &(this_thr->th.th_team->t.ompt_team_info.parallel_data);
+        tId = &(this_thr->th.th_current_task->ompt_task_info.task_data);
       }
----------------
OMPT_CUR_TASK_DATA(this_thr) to be used


================
Comment at: runtime/src/ompt-specific.cpp:295
+    ompt_team_info_t tmp_team = lwt->ompt_team_info;
+    link_lwt->ompt_team_info = thr->th.th_team->t.ompt_team_info;
+    thr->th.th_team->t.ompt_team_info = tmp_team;
----------------
OMPT_CUR_TEAM_INFO(thr) to be used


================
Comment at: runtime/src/ompt-specific.cpp:296
+    link_lwt->ompt_team_info = thr->th.th_team->t.ompt_team_info;
+    thr->th.th_team->t.ompt_team_info = tmp_team;
+
----------------
OMPT_CUR_TEAM_INFO(thr) to be used



================
Comment at: runtime/src/ompt-specific.cpp:300
+    link_lwt->ompt_task_info = thr->th.th_current_task->ompt_task_info;
+    thr->th.th_current_task->ompt_task_info = tmp_task;
+
----------------
OMPT_CUR_TASK_INFO() to be used
(and in the line above)


================
Comment at: runtime/src/ompt-specific.cpp:310
+    // team and drop the taskteam-object
+    thr->th.th_team->t.ompt_team_info = lwt->ompt_team_info;
+    thr->th.th_current_task->ompt_task_info = lwt->ompt_task_info;
----------------
OMPT_CUR_TEAM_INFO(thr) to be used



================
Comment at: runtime/src/ompt-specific.cpp:311
+    thr->th.th_team->t.ompt_team_info = lwt->ompt_team_info;
+    thr->th.th_current_task->ompt_task_info = lwt->ompt_task_info;
+  }
----------------
OMPT_CUR_TASK_INFO() to be used


================
Comment at: runtime/src/ompt-specific.cpp:322
+    ompt_team_info_t tmp_team = lwtask->ompt_team_info;
+    lwtask->ompt_team_info = thr->th.th_team->t.ompt_team_info;
+    thr->th.th_team->t.ompt_team_info = tmp_team;
----------------
OMPT_CUR_TEAM_INFO(thr) to be used



================
Comment at: runtime/src/ompt-specific.cpp:327
+    ompt_task_info_t tmp_task = lwtask->ompt_task_info;
+    lwtask->ompt_task_info = thr->th.th_current_task->ompt_task_info;
+    thr->th.th_current_task->ompt_task_info = tmp_task;
----------------
OMPT_CUR_TASK_INFO() to be used



================
Comment at: runtime/src/ompt-specific.h:57
+
+#define OMPT_PAR_TASK_INFO(thr)                                                \
+  (&(thr->th.th_current_task->td_parent->ompt_task_info))
----------------
never used


================
Comment at: runtime/src/ompt-specific.h:59
+  (&(thr->th.th_current_task->td_parent->ompt_task_info))
+#define OMPT_PAR_TASK_DATA(thr)                                                \
+  (&(thr->th.th_current_task->td_parent->ompt_task_info.task_data))
----------------
never used


================
Comment at: runtime/src/ompt-specific.h:61
+  (&(thr->th.th_current_task->td_parent->ompt_task_info.task_data))
+#define OMPT_PAR_TEAM_INFO(thr)                                                \
+  (&(thr->th.th_team->t.t_parent->t.ompt_team_info))
----------------
never used


================
Comment at: runtime/src/ompt-specific.h:63
+  (&(thr->th.th_team->t.t_parent->t.ompt_team_info))
+#define OMPT_PAR_TEAM_DATA(thr)                                                \
+  (&(thr->th.th_team->t.t_parent->t.ompt_team_info.parallel_data))
----------------
never used


https://reviews.llvm.org/D38185





More information about the Openmp-commits mailing list