-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in 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 <[email protected]>
(cherry picked from commit b8b2990) Co-authored-by: Mark Shannon <[email protected]> Co-authored-by: Mark Shannon <[email protected]>
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
.