gh-116750: Add clear_tool_id function to unregister events and callbacks (#124568)

This commit is contained in:
Tian Gao 2024-10-01 10:32:55 -07:00 committed by GitHub
parent b482538523
commit 5e0abb4788
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 165 additions and 8 deletions

View file

@ -8,6 +8,8 @@
extern "C" {
#endif
/* Total tool ids available */
#define _PY_MONITORING_TOOL_IDS 8
/* Count of all local monitoring events */
#define _PY_MONITORING_LOCAL_EVENTS 10
/* Count of all "real" monitoring events (not derived from other events) */
@ -57,6 +59,8 @@ typedef struct {
_Py_LocalMonitors active_monitors;
/* The tools that are to be notified for events for the matching code unit */
uint8_t *tools;
/* The version of tools when they instrument the code */
uintptr_t tool_versions[_PY_MONITORING_TOOL_IDS];
/* Information to support line events */
_PyCoLineInstrumentationData *lines;
/* The tools that are to be notified for line events for the matching code unit */