X Tutup
The Wayback Machine - https://web.archive.org/web/20241007182101/https://github.com/python/cpython/issues/124950
Skip to content
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

Try recording traces instead of projecting them #124950

Open
brandtbucher opened this issue Oct 3, 2024 · 0 comments
Open

Try recording traces instead of projecting them #124950

brandtbucher opened this issue Oct 3, 2024 · 0 comments
Assignees
Labels
3.14 new features, bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage

Comments

@brandtbucher
Copy link
Member

Projecting traces into the future is quite complex: it requires lots of profiling information to track callees, branch directions, etc. Additionally, returning to callers and flowing in and out of generators is incredibly difficult to do correctly (we currently avoid the issue by either ending the trace or using _DYNAMIC_EXIT as an escape hatch).

The original JIT prototype used recorded traces, which "listen" to the tier one interpreter as it runs and records the path that it takes. This means we get accurate control-flow "for free", assuming that the path we trace is a reasonably common one.

I'd like to prototype replacing our current trace projection loop with trace recording in tier 1, just to see if it relieves any of the headaches we have in this area or makes anything simpler or more effective.

@brandtbucher brandtbucher added performance Performance or resource usage interpreter-core (Objects, Python, Grammar, and Parser dirs) 3.14 new features, bugs and security fixes labels Oct 3, 2024
@brandtbucher brandtbucher self-assigned this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.14 new features, bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage
Projects
None yet
Development

No branches or pull requests

1 participant
X Tutup