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
Minor fixes to specialization stats. #27457
Conversation
…unquickened instructions.
| @@ -3380,6 +3381,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr | |||
| STAT_INC(LOAD_ATTR, deferred); | |||
| cache->adaptive.counter--; | |||
| oparg = cache->adaptive.original_oparg; | |||
| STAT_DEC(LOAD_ATTR, unquickened); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this in LOAD_GLOBAL as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These counters are uints. Is there no danger of underflow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These counters are uints. Is there no danger of underflow?
Unsigned int underflow is well defined in C (unlike for signed int). So the STAT_DEC followed by the STAT_INC is a no op for all values.
ADAPTIVEinstructions as unquickened as well.