This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Remove the RESUME instruction
Type: performance Stage: patch review
Components: Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Mark.Shannon Nosy List: Mark.Shannon
Priority: normal Keywords: patch

Created on 2022-03-17 16:23 by Mark.Shannon, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 31963 merged Mark.Shannon, 2022-03-17 16:45
Messages (2)
msg415424 - (view) Author: Mark Shannon (Mark.Shannon) * (Python committer) Date: 2022-03-17 16:23
The RESUME instruction was added to make resumption points explicit in the bytecode. This makes it easier to implement tracing, quickening, and interrupt checks as there is an explicit place to perform these checks.

Unfortunately, it also has considerable overhead. So we should remove it.
To do that, we need to:
1. Remove f_state from the InterpreterFrame so we don't need to update it.
2 .Quicken automatically in the adaptive instructions.
3. Check the evalbreaker when resuming a frame in the interpreter.
4. Add some metadata to the code object, so that we know when to fire "call" events when tracing.
msg415766 - (view) Author: Mark Shannon (Mark.Shannon) * (Python committer) Date: 2022-03-22 12:57
New changeset 49daf6dba8178c5ae5d4d65408b20566d39c36a8 by Mark Shannon in branch 'main':
bpo-47045: Remove `f_state` field (GH-31963)
https://github.com/python/cpython/commit/49daf6dba8178c5ae5d4d65408b20566d39c36a8
History
Date User Action Args
2022-04-11 14:59:57adminsetgithub: 91201
2022-03-22 12:57:28Mark.Shannonsetmessages: + msg415766
2022-03-17 16:45:31Mark.Shannonsetkeywords: + patch
stage: patch review
pull_requests: + pull_request30052
2022-03-17 16:23:10Mark.Shannoncreate