summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2024-04-18 14:59:02 (GMT)
committerGitHub <noreply@github.com>2024-04-18 14:59:02 (GMT)
commit40f4d641a93b1cba89be4bc7b26cdb481e0450d5 (patch)
treeaa47081d9386a68c6b5bb8184d7e9af832f71a48
parent81a926bd20a8c66646e51b66ef1cfb309b73ebe7 (diff)
downloadcpython-40f4d641a93b1cba89be4bc7b26cdb481e0450d5.zip
cpython-40f4d641a93b1cba89be4bc7b26cdb481e0450d5.tar.gz
cpython-40f4d641a93b1cba89be4bc7b26cdb481e0450d5.tar.bz2
GH-118036: Fix a bug with CALL_STAT_INC (#117933)
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".
-rw-r--r--Python/ceval.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index c0783f7..b88e555 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -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