Skip to content

Try recording traces instead of projecting them #124950

@brandtbucher

Description

@brandtbucher

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.

Metadata

Metadata

Assignees

Labels

3.14bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usage

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions