summaryrefslogtreecommitdiffstats
path: root/Include/cpython/code.h
diff options
context:
space:
mode:
authorTian Gao <gaogaotiantian@hotmail.com>2024-10-01 17:32:55 (GMT)
committerGitHub <noreply@github.com>2024-10-01 17:32:55 (GMT)
commit5e0abb47886bc665eefdcc19fde985f803e49d4c (patch)
tree87b3c0280ab1fa6991732eb4e0d82238e96620ec /Include/cpython/code.h
parentb48253852341c01309b0598852841cd89bc28afd (diff)
downloadcpython-5e0abb47886bc665eefdcc19fde985f803e49d4c.zip
cpython-5e0abb47886bc665eefdcc19fde985f803e49d4c.tar.gz
cpython-5e0abb47886bc665eefdcc19fde985f803e49d4c.tar.bz2
gh-116750: Add clear_tool_id function to unregister events and callbacks (#124568)
Diffstat (limited to 'Include/cpython/code.h')
-rw-r--r--Include/cpython/code.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/cpython/code.h b/Include/cpython/code.h
index 58d93fc..0362269 100644
--- a/Include/cpython/code.h
+++ b/Include/cpython/code.h
@@ -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 */