Thanks to visit codestin.com
Credit goes to github.com

Skip to content

"Deferred by Instruction" stats don't add up. #123232

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

Closed
markshannon opened this issue Aug 22, 2024 · 4 comments
Closed

"Deferred by Instruction" stats don't add up. #123232

markshannon opened this issue Aug 22, 2024 · 4 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@markshannon
Copy link
Member

markshannon commented Aug 22, 2024

Bug report

Bug description:

The "Deferred by instruction" stats should add up to the total "Not specialized" total in Specialization effectiveness but they don't come close.

In the current latest stats "Not specialized" total is ~8.8 billion, but the "deferred by instruction" adds up to only ~4 billion.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

@markshannon markshannon added the type-bug An unexpected behavior, bug, or error label Aug 22, 2024
@markshannon
Copy link
Member Author

It looks like we are treating any instruction with a cache as specializable.
It used to be true than any instruction with a cache was specializable, but it isn't any more.

@picnixz picnixz added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Aug 22, 2024
@markshannon
Copy link
Member Author

The "deferred by instruction" counts won't quite add to the "not specialized" total as they don't include successful specializations.
But they should be close.

@brandtbucher
Copy link
Member

I think the new stats are still incorrect in tier two (the macro uses the opcode local variable, which is meaningless). And they won't build with the JIT, since opcode isn't defined in the JIT template.

@brandtbucher brandtbucher reopened this Aug 26, 2024
@markshannon
Copy link
Member Author

I think the new stats are still incorrect in tier two

These are tier 1 stats. They are (mostly) meaningless with tier 2 active as tier 2 doesn't specialize, so messes up the ratios.

And they won't build with the JIT

Fixed by #123381

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants