diff options
author | Mark Shannon <mark@hotpy.org> | 2022-05-03 22:40:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 22:40:24 (GMT) |
commit | 836b17c9c3ea313e400e58a75f52b63f96e498bb (patch) | |
tree | 8b1a1c9e2466fa72ceee01558e76989b35c8bd56 /Objects/floatobject.c | |
parent | e8d7661ff25fb698062ab07e37362c2c20471984 (diff) | |
download | cpython-836b17c9c3ea313e400e58a75f52b63f96e498bb.zip cpython-836b17c9c3ea313e400e58a75f52b63f96e498bb.tar.gz cpython-836b17c9c3ea313e400e58a75f52b63f96e498bb.tar.bz2 |
Add more stats for freelist use and allocations. (GH-92211)
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r-- | Objects/floatobject.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c index a5774b9..86861b7 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -141,6 +141,7 @@ PyFloat_FromDouble(double fval) #endif state->free_list = (PyFloatObject *) Py_TYPE(op); state->numfree--; + OBJECT_STAT_INC(from_freelist); } else #endif @@ -256,6 +257,7 @@ _PyFloat_ExactDealloc(PyObject *obj) state->numfree++; Py_SET_TYPE(op, (PyTypeObject *)state->free_list); state->free_list = op; + OBJECT_STAT_INC(to_freelist); #else PyObject_Free(op); #endif |