-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
gh-132532: Add CHECK_PERIODIC
instruction and use it for CALLs instead of the uop version.
#132533
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
base: main
Are you sure you want to change the base?
Conversation
iritkatriel
commented
Apr 14, 2025
•
edited
Loading
edited
- Issue: Make it possible for the jit to deopt to tier1 upon interrupts #132532
@gaogaotiantian this PR adds an instruction (CHECK_PERIODIC) after each call. So now pdb.set_trace() sees that as the next instruction, and thinks it's breaking one line earlier. How do you suggest we fix this? Skip the CHECK_PERIODIC instruction (where would the happen?) |
The test_pdb failure is not a real failure. We should just fix(remove) the test. It was a corner case where the instruction after |
CHECK_PERIODIC has the same line number as the CALL of set_trace(). So it will look like we stopped just before the set_trace call. I don't think that's what we want. |
That is what we want. The existing test that failed is an exception, which stopped at the next line. We put a lot of effort to make |
@@ -4714,7 +4714,8 @@ def _read(): | |||
# handlers, which in this case will invoke alarm_interrupt(). | |||
signal.alarm(1) | |||
try: | |||
self.assertRaises(ZeroDivisionError, wio.write, large_data) | |||
with self.assertRaises(ZeroDivisionError): | |||
wio.write(large_data) |
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.
I needed to make this change because otherwise the exception is not swallowed (seems that it shows up after the self.assertRaises call has returned).
It looks like the |