FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-109369: Exit tier 2 if executor is invalid by markshannon · Pull Request #111657 · python/cpython · GitHub

Repository navigation

GH-109369: Exit tier 2 if executor is invalid - #111657

Merged
markshannon merged 11 commits into
python:mainfrom
faster-cpython:exit-if-invalid
Nov 9, 2023
Merged

markshannon merged 11 commits into
python:mainfrom
faster-cpython:exit-if-invalid

Conversation

markshannon commented Nov 2, 2023 •
edited
Loading

Copy link
Copy Markdown
Member

Fixes GH-109369.
Adds a _CHECK_VALIDITY uop which is inserted after any escaping operations.
Ensures that uop traces will be exited promptly if the code is instrumented.

markshannon marked this pull request as ready for review November 6, 2023 14:36
Comment thread Python/optimizer.c Outdated
markshannon and others added 2 commits November 8, 2023 12:28
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>

Copy link
Copy Markdown
Member

So, on the JIT branch, we don't actually keep the executor handy when executing instructions (only when entering/exiting traces). I'm guessing we'll need it a lot more in the future once we start doing stitching and such, but I wonder: can we just stick it on the tstate or the frame? It feels a bit painful to dedicate a register to this thing, especially since it'll be hardly used in optimized traces (I think).

Not a big deal though, and can be deferred to a later date. Just something to ponder, or to do if it's easy now.

brandtbucher commented Nov 8, 2023 •
edited
Loading

Copy link
Copy Markdown
Member

Idea: put the executor's address in _CHECK_VALIDITY's operand? Then the JIT would require no modifications to support this change.

Copy link
Copy Markdown
Member

Ah, never mind, the JIT can burn in the executor. I withdraw my comments. :)

markshannon merged commit 25c4956 into python:main Nov 9, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
markshannon deleted the exit-if-invalid branch August 6, 2024 10:18
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Executors might ignore instrumentation.

3 participants


Back | FazBrowse Home | New Git URL