]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-113010: Don't decrement deferred in pystats (#113032)
authorMichael Droettboom <mdboom@gmail.com>
Tue, 12 Dec 2023 21:17:08 +0000 (16:17 -0500)
committerGitHub <noreply@github.com>
Tue, 12 Dec 2023 21:17:08 +0000 (21:17 +0000)
This fixes a recently introduced bug where the deferred count is being unnecessarily decremented to counteract an increment elsewhere that is no longer happening. This caused the values to flip around to "very large" 64-bit numbers.

Python/ceval_macros.h

index f298c602b1042b8eb0ed7bd21ffb21cb1418e391..ac44aecae046d8ffe2b5577384429026856d5509 100644 (file)
@@ -258,10 +258,6 @@ GETITEM(PyObject *v, Py_ssize_t i) {
         if (ADAPTIVE_COUNTER_IS_ZERO(next_instr->cache)) {       \
             STAT_INC((INSTNAME), deopt);                         \
         }                                                        \
-        else {                                                   \
-            /* This is about to be (incorrectly) incremented: */ \
-            STAT_DEC((INSTNAME), deferred);                      \
-        }                                                        \
     } while (0)
 #else
 #define UPDATE_MISS_STATS(INSTNAME) ((void)0)