mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-124284: Add stats for refcount operations on immortal objects (GH-124288)
This commit is contained in:
parent
6203ef35dd
commit
c87b0e4a46
7 changed files with 45 additions and 10 deletions
|
@ -79,6 +79,7 @@
|
|||
do { \
|
||||
PyObject *op = _PyObject_CAST(arg); \
|
||||
if (_Py_IsImmortal(op)) { \
|
||||
_Py_DECREF_IMMORTAL_STAT_INC(); \
|
||||
break; \
|
||||
} \
|
||||
_Py_DECREF_STAT_INC(); \
|
||||
|
@ -93,6 +94,7 @@
|
|||
do { \
|
||||
PyObject *op = _PyObject_CAST(arg); \
|
||||
if (_Py_IsImmortal(op)) { \
|
||||
_Py_DECREF_IMMORTAL_STAT_INC(); \
|
||||
break; \
|
||||
} \
|
||||
_Py_DECREF_STAT_INC(); \
|
||||
|
@ -110,6 +112,7 @@
|
|||
PyObject *op = _PyObject_CAST(arg); \
|
||||
uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local); \
|
||||
if (local == _Py_IMMORTAL_REFCNT_LOCAL) { \
|
||||
_Py_DECREF_IMMORTAL_STAT_INC(); \
|
||||
break; \
|
||||
} \
|
||||
_Py_DECREF_STAT_INC(); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue