aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/openmp/ompt-event-specific.h
blob: 28c1512ac262427138a4c767be847dd43372f9de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#ifndef  __OMPT_EVENT_SPECIFIC_H__
#define  __OMPT_EVENT_SPECIFIC_H__

/******************************************************************************
 * File: ompt-event-specific.h
 *
 * Description:
 *
 *   specify which of the OMPT events are implemented by this runtime system
 *   and the level of their implementation by a runtime system.
 *****************************************************************************/

#define _ompt_tokenpaste_helper(x,y)        x ## y
#define _ompt_tokenpaste(x,y)               _ompt_tokenpaste_helper(x,y)
#define ompt_event_implementation_status(e) _ompt_tokenpaste(e,_implemented)


/*----------------------------------------------------------------------------
 | Specify whether an event may occur or not, and whether event callbacks
 | never, sometimes, or always occur.
 |
 | The values for these constants are defined in section 6.1.2 of
 | the OMPT TR. They are exposed to tools through ompt_set_callback.
 +--------------------------------------------------------------------------*/

#define ompt_event_NEVER             ompt_set_result_event_never_occurs
#define ompt_event_UNIMPLEMENTED     ompt_set_result_event_may_occur_no_callback
#define ompt_event_MAY_CONVENIENT    ompt_set_result_event_may_occur_callback_some
#define ompt_event_MAY_ALWAYS        ompt_set_result_event_may_occur_callback_always

#if OMPT_TRACE
#define ompt_event_MAY_ALWAYS_TRACE   ompt_event_MAY_ALWAYS
#else
#define ompt_event_MAY_ALWAYS_TRACE   ompt_event_UNIMPLEMENTED
#endif

#if OMPT_BLAME
#define ompt_event_MAY_ALWAYS_BLAME   ompt_event_MAY_ALWAYS
#else
#define ompt_event_MAY_ALWAYS_BLAME   ompt_event_UNIMPLEMENTED
#endif

/*----------------------------------------------------------------------------
 | Mandatory Events
 +--------------------------------------------------------------------------*/

#define ompt_event_parallel_begin_implemented           ompt_event_MAY_ALWAYS
#define ompt_event_parallel_end_implemented             ompt_event_MAY_ALWAYS

#define ompt_event_task_begin_implemented               ompt_event_MAY_ALWAYS
#define ompt_event_task_end_implemented                 ompt_event_MAY_ALWAYS

#define ompt_event_thread_begin_implemented             ompt_event_MAY_ALWAYS
#define ompt_event_thread_end_implemented               ompt_event_MAY_ALWAYS

#define ompt_event_control_implemented                  ompt_event_MAY_ALWAYS

#define ompt_event_runtime_shutdown_implemented         ompt_event_MAY_ALWAYS


/*----------------------------------------------------------------------------
 | Optional Events (blame shifting)
 +--------------------------------------------------------------------------*/

#define ompt_event_idle_begin_implemented               ompt_event_MAY_ALWAYS_BLAME
#define ompt_event_idle_end_implemented                 ompt_event_MAY_ALWAYS_BLAME

#define ompt_event_wait_barrier_begin_implemented       ompt_event_MAY_ALWAYS_BLAME
#define ompt_event_wait_barrier_end_implemented         ompt_event_MAY_ALWAYS_BLAME

#define ompt_event_wait_taskwait_begin_implemented      ompt_event_UNIMPLEMENTED
#define ompt_event_wait_taskwait_end_implemented        ompt_event_UNIMPLEMENTED

#define ompt_event_wait_taskgroup_begin_implemented     ompt_event_UNIMPLEMENTED
#define ompt_event_wait_taskgroup_end_implemented       ompt_event_UNIMPLEMENTED

#define ompt_event_release_lock_implemented             ompt_event_MAY_ALWAYS_BLAME
#define ompt_event_release_nest_lock_last_implemented   ompt_event_MAY_ALWAYS_BLAME
#define ompt_event_release_critical_implemented         ompt_event_MAY_ALWAYS_BLAME
#define ompt_event_release_atomic_implemented           ompt_event_MAY_ALWAYS_BLAME
#define ompt_event_release_ordered_implemented          ompt_event_MAY_ALWAYS_BLAME


