27 #define FOREACH_OMPT_INQUIRY_FN(macro) \
28 macro (ompt_enumerate_states) \
29 macro (ompt_enumerate_mutex_impls) \
31 macro (ompt_set_callback) \
32 macro (ompt_get_callback) \
34 macro (ompt_get_state) \
36 macro (ompt_get_parallel_info) \
37 macro (ompt_get_task_info) \
38 macro (ompt_get_task_memory) \
39 macro (ompt_get_thread_data) \
40 macro (ompt_get_unique_id) \
41 macro (ompt_finalize_tool) \
43 macro(ompt_get_num_procs) \
44 macro(ompt_get_num_places) \
45 macro(ompt_get_place_proc_ids) \
46 macro(ompt_get_place_num) \
47 macro(ompt_get_partition_place_nums) \
48 macro(ompt_get_proc_id) \
50 macro(ompt_get_target_info) \
51 macro(ompt_get_num_devices)
53 #define FOREACH_OMPT_STATE(macro) \
56 macro (ompt_state_undefined, 0x102) \
59 macro (ompt_state_work_serial, 0x000) \
60 macro (ompt_state_work_parallel, 0x001) \
61 macro (ompt_state_work_reduction, 0x002) \
64 macro (ompt_state_wait_barrier, 0x010) \
65 macro (ompt_state_wait_barrier_implicit_parallel, 0x011) \
67 macro (ompt_state_wait_barrier_implicit_workshare, 0x012) \
69 macro (ompt_state_wait_barrier_implicit, 0x013) \
70 macro (ompt_state_wait_barrier_explicit, 0x014) \
73 macro (ompt_state_wait_taskwait, 0x020) \
74 macro (ompt_state_wait_taskgroup, 0x021) \
77 macro (ompt_state_wait_mutex, 0x040) \
78 macro (ompt_state_wait_lock, 0x041) \
79 macro (ompt_state_wait_critical, 0x042) \
80 macro (ompt_state_wait_atomic, 0x043) \
81 macro (ompt_state_wait_ordered, 0x044) \
84 macro (ompt_state_wait_target, 0x080) \
85 macro (ompt_state_wait_target_map, 0x081) \
86 macro (ompt_state_wait_target_update, 0x082) \
89 macro (ompt_state_idle, 0x100) \
90 macro (ompt_state_overhead, 0x101) \
95 #define FOREACH_KMP_MUTEX_IMPL(macro) \
96 macro (kmp_mutex_impl_none, 0) \
97 macro (kmp_mutex_impl_spin, 1) \
98 macro (kmp_mutex_impl_queuing, 2) \
99 macro (kmp_mutex_impl_speculative, 3)
101 #define FOREACH_OMPT_EVENT(macro) \
104 macro (ompt_callback_thread_begin, ompt_callback_thread_begin_t, 1) \
105 macro (ompt_callback_thread_end, ompt_callback_thread_end_t, 2) \
107 macro (ompt_callback_parallel_begin, ompt_callback_parallel_begin_t, 3) \
108 macro (ompt_callback_parallel_end, ompt_callback_parallel_end_t, 4) \
110 macro (ompt_callback_task_create, ompt_callback_task_create_t, 5) \
111 macro (ompt_callback_task_schedule, ompt_callback_task_schedule_t, 6) \
112 macro (ompt_callback_implicit_task, ompt_callback_implicit_task_t, 7) \
114 macro (ompt_callback_target, ompt_callback_target_t, 8) \
115 macro (ompt_callback_target_data_op, ompt_callback_target_data_op_t, 9) \
116 macro (ompt_callback_target_submit, ompt_callback_target_submit_t, 10) \
118 macro (ompt_callback_control_tool, ompt_callback_control_tool_t, 11) \
120 macro (ompt_callback_device_initialize, ompt_callback_device_initialize_t, 12) \
121 macro (ompt_callback_device_finalize, ompt_callback_device_finalize_t, 13) \
123 macro (ompt_callback_device_load, ompt_callback_device_load_t, 14) \
124 macro (ompt_callback_device_unload, ompt_callback_device_unload_t, 15) \
127 macro (ompt_callback_sync_region_wait, ompt_callback_sync_region_t, 16) \
129 macro (ompt_callback_mutex_released, ompt_callback_mutex_t, 17) \
131 macro (ompt_callback_dependences, ompt_callback_dependences_t, 18) \
132 macro (ompt_callback_task_dependence, ompt_callback_task_dependence_t, 19) \
134 macro (ompt_callback_work, ompt_callback_work_t, 20) \
136 macro (ompt_callback_master, ompt_callback_master_t, 21) \
138 macro (ompt_callback_target_map, ompt_callback_target_map_t, 22) \
140 macro (ompt_callback_sync_region, ompt_callback_sync_region_t, 23) \
142 macro (ompt_callback_lock_init, ompt_callback_mutex_acquire_t, 24) \
143 macro (ompt_callback_lock_destroy, ompt_callback_mutex_t, 25) \
145 macro (ompt_callback_mutex_acquire, ompt_callback_mutex_acquire_t, 26) \
146 macro (ompt_callback_mutex_acquired, ompt_callback_mutex_t, 27) \
148 macro (ompt_callback_nest_lock, ompt_callback_nest_lock_t, 28) \
150 macro (ompt_callback_flush, ompt_callback_flush_t, 29) \
152 macro (ompt_callback_cancel, ompt_callback_cancel_t, 30) \
154 macro (ompt_callback_reduction, ompt_callback_sync_region_t, 31) \
156 macro (ompt_callback_dispatch, ompt_callback_dispatch_t, 32)
163 #define kmp_mutex_impl_macro(impl, code) impl = code,
165 #undef kmp_mutex_impl_macro
447 const char *interface_function_name
488 int initial_device_num,
514 const char **next_state_name
520 const char **next_impl_name
646 typedef void *(*ompt_get_record_native_t) (
653 (*ompt_get_record_abstract_t) (
674 unsigned int requested_parallelism,
676 const void *codeptr_ra
691 const void *codeptr_ra
707 const void *codeptr_ra
739 const void *codeptr_ra
788 unsigned int actual_parallelism,
806 const void *codeptr_ra
821 const void *codeptr_ra
837 const void *codeptr_ra
851 const void *codeptr_ra
863 const void *codeptr_ra
874 const void *codeptr_ra
884 const void *codeptr_ra
898 const char *documentation
907 const char *filename,
908 int64_t offset_in_file,
930 const void *codeptr_ra
951 const void *codeptr_ra
969 unsigned int *mapping_flags,
970 const void *codeptr_ra
986 unsigned int requested_num_teams
1000 const void *codeptr_ra
1072 #define ompt_id_none 0
1073 #define ompt_data_none {0}
1074 #define ompt_time_none 0
1075 #define ompt_hwid_none 0
1076 #define ompt_addr_none ~0
1077 #define ompt_mutex_impl_none 0
1078 #define ompt_wait_id_none 0
1080 #define ompd_segment_none 0
static __inline__ uint64_t
static __inline__ uint8_t
ompd_address_t frame_address
ompt_dependence_type_t dependence_type
ompt_device_time_t start_time
ompt_record_native_t rclass
ompt_device_time_t end_time
unsigned int actual_parallelism
ompt_scope_endpoint_t endpoint
ompt_scope_endpoint_t endpoint
ompt_scope_endpoint_t endpoint
ompt_record_task_create_t task_create
ompt_record_sync_region_t sync_region
ompt_record_master_t master
ompt_record_cancel_t cancel
ompt_record_control_tool_t control_tool
ompt_record_dependences_t dependences
ompt_record_nest_lock_t nest_lock
ompt_record_target_t target
ompt_record_task_dependence_t task_dependence
ompt_record_flush_t flush
ompt_record_target_kernel_t target_kernel
ompt_record_parallel_begin_t parallel_begin
ompt_record_task_schedule_t task_schedule
ompt_record_mutex_acquire_t mutex_acquire
ompt_record_target_data_op_t target_data_op
ompt_record_target_map_t target_map
ompt_record_thread_begin_t thread_begin
union ompt_record_ompt_t::@0 record
ompt_record_implicit_task_t implicit_task
ompt_record_mutex_t mutex
ompt_record_parallel_end_t parallel_end
ompt_record_dispatch_t dispatch
unsigned int requested_parallelism
ompt_id_t encountering_task_id
ompt_id_t encountering_task_id
ompt_scope_endpoint_t endpoint
ompt_device_time_t end_time
ompt_target_data_op_t optype
unsigned int granted_num_teams
ompt_device_time_t end_time
unsigned int requested_num_teams
unsigned int * mapping_flags
ompt_scope_endpoint_t endpoint
ompt_id_t encountering_task_id
ompt_task_status_t prior_task_status
ompt_thread_t thread_type
ompt_scope_endpoint_t endpoint