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
pystats specialization deferred numbers are wrong #113010
Comments
|
The source of the issue seems to be decrementing the deferred counter more times than it's incremented, thus going negative. (The larger than 64 bit number is created because it's an aggregate of multiple runs, from the The deferred value is decremented inside of https://github.com/python/cpython/blob/main/Python/ceval_macros.h#L263 |
|
Yes, it looks like we specifically emit the Do we actually need the |
|
We do increment deferred from a number of bytecodes in bytecodes.c, for example: https://github.com/python/cpython/blob/main/Python/bytecodes.c#L328 However, I can't speak to whether they are still needed. It's easy enough to remove the whole field. I'm also re-running pystats now with the decrement removed so we can see whether the results look plausible. |
This fixes a recently introduced bug where the deferred count is being unnecessarily decremented to counteract an increment elsewhere that is no longer happening. This caused the values to flip around to "very large" 64-bit numbers.
Bug report
Bug description:
For many of the "deferred" values in the "specialization" section for each bytecode, the number is enormous. For example
We need to investigate where this is coming from (either the Python runtime or the summarize_stats.py script) and fix appropriately.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: