aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/executor_cases.c.h
diff options
context:
space:
mode:
authorTian Gao <gaogaotiantian@hotmail.com>2024-05-03 11:49:24 -0700
committerGitHub <noreply@github.com>2024-05-03 19:49:24 +0100
commit9c14ed06188aa4d462cd0fc4218c6023f9bf03cb (patch)
tree1e60a736e9b626706110a8f1600a20ef8c8b3827 /Python/executor_cases.c.h
parent998c3856c1e922ece806c162858dc587a1e92e02 (diff)
downloadcpython-9c14ed06188aa4d462cd0fc4218c6023f9bf03cb.tar.gz
cpython-9c14ed06188aa4d462cd0fc4218c6023f9bf03cb.zip
gh-107674: Improve performance of `sys.settrace` (GH-117133)
* Check tracing in RESUME_CHECK * Only change to RESUME_CHECK if not tracing
Diffstat (limited to 'Python/executor_cases.c.h')
-rw-r--r--Python/executor_cases.c.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 03db9b623cb..c3ee6e9039c 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -4346,7 +4346,7 @@
UOP_STAT_INC(uopcode, miss);
JUMP_TO_JUMP_TARGET();
}
- assert(eval_breaker == FT_ATOMIC_LOAD_UINTPTR_ACQUIRE(_PyFrame_GetCode(frame)->_co_instrumentation_version));
+ assert(tstate->tracing || eval_breaker == FT_ATOMIC_LOAD_UINTPTR_ACQUIRE(_PyFrame_GetCode(frame)->_co_instrumentation_version));
break;
}