Mailing List Archive

GH-118036: Fix a bug with CALL_STAT_INC (#117933)
https://github.com/python/cpython/commit/40f4d641a93b1cba89be4bc7b26cdb481e0450d5
commit: 40f4d641a93b1cba89be4bc7b26cdb481e0450d5
branch: main
author: Guido van Rossum <guido@python.org>
committer: gvanrossum <gvanrossum@gmail.com>
date: 2024-04-18T07:59:02-07:00
summary:

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".

files:
M Python/ceval.c

diff --git a/Python/ceval.c b/Python/ceval.c
index c0783f7377a8ee..b88e555ded5c2e 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -978,8 +978,6 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
#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

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-leave@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: list-python-checkins@lists.gossamer-threads.com