/*----------------------------------------------------------------------------
 | Optional Events (synchronous events)
 +--------------------------------------------------------------------------*/

#define ompt_event_implicit_task_begin_implemented      ompt_event_MAY_ALWAYS_TRACE
#define ompt_event_implicit_task_end_implemented        ompt_event_MAY_ALWAYS_TRACE

#define ompt_event_initial_task_begin_implemented       ompt_event_UNIMPLEMENTED
#define ompt_event_initial_task_end_implemented         ompt_event_UNIMPLEMENTED

#define ompt_event_task_switch_implemented              ompt_event_MAY_ALWAYS_TRACE

#define ompt_event_loop_begin_implemented               ompt_event_MAY_ALWAYS_TRACE
#define ompt_event_loop_end_implemented                 ompt_event_MAY_ALWAYS_TRACE

#define ompt_event_sections_begin_implemented           ompt_event_UNIMPLEMENTED
#define ompt_event_sections_end_implemented             ompt_event_UNIMPLEMENTED

#define ompt_event_single_in_block_begin_implemented    ompt_event_MAY_ALWAYS_TRACE
#define ompt_event_single_in_block_end_implemented      ompt_event_MAY_ALWAYS_TRACE
#define ompt_event_single_others_begin_implemented      ompt_event_MAY_ALWAYS_TRACE
#define ompt_event_single_others_end_implemented        ompt_event_MAY_ALWAYS_TRACE

#define ompt_event_workshare_begin_implemented          ompt_event_UNIMPLEMENTED
#define ompt_event_workshare_end_implemented            ompt_event_UNIMPLEMENTED

#define ompt_event_master_begin_implemented             ompt_event_MAY_ALWAYS_TRACE
#define ompt_event_master_end_implemented               ompt_event_MAY_ALWAYS_TRACE

#define ompt_event_barrier_begin_implemented            ompt_event_MAY_ALWAYS_TRACE
#define ompt_event_barrier_end_implemented              ompt_event_MAY_ALWAYS_TRACE

#define ompt_event_taskwait_begin_implemented           ompt_event_MAY_ALWAYS_TRACE
#define ompt_event_taskwait_end_implemented             ompt_event_MAY_ALWAYS_TRACE

#define ompt_event_taskgroup_begin_implemented          ompt_event_UNIMPLEMENTED
#define ompt_event_taskgroup_end_implemented            ompt_event_UNIMPLEMENTED

#define ompt_event_release_nest_lock_prev_implemented   ompt_event_MAY_ALWAYS_TRACE
#define ompt_event_wait_lock_implemented                ompt_event_UNIMPLEMENTED
#define ompt_event_wait_nest_lock_implemented           ompt_event_UNIMPLEMENTED
#define ompt_event_wait_critical_implemented            ompt_event_UNIMPLEMENTED
#define ompt_event_wait_atomic_implemented              ompt_event_MAY_ALWAYS_TRACE
#define ompt_event_wait_ordered_implemented             ompt_event_MAY_ALWAYS_TRACE

#define ompt_event_acquired_lock_implemented            ompt_event_MAY_ALWAYS_TRACE
#define ompt_event_acquired_nest_lock_first_implemented ompt_event_MAY_ALWAYS_TRACE
#define ompt_event_acquired_nest_lock_next_implemented  ompt_event_MAY_ALWAYS_TRACE
#define ompt_event_acquired_critical_implemented        ompt_event_UNIMPLEMENTED
#define ompt_event_acquired_atomic_implemented          ompt_event_MAY_ALWAYS_TRACE
#define ompt_event_acquired_ordered_implemented         ompt_event_MAY_ALWAYS_TRACE

#define ompt_event_init_lock_implemented                ompt_event_MAY_ALWAYS_TRACE
#define ompt_event_init_nest_lock_implemented           ompt_event_MAY_ALWAYS_TRACE

#define ompt_event_destroy_lock_implemented             ompt_event_MAY_ALWAYS_TRACE
#define ompt_event_destroy_nest_lock_implemented        ompt_event_MAY_ALWAYS_TRACE

#define ompt_event_flush_implemented                    ompt_event_UNIMPLEMENTED

#endif