Lines Matching full:events
22 As programs execute, events occur that might be of interest to tools that
24 receive callbacks when events of interest occur.
29 * `Events`_
41 Before registering or activating events, a tool should choose an identifier.
59 :func:`free_tool_id` will not disable global or local events associated
70 All IDs are treated the same by the VM with regard to events, but the
79 Events chapter
82 The following events are supported:
153 More events may be added in the future.
155 These events are attributes of the :mod:`!sys.monitoring.events` namespace.
157 To define a set of events, simply bitwise or the individual events together.
159 events, use the expression ``PY_RETURN | PY_START``.
168 Events are divided into three groups:
170 Local events
173 Local events are associated with normal execution of the program and happen
174 at clearly defined locations. All local events can be disabled.
175 The local events are:
188 Ancillary events
191 Ancillary events can be monitored like other events, but are controlled
197 The :monitoring-event:`C_RETURN` and :monitoring-event:`C_RAISE` events
199 :monitoring-event:`C_RETURN` and :monitoring-event:`C_RAISE` events will only be seen if the
202 Other events
205 Other events are not necessarily tied to a specific location in the
208 The other events that can be monitored are:
230 Turning events on and off
235 Events can be turned on or off by setting the events either globally or
239 Setting events globally
242 Events can be controlled globally by modifying the set of events being monitored.
246 Returns the ``int`` representing all the active events.
250 Activates all events which are set in *event_set*.
253 No events are active by default.
255 Per code object events
258 Events can also be controlled on a per code object basis. The functions
265 Returns all the local events for *code*
269 Activates all the local events for *code* which are set in *event_set*.
272 Local events add to global events, but do not mask them.
273 In other words, all global events will trigger for a code object,
274 regardless of the local events.
277 Disabling events
283 events for the current code location.
285 Local events can be disabled for a specific code location by returning
287 which events are set, or any other code locations for the same event.
289 Disabling events for specific locations is very important for high
296 Enable all the events that were disabled by :data:`sys.monitoring.DISABLE`
305 To register a callable for events call
333 Different events will provide the callback function with different arguments, as follows: