ompt-event-specific.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /******************************************************************************
  2. * File: ompt-event-specific.h
  3. *
  4. * Description:
  5. *
  6. * specify which of the OMPT events are implemented by this runtime system
  7. * and the level of their implementation by a runtime system.
  8. *****************************************************************************/
  9. //===----------------------------------------------------------------------===//
  10. //
  11. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  12. // See https://llvm.org/LICENSE.txt for license information.
  13. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  14. //
  15. //===----------------------------------------------------------------------===//
  16. #ifndef __OMPT_EVENT_SPECIFIC_H__
  17. #define __OMPT_EVENT_SPECIFIC_H__
  18. #define _ompt_tokenpaste_helper(x, y) x##y
  19. #define _ompt_tokenpaste(x, y) _ompt_tokenpaste_helper(x, y)
  20. #define ompt_event_implementation_status(e) _ompt_tokenpaste(e, _implemented)
  21. /*----------------------------------------------------------------------------
  22. | Specify whether an event may occur or not, and whether event callbacks
  23. | never, sometimes, or always occur.
  24. |
  25. | The values for these constants are defined in section 6.1.2 of
  26. | the OMPT TR. They are exposed to tools through ompt_set_callback.
  27. +--------------------------------------------------------------------------*/
  28. #define ompt_event_UNIMPLEMENTED ompt_set_never
  29. #define ompt_event_MAY_CONVENIENT ompt_set_sometimes
  30. #define ompt_event_MAY_ALWAYS ompt_set_always
  31. #if OMPT_OPTIONAL
  32. #define ompt_event_MAY_ALWAYS_OPTIONAL ompt_event_MAY_ALWAYS
  33. #else
  34. #define ompt_event_MAY_ALWAYS_OPTIONAL ompt_event_UNIMPLEMENTED
  35. #endif
  36. /*----------------------------------------------------------------------------
  37. | Mandatory Events
  38. +--------------------------------------------------------------------------*/
  39. #define ompt_callback_thread_begin_implemented ompt_event_MAY_ALWAYS
  40. #define ompt_callback_thread_end_implemented ompt_event_MAY_ALWAYS
  41. #define ompt_callback_parallel_begin_implemented ompt_event_MAY_ALWAYS
  42. #define ompt_callback_parallel_end_implemented ompt_event_MAY_ALWAYS
  43. #define ompt_callback_task_create_implemented ompt_event_MAY_ALWAYS
  44. #define ompt_callback_task_schedule_implemented ompt_event_MAY_ALWAYS
  45. #define ompt_callback_implicit_task_implemented ompt_event_MAY_ALWAYS
  46. #define ompt_callback_target_implemented ompt_event_UNIMPLEMENTED
  47. #define ompt_callback_target_emi_implemented ompt_event_UNIMPLEMENTED
  48. #define ompt_callback_target_data_op_implemented ompt_event_UNIMPLEMENTED
  49. #define ompt_callback_target_data_op_emi_implemented ompt_event_UNIMPLEMENTED
  50. #define ompt_callback_target_submit_implemented ompt_event_UNIMPLEMENTED
  51. #define ompt_callback_target_submit_emi_implemented ompt_event_UNIMPLEMENTED
  52. #define ompt_callback_control_tool_implemented ompt_event_MAY_ALWAYS
  53. #define ompt_callback_device_initialize_implemented ompt_event_UNIMPLEMENTED
  54. #define ompt_callback_device_finalize_implemented ompt_event_UNIMPLEMENTED
  55. #define ompt_callback_device_load_implemented ompt_event_UNIMPLEMENTED
  56. #define ompt_callback_device_unload_implemented ompt_event_UNIMPLEMENTED
  57. /*----------------------------------------------------------------------------
  58. | Optional Events
  59. +--------------------------------------------------------------------------*/
  60. #define ompt_callback_sync_region_wait_implemented \
  61. ompt_event_MAY_ALWAYS_OPTIONAL
  62. #define ompt_callback_mutex_released_implemented ompt_event_MAY_ALWAYS_OPTIONAL
  63. #define ompt_callback_dependences_implemented ompt_event_MAY_ALWAYS_OPTIONAL
  64. #define ompt_callback_task_dependence_implemented ompt_event_MAY_ALWAYS_OPTIONAL
  65. #define ompt_callback_work_implemented ompt_event_MAY_ALWAYS_OPTIONAL
  66. #define ompt_callback_masked_implemented ompt_event_MAY_ALWAYS_OPTIONAL
  67. #define ompt_callback_target_map_implemented ompt_event_UNIMPLEMENTED
  68. #define ompt_callback_target_map_emi_implemented ompt_event_UNIMPLEMENTED
  69. #define ompt_callback_sync_region_implemented ompt_event_MAY_ALWAYS_OPTIONAL
  70. #define ompt_callback_lock_init_implemented ompt_event_MAY_ALWAYS_OPTIONAL
  71. #define ompt_callback_lock_destroy_implemented ompt_event_MAY_ALWAYS_OPTIONAL
  72. #define ompt_callback_mutex_acquire_implemented ompt_event_MAY_ALWAYS_OPTIONAL
  73. #define ompt_callback_mutex_acquired_implemented ompt_event_MAY_ALWAYS_OPTIONAL
  74. #define ompt_callback_nest_lock_implemented ompt_event_MAY_ALWAYS_OPTIONAL
  75. #define ompt_callback_flush_implemented ompt_event_MAY_ALWAYS_OPTIONAL
  76. #define ompt_callback_cancel_implemented ompt_event_MAY_ALWAYS_OPTIONAL
  77. #define ompt_callback_reduction_implemented ompt_event_MAY_ALWAYS_OPTIONAL
  78. #define ompt_callback_dispatch_implemented ompt_event_MAY_ALWAYS_OPTIONAL
  79. #define ompt_callback_error_implemented ompt_event_MAY_ALWAYS_OPTIONAL
  80. #endif