summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/ompt-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/src/ompt-internal.h')
-rw-r--r--openmp/runtime/src/ompt-internal.h65
1 files changed, 47 insertions, 18 deletions
diff --git a/openmp/runtime/src/ompt-internal.h b/openmp/runtime/src/ompt-internal.h
index 44929efc68a..6139e002f79 100644
--- a/openmp/runtime/src/ompt-internal.h
+++ b/openmp/runtime/src/ompt-internal.h
@@ -13,19 +13,36 @@
#define ompt_callback(e) e##_callback
-typedef struct ompt_callbacks_s {
+typedef struct ompt_callbacks_internal_s {
#define ompt_event_macro(event, callback, eventid) \
callback ompt_callback(event);
FOREACH_OMPT_EVENT(ompt_event_macro)
#undef ompt_event_macro
-} ompt_callbacks_t;
+} ompt_callbacks_internal_t;
+
+typedef struct ompt_callbacks_active_s {
+ unsigned int enabled : 1;
+#define ompt_event_macro(event, callback, eventid) unsigned int event : 1;
+
+ FOREACH_OMPT_EVENT(ompt_event_macro)
+
+#undef ompt_event_macro
+} ompt_callbacks_active_t;
+
+#define TASK_TYPE_DETAILS_FORMAT(info) \
+ ((info->td_flags.task_serial || info->td_flags.tasking_ser) \
+ ? ompt_task_undeferred \
+ : 0x0) | \
+ ((!(info->td_flags.tiedness)) ? ompt_task_untied : 0x0) | \
+ (info->td_flags.final ? ompt_task_final : 0x0) | \
+ (info->td_flags.merged_if0 ? ompt_task_mergeable : 0x0)
typedef struct {
ompt_frame_t frame;
- void *function;
- ompt_task_id_t task_id;
+ ompt_data_t task_data;
+ struct kmp_taskdata *scheduling_parent;
#if OMP_40_ENABLED
int ndeps;
ompt_task_dependence_t *deps;
@@ -33,32 +50,31 @@ typedef struct {
} ompt_task_info_t;
typedef struct {
- ompt_parallel_id_t parallel_id;
- void *microtask;
+ ompt_data_t parallel_data;
+ void *master_return_address;
} ompt_team_info_t;
typedef struct ompt_lw_taskteam_s {
ompt_team_info_t ompt_team_info;
ompt_task_info_t ompt_task_info;
+ int heap;
struct ompt_lw_taskteam_s *parent;
} ompt_lw_taskteam_t;
-typedef struct ompt_parallel_info_s {
- ompt_task_id_t parent_task_id; /* id of parent task */
- ompt_parallel_id_t parallel_id; /* id of parallel region */
- ompt_frame_t *parent_task_frame; /* frame data of parent task */
- void *parallel_function; /* pointer to outlined function */
-} ompt_parallel_info_t;
-
typedef struct {
- ompt_state_t state;
+ ompt_data_t thread_data;
+ ompt_data_t task_data; /* stored here from implicit barrier-begin until
+ implicit-task-end */
+ void *return_address; /* stored here on entry of runtime */
+ omp_state_t state;
ompt_wait_id_t wait_id;
+ int ompt_task_yielded;
void *idle_frame;
} ompt_thread_info_t;
-extern ompt_callbacks_t ompt_callbacks;
+extern ompt_callbacks_internal_t ompt_callbacks;
-#if OMP_40_ENABLED && OMPT_SUPPORT && OMPT_TRACE
+#if OMP_40_ENABLED && OMPT_SUPPORT && OMPT_OPTIONAL
#if USE_FAST_MEMORY
#define KMP_OMPT_DEPS_ALLOC __kmp_fast_allocate
#define KMP_OMPT_DEPS_FREE __kmp_fast_free
@@ -66,7 +82,7 @@ extern ompt_callbacks_t ompt_callbacks;
#define KMP_OMPT_DEPS_ALLOC __kmp_thread_malloc
#define KMP_OMPT_DEPS_FREE __kmp_thread_free
#endif
-#endif /* OMP_40_ENABLED && OMPT_SUPPORT && OMPT_TRACE */
+#endif /* OMP_40_ENABLED && OMPT_SUPPORT && OMPT_OPTIONAL */
#ifdef __cplusplus
extern "C" {
@@ -76,7 +92,20 @@ void ompt_pre_init(void);
void ompt_post_init(void);
void ompt_fini(void);
-extern int ompt_enabled;
+#define OMPT_GET_RETURN_ADDRESS(level) __builtin_return_address(level)
+#define OMPT_GET_FRAME_ADDRESS(level) __builtin_frame_address(level)
+
+int __kmp_control_tool(uint64_t command, uint64_t modifier, void *arg);
+
+extern ompt_callbacks_active_t ompt_enabled;
+
+#if KMP_OS_WINDOWS
+#define UNLIKELY(x) (x)
+#define OMPT_NOINLINE __declspec(noinline)
+#else
+#define UNLIKELY(x) __builtin_expect(!!(x), 0)
+#define OMPT_NOINLINE __attribute__((noinline))
+#endif
#ifdef __cplusplus
};
OpenPOWER on IntegriCloud