summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorDino Viehland <dinoviehland@meta.com>2024-04-19 21:47:42 (GMT)
committerGitHub <noreply@github.com>2024-04-19 21:47:42 (GMT)
commit07525c9a85e7fa04db565c6e6e6605ff6099dcb7 (patch)
treeb12112a245641172073d1f1df8212aa082ec8db8 /Tools
parentb45af00bad3449b85c8f54ba7a9474ca1f52de69 (diff)
downloadcpython-07525c9a85e7fa04db565c6e6e6605ff6099dcb7.zip
cpython-07525c9a85e7fa04db565c6e6e6605ff6099dcb7.tar.gz
cpython-07525c9a85e7fa04db565c6e6e6605ff6099dcb7.tar.bz2
gh-116818: Make `sys.settrace`, `sys.setprofile`, and monitoring thread-safe (#116775)
Makes sys.settrace, sys.setprofile, and monitoring generally thread-safe. Mostly uses a stop-the-world approach and synchronization around the code object's _co_instrumentation_version. There may be a little bit of extra synchronization around the monitoring data that's required to be TSAN clean.
Diffstat (limited to 'Tools')
-rw-r--r--Tools/jit/template.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Tools/jit/template.c b/Tools/jit/template.c
index b195aff..228dc83 100644
--- a/Tools/jit/template.c
+++ b/Tools/jit/template.c
@@ -12,6 +12,7 @@
#include "pycore_opcode_metadata.h"
#include "pycore_opcode_utils.h"
#include "pycore_optimizer.h"
+#include "pycore_pyatomic_ft_wrappers.h"
#include "pycore_range.h"
#include "pycore_setobject.h"
#include "pycore_sliceobject.h"