◐ Shell
clean mode source ↗

Move stats for the method cache into the `Py_STAT` machinery by markshannon · Pull Request #100255 · python/cpython

carljm

Choose a reason for hiding this comment

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

LGTM

Comment on lines +4174 to +4175

OBJECT_STAT_INC_COND(type_cache_misses, !is_dunder_name(name));
OBJECT_STAT_INC_COND(type_cache_dunder_misses, is_dunder_name(name));

Choose a reason for hiding this comment

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

I assume there's no user of these stats who will care that the definition of a "miss" now includes collisions whereas before it excluded collisions? Obviously the same information is derivable either way.

Choose a reason for hiding this comment

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

The old stats were only available if MCACHE_STATS was defined, which could only be done by editing the source or build. There is no configure option. So, I don't see how there can be a user.