[Python-checkins] Fix stats for STORE_ATTR specialization. (GH-27708)

markshannon webhook-mailer at python.org
Tue Aug 10 06:40:56 EDT 2021


https://github.com/python/cpython/commit/c7ea1e3dcea6fbc9842463ce2b785b43501b1eaa
commit: c7ea1e3dcea6fbc9842463ce2b785b43501b1eaa
branch: main
author: Mark Shannon <mark at hotpy.org>
committer: markshannon <mark at hotpy.org>
date: 2021-08-10T11:40:37+01:00
summary:

Fix stats for STORE_ATTR specialization. (GH-27708)

files:
M Python/ceval.c

diff --git a/Python/ceval.c b/Python/ceval.c
index b7b63856c61c8..f685c79b4cac0 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -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);
             }
         }



More information about the Python-checkins mailing list