@@ -101,6 +101,89 @@ _Py_Instrumentation_GetLine(PyCodeObject *code, int index);
101
101
extern PyObject _PyInstrumentation_MISSING ;
102
102
extern PyObject _PyInstrumentation_DISABLE ;
103
103
104
+ typedef struct _PyMonitoringState {
105
+ uint8_t active ;
106
+ uint8_t opaque ;
107
+ } PyMonitoringState ;
108
+
109
+
110
+ /*** C API ***/
111
+
112
+ PyAPI_FUNC (void )
113
+ _PyMonitoringScopeBegin (PyMonitoringState * state_array , uint64_t * version ,
114
+ uint8_t * event_types , uint32_t length );
115
+
116
+ PyAPI_FUNC (int )
117
+ _PyMonitoring_FirePyStartEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset );
118
+
119
+ PyAPI_FUNC (int )
120
+ _PyMonitoring_FirePyResumeEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset );
121
+
122
+ PyAPI_FUNC (int )
123
+ _PyMonitoring_FirePyReturnEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset ,
124
+ PyObject * retval );
125
+
126
+ PyAPI_FUNC (int )
127
+ _PyMonitoring_FirePyYieldEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset ,
128
+ PyObject * retval );
129
+
130
+ PyAPI_FUNC (int )
131
+ _PyMonitoring_FirePyCallEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset ,
132
+ PyObject * callable , PyObject * arg0 );
133
+
134
+ PyAPI_FUNC (int )
135
+ _PyMonitoring_FireCallEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset ,
136
+ PyObject * callable , PyObject * arg0 );
137
+
138
+
139
+ PyAPI_FUNC (int )
140
+ _PyMonitoring_FireLineEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset ,
141
+ PyObject * lineno );
142
+
143
+ PyAPI_FUNC (int )
144
+ _PyMonitoring_FireInstructionEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset );
145
+
146
+ PyAPI_FUNC (int )
147
+ _PyMonitoring_FireJumpEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset ,
148
+ PyObject * target_offset );
149
+
150
+ PyAPI_FUNC (int )
151
+ _PyMonitoring_FireBranchEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset ,
152
+ PyObject * target_offset );
153
+
154
+ PyAPI_FUNC (int )
155
+ _PyMonitoring_FireCReturnEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset ,
156
+ PyObject * callable , PyObject * arg0 );
157
+
158
+ PyAPI_FUNC (int )
159
+ _PyMonitoring_FirePyThrowEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset ,
160
+ PyObject * exception );
161
+
162
+
163
+ PyAPI_FUNC (int )
164
+ _PyMonitoring_FireRaiseEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset ,
165
+ PyObject * exception );
166
+
167
+ PyAPI_FUNC (int )
168
+ _PyMonitoring_FireReraiseEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset ,
169
+ PyObject * exception );
170
+
171
+ PyAPI_FUNC (int )
172
+ _PyMonitoring_FireExceptionHandledEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset ,
173
+ PyObject * exception );
174
+
175
+ PyAPI_FUNC (int )
176
+ _PyMonitoring_FireCRaiseEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset ,
177
+ PyObject * callable , PyObject * arg0 );
178
+
179
+ PyAPI_FUNC (int )
180
+ _PyMonitoring_FirePyUnwindEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset ,
181
+ PyObject * exception );
182
+
183
+ PyAPI_FUNC (int )
184
+ _PyMonitoring_FireStopIterationEvent (PyMonitoringState * state , PyObject * codelike , uint32_t offset ,
185
+ PyObject * exception );
186
+
104
187
#ifdef __cplusplus
105
188
}
106
189
#endif
0 commit comments