-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
GH-90081: Run python tracers at full speed #95328
GH-90081: Run python tracers at full speed #95328
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM
I've left a few minor comments. I think only the deleted blank line comment actually needs any change. Once that is sorted, feel free to merge.
Thanks @markshannon for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
GH-95363 is a backport of this pull request to the 3.11 branch. |
(cherry picked from commit b8b2990) Co-authored-by: Mark Shannon <mark@hotpy.org>
Is the pythoncapi-compat code correct in Python 3.10? https://github.com/python/pythoncapi-compat/blob/57aaa18053386142d1c93e26b201da15b86ad23b/pythoncapi_compat.h#L308-L336 On Python 3.11, it just uses the function coming from Python directly. |
Yes, I think that is correct. |
Since tracing is inactive when calling the tracer function, we can run Python tracers at full speed.
Significant slowdowns have been observed for Python tracers:
Specifically here: #90081 (comment)
and incidentally in #93516.
This is really easy to fix, we just set
tstate->cframe->use_tracing = 0
iftstate->tracing != 0
.