]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix stats for STORE_ATTR specialization. (GH-27708)
authorMark Shannon <mark@hotpy.org>
Tue, 10 Aug 2021 10:40:37 +0000 (11:40 +0100)
committerGitHub <noreply@github.com>
Tue, 10 Aug 2021 10:40:37 +0000 (11:40 +0100)
Python/ceval.c

index b7b63856c61c802a72a3d7020c2cf3c17376e3b5..f685c79b4cac0ae0abf02745838126ac29222007 100644 (file)
@@ -2767,6 +2767,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
 
         case TARGET(STORE_ATTR): {
             PREDICTED(STORE_ATTR);
+            STAT_INC(STORE_ATTR, unquickened);
             PyObject *name = GETITEM(names, oparg);
             PyObject *owner = TOP();
             PyObject *v = SECOND();
@@ -3503,6 +3504,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
                 STAT_INC(STORE_ATTR, deferred);
                 cache->adaptive.counter--;
                 oparg = cache->adaptive.original_oparg;
+                STAT_DEC(STORE_ATTR, unquickened);
                 JUMP_TO_INSTRUCTION(STORE_ATTR);
             }
         }