python / python/cpython

pystats: Improve with JIT builds

Open
#117,121 4 comments 0 reactions 1 assignee View on GitHub

@mdboom is already working on this.

Since Mar 21, 2024.

performance topic-JIT type-feature
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

Feature or enhancement

Proposal:

At the moment, not all pystats work for a JIT build. This is mostly because certain stat collections exist in the Tier 2 interpreter loop, not in the bytecode instructions themselves. The reason for having parity in the stats is not so much that we expect the numbers to be different vs. a Tier 2 run, but because it would be nice to add some JIT-specific stats (e.g. a code size histogram) and the only way to do that now would be to collect stats twice and combine them.

A list of what's missing:

  • traces executed
  • uops executed
  • trace run length histogram
  • uop execution stats

I'm volunteering to do the work, but maybe @brandtbucher could confirm this makes sense?

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs
  • gh-117346

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.