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

GH-146073: Add fitness to executor dumps. by markshannon · Pull Request #148959 · python/cpython · GitHub

/ cpython Public

GH-146073: Add fitness to executor dumps. - #148959

Merged
markshannon merged 2 commits into
python:mainfrom
markshannon:fitness-in-trace-dump
Apr 27, 2026
Merged

GH-146073: Add fitness to executor dumps.#148959
markshannon merged 2 commits into
python:mainfrom
markshannon:fitness-in-trace-dump

Conversation

markshannon commented Apr 24, 2026
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Adds the fitness to trace dumps, to make it easier to see when the fitness and actual execution counts diverge.

Example:

Comment thread Python/optimizer.c
inst->operand0 = operand;
#ifdef Py_STATS
inst->execution_count = 0;
inst->fitness = tracer->translator_state.fitness;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Should we need reset/set fitness when calling make_exit?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The fitness of an exit is meaningless. We could set it to zero, to avoid confusion

diegorusso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM thanks!

markshannon merged commit 276f474 into python:main Apr 27, 2026
73 checks passed
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL