]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-118036: Fix a bug with CALL_STAT_INC (#117933)
authorGuido van Rossum <guido@python.org>
Thu, 18 Apr 2024 14:59:02 +0000 (07:59 -0700)
committerGitHub <noreply@github.com>
Thu, 18 Apr 2024 14:59:02 +0000 (07:59 -0700)
We were under-counting calls in `_PyEvalFramePushAndInit`
because the `CALL_STAT_INC` macro was redefined to a no-op
for the Tier 2 interpreter. The fix is not to `#undef` it at all.
This results in ~37% more "Frames pushed" reported
under "Call stats".

Python/ceval.c

index c0783f7377a8ee1019b4a4e7afbaf7608ac30331..b88e555ded5c2ee132fc6eef40a545634af57b90 100644 (file)
@@ -978,8 +978,6 @@ enter_tier_two:
 #define STAT_INC(opname, name) ((void)0)
 #undef STAT_DEC
 #define STAT_DEC(opname, name) ((void)0)
-#undef CALL_STAT_INC
-#define CALL_STAT_INC(name) ((void)0)
 #endif
 
 #undef ENABLE_SPECIALIZATION