summaryrefslogtreecommitdiffstats
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2021-04-13 10:08:14 (GMT)
committerGitHub <noreply@github.com>2021-04-13 10:08:14 (GMT)
commit9e7b2076fb4380987ad0262c4c0ca900b06475ad (patch)
treed7a4902fa70e0014849fd77f07d89f39bb2e7494 /Python/pystate.c
parentc2b7a66b91cdb96fbfdb160f96797208ddc5e436 (diff)
downloadcpython-9e7b2076fb4380987ad0262c4c0ca900b06475ad.zip
cpython-9e7b2076fb4380987ad0262c4c0ca900b06475ad.tar.gz
cpython-9e7b2076fb4380987ad0262c4c0ca900b06475ad.tar.bz2
bpo-43760: Speed up check for tracing in interpreter dispatch (#25276)
* Remove redundant tracing_possible field from interpreter state. * Move 'use_tracing' from tstate onto C stack, for fastest possible checking in dispatch logic. * Add comments stressing the importance stack discipline when dealing with CFrames. * Add NEWS
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index c8b2530..436f874 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -624,7 +624,8 @@ new_threadstate(PyInterpreterState *interp, int init)
tstate->recursion_headroom = 0;
tstate->stackcheck_counter = 0;
tstate->tracing = 0;
- tstate->use_tracing = 0;
+ tstate->root_cframe.use_tracing = 0;
+ tstate->cframe = &tstate->root_cframe;
tstate->gilstate_counter = 0;
tstate->async_exc = NULL;
tstate->thread_id = PyThread_get_thread_ident();