-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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-122247: Move instruction instrumentation sanity check after tracing check #122251
gh-122247: Move instruction instrumentation sanity check after tracing check #122251
Conversation
What's a good way to learn about the invariants attached to the internal fields like The patch looks good to me, but I don't feel qualified to review it. |
Unfortunately a lot of the instrumentation related internal fields are undocumented - I basically read the source code to understand those. |
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.
Thanks for fixing this
Thanks @gaogaotiantian for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…tracing check (pythonGH-122251) (cherry picked from commit 57d7c3e) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
GH-122812 is a backport of this pull request to the 3.13 branch. |
Due to #117133, code objects are not always up to date. We do not instrument them if we are tracing - because no events will be generated anyway. Therefore, we should check
tstate->tracing
first for instruction instrumentation, and do the sanity check only when an event is about to be generated.News is skipped because it's an assertion move. No actual behavior is changed to the end user.