Skip to content

Trace recording JIT #139109

Open
Open

Description

@Fidget-Spinner

This issue tracks progress of changing the JIT from one that projects traces to one that records them.

Follow-ups:

  • Embed ENTER_EXECUTOR's executor in the bytecode and on trace graphs?
  • Do not increase chain depth when side-exiting a branch, as that is just normal control-flow.
  • Optimize through CALL_ALLOC_AND_ENTER_INIT
  • Specialize: CALL_FUNCTION_EX, __init__ of slots, SEND for yield from
  • Loop peel.

Linked PRs

Activity

  1. Fidget-Spinner commented on Nov 14, 2025

    @Fidget-Spinner
    MemberAuthor

    I found a serious perf regression on nbody. The problem is that stop_tracing adds a _DEOPT when it sees ENTER_EXECUTOR, thus causing the traces to stop growing. I put _EXIT_TRACE previously, but forgot about it when the JIT code was undergoing refactoring.

    The fix is just to pass the opcode of the exit op in. Will do that later.

  2. added a commit that references this issue on Nov 15, 2025
  3. added a commit that references this issue on Nov 18, 2025
  4. added 3 commits that reference this issue on Dec 6, 2025
  5. savannahostrowski commented on Dec 10, 2025

    @savannahostrowski
    Member

    @Fidget-Spinner Is this closable now? Can we track bugs etc. in new issues?
    For example: #139109 (comment)?

  6. Fidget-Spinner commented on Dec 10, 2025

    @Fidget-Spinner
    MemberAuthor

    Yeah lets do follow ups separately

  7. markshannon commented on Dec 16, 2025

    @markshannon
    Member

    I'd rather keep this open, otherwise it gives a false impression of being finished when there's some clean up to do.
    Or, make new issues for the list above and then close this one.

  8. Fidget-Spinner commented on Dec 16, 2025

    @Fidget-Spinner
    MemberAuthor

    Restore the optimization for stack size checks and its tests

    I think we should abandon this and just clean up the code implementing this optimisation. It's generally very finnicky and I don't think it nets us much perf wins.

  9. added a commit that references this issue on Dec 22, 2025
  10. added a commit that references this issue on Jan 22, 2026
  11. cocolato commented on Feb 2, 2026

    @cocolato
    Member

    I think we should abandon this and just clean up the code implementing this optimisation. It's generally very finnicky and I don't think it nets us much perf wins.

    Hi, @Fidget-Spinner
    Refer: #144388. Should we convert _CHECK_STACK_SPACE to _CHECK_STACK_SPACE_OPERAND one by one? If we need this, i'll implement it.

  12. added a commit that references this issue on Feb 2, 2026
  13. added a commit that references this issue on Feb 3, 2026
  14. added 2 commits that reference this issue on Feb 15, 2026
  15. added a commit that references this issue on Mar 31, 2026
  16. added a commit that references this issue on Apr 16, 2026
  17. added a commit that references this issue on Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)topic-JITtype-featureA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions