xref: /freebsd/contrib/llvm-project/openmp/runtime/src/ompt-event-specific.h (revision e8d8bef961a50d4dc22501cde4fb9fb0be1b2532)
10b57cec5SDimitry Andric /******************************************************************************
20b57cec5SDimitry Andric  * File: ompt-event-specific.h
30b57cec5SDimitry Andric  *
40b57cec5SDimitry Andric  * Description:
50b57cec5SDimitry Andric  *
60b57cec5SDimitry Andric  *   specify which of the OMPT events are implemented by this runtime system
70b57cec5SDimitry Andric  *   and the level of their implementation by a runtime system.
80b57cec5SDimitry Andric  *****************************************************************************/
90b57cec5SDimitry Andric 
100b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
110b57cec5SDimitry Andric //
120b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
130b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
140b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
150b57cec5SDimitry Andric //
160b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
170b57cec5SDimitry Andric 
180b57cec5SDimitry Andric #ifndef __OMPT_EVENT_SPECIFIC_H__
190b57cec5SDimitry Andric #define __OMPT_EVENT_SPECIFIC_H__
200b57cec5SDimitry Andric 
210b57cec5SDimitry Andric #define _ompt_tokenpaste_helper(x, y) x##y
220b57cec5SDimitry Andric #define _ompt_tokenpaste(x, y) _ompt_tokenpaste_helper(x, y)
230b57cec5SDimitry Andric #define ompt_event_implementation_status(e) _ompt_tokenpaste(e, _implemented)
240b57cec5SDimitry Andric 
250b57cec5SDimitry Andric /*----------------------------------------------------------------------------
260b57cec5SDimitry Andric  | Specify whether an event may occur or not, and whether event callbacks
270b57cec5SDimitry Andric  | never, sometimes, or always occur.
280b57cec5SDimitry Andric  |
290b57cec5SDimitry Andric  | The values for these constants are defined in section 6.1.2 of
300b57cec5SDimitry Andric  | the OMPT TR. They are exposed to tools through ompt_set_callback.
310b57cec5SDimitry Andric  +--------------------------------------------------------------------------*/
320b57cec5SDimitry Andric 
330b57cec5SDimitry Andric #define ompt_event_UNIMPLEMENTED ompt_set_never
340b57cec5SDimitry Andric #define ompt_event_MAY_CONVENIENT ompt_set_sometimes
350b57cec5SDimitry Andric #define ompt_event_MAY_ALWAYS ompt_set_always
360b57cec5SDimitry Andric 
370b57cec5SDimitry Andric #if OMPT_OPTIONAL
380b57cec5SDimitry Andric #define ompt_event_MAY_ALWAYS_OPTIONAL ompt_event_MAY_ALWAYS
390b57cec5SDimitry Andric #else
400b57cec5SDimitry Andric #define ompt_event_MAY_ALWAYS_OPTIONAL ompt_event_UNIMPLEMENTED
410b57cec5SDimitry Andric #endif
420b57cec5SDimitry Andric 
430b57cec5SDimitry Andric /*----------------------------------------------------------------------------
440b57cec5SDimitry Andric  | Mandatory Events
450b57cec5SDimitry Andric  +--------------------------------------------------------------------------*/
460b57cec5SDimitry Andric 
470b57cec5SDimitry Andric #define ompt_callback_thread_begin_implemented ompt_event_MAY_ALWAYS
480b57cec5SDimitry Andric #define ompt_callback_thread_end_implemented ompt_event_MAY_ALWAYS
490b57cec5SDimitry Andric 
500b57cec5SDimitry Andric #define ompt_callback_parallel_begin_implemented ompt_event_MAY_ALWAYS
510b57cec5SDimitry Andric #define ompt_callback_parallel_end_implemented ompt_event_MAY_ALWAYS
520b57cec5SDimitry Andric 
530b57cec5SDimitry Andric #define ompt_callback_task_create_implemented ompt_event_MAY_ALWAYS
540b57cec5SDimitry Andric #define ompt_callback_task_schedule_implemented ompt_event_MAY_ALWAYS
550b57cec5SDimitry Andric 
560b57cec5SDimitry Andric #define ompt_callback_implicit_task_implemented ompt_event_MAY_ALWAYS
570b57cec5SDimitry Andric 
580b57cec5SDimitry Andric #define ompt_callback_target_implemented ompt_event_UNIMPLEMENTED
59*e8d8bef9SDimitry Andric #define ompt_callback_target_emi_implemented ompt_event_UNIMPLEMENTED
600b57cec5SDimitry Andric #define ompt_callback_target_data_op_implemented ompt_event_UNIMPLEMENTED
61*e8d8bef9SDimitry Andric #define ompt_callback_target_data_op_emi_implemented ompt_event_UNIMPLEMENTED
620b57cec5SDimitry Andric #define ompt_callback_target_submit_implemented ompt_event_UNIMPLEMENTED
63*e8d8bef9SDimitry Andric #define ompt_callback_target_submit_emi_implemented ompt_event_UNIMPLEMENTED
640b57cec5SDimitry Andric 
650b57cec5SDimitry Andric #define ompt_callback_control_tool_implemented ompt_event_MAY_ALWAYS
660b57cec5SDimitry Andric 
670b57cec5SDimitry Andric #define ompt_callback_device_initialize_implemented ompt_event_UNIMPLEMENTED
680b57cec5SDimitry Andric #define ompt_callback_device_finalize_implemented ompt_event_UNIMPLEMENTED
690b57cec5SDimitry Andric 
700b57cec5SDimitry Andric #define ompt_callback_device_load_implemented ompt_event_UNIMPLEMENTED
710b57cec5SDimitry Andric #define ompt_callback_device_unload_implemented ompt_event_UNIMPLEMENTED
720b57cec5SDimitry Andric 
730b57cec5SDimitry Andric /*----------------------------------------------------------------------------
740b57cec5SDimitry Andric  | Optional Events
750b57cec5SDimitry Andric  +--------------------------------------------------------------------------*/
760b57cec5SDimitry Andric 
770b57cec5SDimitry Andric #define ompt_callback_sync_region_wait_implemented                             \
780b57cec5SDimitry Andric   ompt_event_MAY_ALWAYS_OPTIONAL
790b57cec5SDimitry Andric 
800b57cec5SDimitry Andric #define ompt_callback_mutex_released_implemented ompt_event_MAY_ALWAYS_OPTIONAL
810b57cec5SDimitry Andric 
820b57cec5SDimitry Andric #define ompt_callback_dependences_implemented                             \
830b57cec5SDimitry Andric   ompt_event_MAY_ALWAYS_OPTIONAL
840b57cec5SDimitry Andric #define ompt_callback_task_dependence_implemented ompt_event_MAY_ALWAYS_OPTIONAL
850b57cec5SDimitry Andric 
860b57cec5SDimitry Andric #define ompt_callback_work_implemented ompt_event_MAY_ALWAYS_OPTIONAL
870b57cec5SDimitry Andric 
88*e8d8bef9SDimitry Andric #define ompt_callback_masked_implemented ompt_event_MAY_ALWAYS_OPTIONAL
890b57cec5SDimitry Andric 
900b57cec5SDimitry Andric #define ompt_callback_target_map_implemented ompt_event_UNIMPLEMENTED
91*e8d8bef9SDimitry Andric #define ompt_callback_target_map_emi_implemented ompt_event_UNIMPLEMENTED
920b57cec5SDimitry Andric 
930b57cec5SDimitry Andric #define ompt_callback_sync_region_implemented ompt_event_MAY_ALWAYS_OPTIONAL
940b57cec5SDimitry Andric 
950b57cec5SDimitry Andric #define ompt_callback_lock_init_implemented ompt_event_MAY_ALWAYS_OPTIONAL
960b57cec5SDimitry Andric #define ompt_callback_lock_destroy_implemented ompt_event_MAY_ALWAYS_OPTIONAL
970b57cec5SDimitry Andric 
980b57cec5SDimitry Andric #define ompt_callback_mutex_acquire_implemented ompt_event_MAY_ALWAYS_OPTIONAL
990b57cec5SDimitry Andric #define ompt_callback_mutex_acquired_implemented ompt_event_MAY_ALWAYS_OPTIONAL
1000b57cec5SDimitry Andric #define ompt_callback_nest_lock_implemented ompt_event_MAY_ALWAYS_OPTIONAL
1010b57cec5SDimitry Andric 
1020b57cec5SDimitry Andric #define ompt_callback_flush_implemented ompt_event_MAY_ALWAYS_OPTIONAL
1030b57cec5SDimitry Andric 
1040b57cec5SDimitry Andric #define ompt_callback_cancel_implemented ompt_event_MAY_ALWAYS_OPTIONAL
1050b57cec5SDimitry Andric 
106480093f4SDimitry Andric #define ompt_callback_reduction_implemented ompt_event_MAY_ALWAYS_OPTIONAL
1070b57cec5SDimitry Andric 
1080b57cec5SDimitry Andric #define ompt_callback_dispatch_implemented ompt_event_UNIMPLEMENTED
1090b57cec5SDimitry Andric 
110*e8d8bef9SDimitry Andric #define ompt_callback_error_implemented ompt_event_UNIMPLEMENTED
111*e8d8bef9SDimitry Andric 
1120b57cec5SDimitry Andric #endif
113