Coverage Report

Created: 2026-08-13 06:33

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/cpython3/Include/refcount.h
Line
Count
Source
1
#ifndef _Py_REFCOUNT_H
2
#define _Py_REFCOUNT_H
3
#ifdef __cplusplus
4
extern "C" {
5
#endif
6
7
8
#if !defined(_Py_OPAQUE_PYOBJECT)
9
/*
10
Immortalization:
11
12
The following indicates the immortalization strategy depending on the amount
13
of available bits in the reference count field. All strategies are backwards
14
compatible but the specific reference count value or immortalization check
15
might change depending on the specializations for the underlying system.
16
17
Proper deallocation of immortal instances requires distinguishing between
18
statically allocated immortal instances vs those promoted by the runtime to be
19
immortal. The latter should be the only instances that require
20
cleanup during runtime finalization.
21
*/
22
23
#if SIZEOF_VOID_P > 4
24
/*
25
In 64+ bit systems, any object whose 32 bit reference count is >= 2**31
26
will be treated as immortal.
27
28
Using the lower 32 bits makes the value backwards compatible by allowing
29
C-Extensions without the updated checks in Py_INCREF and Py_DECREF to safely
30
increase and decrease the objects reference count.
31
32
In order to offer sufficient resilience to C extensions using the stable ABI
33
compiled against 3.11 or earlier, we set the initial value near the
34
middle of the range (2**31, 2**32). That way the refcount can be
35
off by ~1 billion without affecting immortality.
36
37
Reference count increases will use saturated arithmetic, taking advantage of
38
having all the lower 32 bits set, which will avoid the reference count to go
39
beyond the refcount limit. Immortality checks for reference count decreases will
40
be done by checking the bit sign flag in the lower 32 bits.
41
42
To ensure that once an object becomes immortal, it remains immortal, the threshold
43
for omitting increfs is much higher than for omitting decrefs. Consequently, once
44
the refcount for an object exceeds _Py_IMMORTAL_MINIMUM_REFCNT it will gradually
45
increase over time until it reaches _Py_IMMORTAL_INITIAL_REFCNT.
46
*/
47
2.10G
#define _Py_IMMORTAL_INITIAL_REFCNT (3ULL << 30)
48
56.3k
#define _Py_IMMORTAL_MINIMUM_REFCNT (1ULL << 31)
49
2.24M
#define _Py_STATIC_FLAG_BITS ((Py_ssize_t)(_Py_STATICALLY_ALLOCATED_FLAG | _Py_IMMORTAL_FLAGS))
50
2.24M
#define _Py_STATIC_IMMORTAL_INITIAL_REFCNT (((Py_ssize_t)_Py_IMMORTAL_INITIAL_REFCNT) | (_Py_STATIC_FLAG_BITS << 48))
51
52
#else
53
/*
54
In 32 bit systems, an object will be treated as immortal if its reference
55
count equals or exceeds _Py_IMMORTAL_MINIMUM_REFCNT (2**30).
56
57
Using the lower 30 bits makes the value backwards compatible by allowing
58
C-Extensions without the updated checks in Py_INCREF and Py_DECREF to safely
59
increase and decrease the objects reference count. The object would lose its
60
immortality, but the execution would still be correct.
61
62
Reference count increases and decreases will first go through an immortality
63
check by comparing the reference count field to the minimum immortality refcount.
64
*/
65
#define _Py_IMMORTAL_INITIAL_REFCNT ((Py_ssize_t)(5L << 28))
66
#define _Py_IMMORTAL_MINIMUM_REFCNT ((Py_ssize_t)(1L << 30))
67
#define _Py_STATIC_IMMORTAL_INITIAL_REFCNT ((Py_ssize_t)(7L << 28))
68
#define _Py_STATIC_IMMORTAL_MINIMUM_REFCNT ((Py_ssize_t)(6L << 28))
69
#endif
70
71
// Py_GIL_DISABLED builds indicate immortal objects using `ob_ref_local`, which is
72
// always 32-bits.
73
#ifdef Py_GIL_DISABLED
74
#define _Py_IMMORTAL_REFCNT_LOCAL UINT32_MAX
75
#endif
76
77
78
#ifdef Py_GIL_DISABLED
79
   // The shared reference count uses the two least-significant bits to store
80
   // flags. The remaining bits are used to store the reference count.
81
#  define _Py_REF_SHARED_SHIFT        2
82
#  define _Py_REF_SHARED_FLAG_MASK    0x3
83
84
   // The shared flags are initialized to zero.
85
#  define _Py_REF_SHARED_INIT         0x0
86
#  define _Py_REF_MAYBE_WEAKREF       0x1
87
#  define _Py_REF_QUEUED              0x2
88
#  define _Py_REF_MERGED              0x3
89
90
   // Create a shared field from a refcnt and desired flags
91
#  define _Py_REF_SHARED(refcnt, flags) \
92
              (((refcnt) << _Py_REF_SHARED_SHIFT) + (flags))
93
#endif  // Py_GIL_DISABLED
94
#endif  // _Py_OPAQUE_PYOBJECT
95
96
// Py_REFCNT() implementation for the stable ABI
97
PyAPI_FUNC(Py_ssize_t) Py_REFCNT(PyObject *ob);
98
99
#if defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030e0000
100
    // Stable ABI implements Py_REFCNT() as a function call
101
    // on limited C API version 3.14 and newer, and on abi3t.
102
#elif defined(_Py_OPAQUE_PYOBJECT)
103
    // Py_REFCNT() is also a function call in abi3t.
104
#else
105
282M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
282M
    #if !defined(Py_GIL_DISABLED)
107
282M
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
282M
    }
Unexecuted instantiation: exceptions.c:_Py_REFCNT
genericaliasobject.c:_Py_REFCNT
Line
Count
Source
105
46
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
46
    #if !defined(Py_GIL_DISABLED)
107
46
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
46
    }
Unexecuted instantiation: listobject.c:_Py_REFCNT
longobject.c:_Py_REFCNT
Line
Count
Source
105
237k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
237k
    #if !defined(Py_GIL_DISABLED)
107
237k
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
237k
    }
dictobject.c:_Py_REFCNT
Line
Count
Source
105
21.6M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
21.6M
    #if !defined(Py_GIL_DISABLED)
107
21.6M
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
21.6M
    }
moduleobject.c:_Py_REFCNT
Line
Count
Source
105
4
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
4
    #if !defined(Py_GIL_DISABLED)
107
4
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
4
    }
object.c:_Py_REFCNT
Line
Count
Source
105
27.0M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
27.0M
    #if !defined(Py_GIL_DISABLED)
107
27.0M
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
27.0M
    }
Unexecuted instantiation: obmalloc.c:_Py_REFCNT
Unexecuted instantiation: picklebufobject.c:_Py_REFCNT
Unexecuted instantiation: rangeobject.c:_Py_REFCNT
Unexecuted instantiation: sentinelobject.c:_Py_REFCNT
setobject.c:_Py_REFCNT
Line
Count
Source
105
891k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
891k
    #if !defined(Py_GIL_DISABLED)
107
891k
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
891k
    }
Unexecuted instantiation: sliceobject.c:_Py_REFCNT
Unexecuted instantiation: structseq.c:_Py_REFCNT
Unexecuted instantiation: templateobject.c:_Py_REFCNT
tupleobject.c:_Py_REFCNT
Line
Count
Source
105
56.6k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
56.6k
    #if !defined(Py_GIL_DISABLED)
107
56.6k
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
56.6k
    }
typeobject.c:_Py_REFCNT
Line
Count
Source
105
14.1k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
14.1k
    #if !defined(Py_GIL_DISABLED)
107
14.1k
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
14.1k
    }
Unexecuted instantiation: typevarobject.c:_Py_REFCNT
Unexecuted instantiation: unicode_formatter.c:_Py_REFCNT
Unexecuted instantiation: unicode_writer.c:_Py_REFCNT
Unexecuted instantiation: unicodectype.c:_Py_REFCNT
unicodeobject.c:_Py_REFCNT
Line
Count
Source
105
19.1M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
19.1M
    #if !defined(Py_GIL_DISABLED)
107
19.1M
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
19.1M
    }
unionobject.c:_Py_REFCNT
Line
Count
Source
105
6
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
6
    #if !defined(Py_GIL_DISABLED)
107
6
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
6
    }
weakrefobject.c:_Py_REFCNT
Line
Count
Source
105
7.84M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
7.84M
    #if !defined(Py_GIL_DISABLED)
107
7.84M
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
7.84M
    }
Unexecuted instantiation: _warnings.c:_Py_REFCNT
bltinmodule.c:_Py_REFCNT
Line
Count
Source
105
414
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
414
    #if !defined(Py_GIL_DISABLED)
107
414
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
414
    }
ceval.c:_Py_REFCNT
Line
Count
Source
105
19.7M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
19.7M
    #if !defined(Py_GIL_DISABLED)
107
19.7M
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
19.7M
    }
Unexecuted instantiation: codecs.c:_Py_REFCNT
Unexecuted instantiation: codegen.c:_Py_REFCNT
Unexecuted instantiation: compile.c:_Py_REFCNT
Unexecuted instantiation: context.c:_Py_REFCNT
Unexecuted instantiation: errors.c:_Py_REFCNT
Unexecuted instantiation: flowgraph.c:_Py_REFCNT
frame.c:_Py_REFCNT
Line
Count
Source
105
6.50M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
6.50M
    #if !defined(Py_GIL_DISABLED)
107
6.50M
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
6.50M
    }
Unexecuted instantiation: future.c:_Py_REFCNT
gc.c:_Py_REFCNT
Line
Count
Source
105
130M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
130M
    #if !defined(Py_GIL_DISABLED)
107
130M
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
130M
    }
Unexecuted instantiation: gc_gil.c:_Py_REFCNT
Unexecuted instantiation: getargs.c:_Py_REFCNT
Unexecuted instantiation: ceval_gil.c:_Py_REFCNT
Unexecuted instantiation: hamt.c:_Py_REFCNT
Unexecuted instantiation: hashtable.c:_Py_REFCNT
import.c:_Py_REFCNT
Line
Count
Source
105
21
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
21
    #if !defined(Py_GIL_DISABLED)
107
21
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
21
    }
Unexecuted instantiation: importdl.c:_Py_REFCNT
Unexecuted instantiation: initconfig.c:_Py_REFCNT
Unexecuted instantiation: instrumentation.c:_Py_REFCNT
Unexecuted instantiation: instruction_sequence.c:_Py_REFCNT
intrinsics.c:_Py_REFCNT
Line
Count
Source
105
503
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
503
    #if !defined(Py_GIL_DISABLED)
107
503
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
503
    }
Unexecuted instantiation: legacy_tracing.c:_Py_REFCNT
Unexecuted instantiation: lock.c:_Py_REFCNT
Unexecuted instantiation: marshal.c:_Py_REFCNT
Unexecuted instantiation: modsupport.c:_Py_REFCNT
Unexecuted instantiation: mysnprintf.c:_Py_REFCNT
Unexecuted instantiation: parking_lot.c:_Py_REFCNT
Unexecuted instantiation: preconfig.c:_Py_REFCNT
Unexecuted instantiation: pyarena.c:_Py_REFCNT
Unexecuted instantiation: pyctype.c:_Py_REFCNT
Unexecuted instantiation: pyhash.c:_Py_REFCNT
Unexecuted instantiation: pylifecycle.c:_Py_REFCNT
Unexecuted instantiation: pystate.c:_Py_REFCNT
Unexecuted instantiation: pythonrun.c:_Py_REFCNT
Unexecuted instantiation: pytime.c:_Py_REFCNT
Unexecuted instantiation: qsbr.c:_Py_REFCNT
Unexecuted instantiation: bootstrap_hash.c:_Py_REFCNT
Unexecuted instantiation: specialize.c:_Py_REFCNT
Unexecuted instantiation: slots.c:_Py_REFCNT
Unexecuted instantiation: slots_generated.c:_Py_REFCNT
Unexecuted instantiation: structmember.c:_Py_REFCNT
Unexecuted instantiation: symtable.c:_Py_REFCNT
Unexecuted instantiation: sysmodule.c:_Py_REFCNT
Unexecuted instantiation: thread.c:_Py_REFCNT
Unexecuted instantiation: traceback.c:_Py_REFCNT
Unexecuted instantiation: tracemalloc.c:_Py_REFCNT
Unexecuted instantiation: typecache.c:_Py_REFCNT
Unexecuted instantiation: getopt.c:_Py_REFCNT
Unexecuted instantiation: pystrcmp.c:_Py_REFCNT
Unexecuted instantiation: pystrtod.c:_Py_REFCNT
Unexecuted instantiation: dtoa.c:_Py_REFCNT
Unexecuted instantiation: fileutils.c:_Py_REFCNT
Unexecuted instantiation: suggestions.c:_Py_REFCNT
Unexecuted instantiation: perf_trampoline.c:_Py_REFCNT
Unexecuted instantiation: perf_jit_trampoline.c:_Py_REFCNT
Unexecuted instantiation: jit_unwind.c:_Py_REFCNT
Unexecuted instantiation: remote_debugging.c:_Py_REFCNT
Unexecuted instantiation: dynload_shlib.c:_Py_REFCNT
Unexecuted instantiation: config.c:_Py_REFCNT
Unexecuted instantiation: gcmodule.c:_Py_REFCNT
Unexecuted instantiation: _asynciomodule.c:_Py_REFCNT
Unexecuted instantiation: atexitmodule.c:_Py_REFCNT
Unexecuted instantiation: faulthandler.c:_Py_REFCNT
Unexecuted instantiation: posixmodule.c:_Py_REFCNT
Unexecuted instantiation: signalmodule.c:_Py_REFCNT
Unexecuted instantiation: _tracemalloc.c:_Py_REFCNT
Unexecuted instantiation: _suggestions.c:_Py_REFCNT
Unexecuted instantiation: _datetimemodule.c:_Py_REFCNT
Unexecuted instantiation: _codecsmodule.c:_Py_REFCNT
Unexecuted instantiation: _collectionsmodule.c:_Py_REFCNT
Unexecuted instantiation: errnomodule.c:_Py_REFCNT
Unexecuted instantiation: _iomodule.c:_Py_REFCNT
iobase.c:_Py_REFCNT
Line
Count
Source
105
397
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
397
    #if !defined(Py_GIL_DISABLED)
107
397
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
397
    }
fileio.c:_Py_REFCNT
Line
Count
Source
105
197
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
197
    #if !defined(Py_GIL_DISABLED)
107
197
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
197
    }
Unexecuted instantiation: bytesio.c:_Py_REFCNT
bufferedio.c:_Py_REFCNT
Line
Count
Source
105
197
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
197
    #if !defined(Py_GIL_DISABLED)
107
197
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
197
    }
textio.c:_Py_REFCNT
Line
Count
Source
105
3
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
3
    #if !defined(Py_GIL_DISABLED)
107
3
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
3
    }
Unexecuted instantiation: stringio.c:_Py_REFCNT
itertoolsmodule.c:_Py_REFCNT
Line
Count
Source
105
810
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
810
    #if !defined(Py_GIL_DISABLED)
107
810
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
810
    }
sre.c:_Py_REFCNT
Line
Count
Source
105
1.77k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
1.77k
    #if !defined(Py_GIL_DISABLED)
107
1.77k
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
1.77k
    }
Unexecuted instantiation: _sysconfig.c:_Py_REFCNT
Unexecuted instantiation: _threadmodule.c:_Py_REFCNT
Unexecuted instantiation: timemodule.c:_Py_REFCNT
Unexecuted instantiation: _typesmodule.c:_Py_REFCNT
Unexecuted instantiation: _typingmodule.c:_Py_REFCNT
Unexecuted instantiation: _weakref.c:_Py_REFCNT
Unexecuted instantiation: _abc.c:_Py_REFCNT
_functoolsmodule.c:_Py_REFCNT
Line
Count
Source
105
8
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
8
    #if !defined(Py_GIL_DISABLED)
107
8
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
8
    }
Unexecuted instantiation: _localemodule.c:_Py_REFCNT
Unexecuted instantiation: _opcode.c:_Py_REFCNT
Unexecuted instantiation: _operator.c:_Py_REFCNT
Unexecuted instantiation: _stat.c:_Py_REFCNT
Unexecuted instantiation: symtablemodule.c:_Py_REFCNT
Unexecuted instantiation: pwdmodule.c:_Py_REFCNT
Unexecuted instantiation: getpath.c:_Py_REFCNT
Unexecuted instantiation: frozen.c:_Py_REFCNT
Unexecuted instantiation: getbuildinfo.c:_Py_REFCNT
Unexecuted instantiation: peg_api.c:_Py_REFCNT
Unexecuted instantiation: file_tokenizer.c:_Py_REFCNT
Unexecuted instantiation: helpers.c:_Py_REFCNT
Unexecuted instantiation: myreadline.c:_Py_REFCNT
Unexecuted instantiation: abstract.c:_Py_REFCNT
Unexecuted instantiation: boolobject.c:_Py_REFCNT
Unexecuted instantiation: bytes_methods.c:_Py_REFCNT
Unexecuted instantiation: bytearrayobject.c:_Py_REFCNT
bytesobject.c:_Py_REFCNT
Line
Count
Source
105
417k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
417k
    #if !defined(Py_GIL_DISABLED)
107
417k
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
417k
    }
Unexecuted instantiation: call.c:_Py_REFCNT
Unexecuted instantiation: capsule.c:_Py_REFCNT
Unexecuted instantiation: cellobject.c:_Py_REFCNT
classobject.c:_Py_REFCNT
Line
Count
Source
105
12.7M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
12.7M
    #if !defined(Py_GIL_DISABLED)
107
12.7M
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
12.7M
    }
codeobject.c:_Py_REFCNT
Line
Count
Source
105
361k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
361k
    #if !defined(Py_GIL_DISABLED)
107
361k
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
361k
    }
Unexecuted instantiation: complexobject.c:_Py_REFCNT
Unexecuted instantiation: descrobject.c:_Py_REFCNT
enumobject.c:_Py_REFCNT
Line
Count
Source
105
6.41M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
6.41M
    #if !defined(Py_GIL_DISABLED)
107
6.41M
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
6.41M
    }
genobject.c:_Py_REFCNT
Line
Count
Source
105
5.40M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
5.40M
    #if !defined(Py_GIL_DISABLED)
107
5.40M
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
5.40M
    }
Unexecuted instantiation: fileobject.c:_Py_REFCNT
Unexecuted instantiation: floatobject.c:_Py_REFCNT
frameobject.c:_Py_REFCNT
Line
Count
Source
105
6.50M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
6.50M
    #if !defined(Py_GIL_DISABLED)
107
6.50M
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
6.50M
    }
funcobject.c:_Py_REFCNT
Line
Count
Source
105
7.06M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
7.06M
    #if !defined(Py_GIL_DISABLED)
107
7.06M
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
7.06M
    }
Unexecuted instantiation: interpolationobject.c:_Py_REFCNT
Unexecuted instantiation: iterobject.c:_Py_REFCNT
Unexecuted instantiation: lazyimportobject.c:_Py_REFCNT
Unexecuted instantiation: odictobject.c:_Py_REFCNT
Unexecuted instantiation: memoryobject.c:_Py_REFCNT
methodobject.c:_Py_REFCNT
Line
Count
Source
105
9.33M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
9.33M
    #if !defined(Py_GIL_DISABLED)
107
9.33M
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
9.33M
    }
Unexecuted instantiation: namespaceobject.c:_Py_REFCNT
Unexecuted instantiation: unicode_format.c:_Py_REFCNT
Unexecuted instantiation: _contextvars.c:_Py_REFCNT
Unexecuted instantiation: Python-ast.c:_Py_REFCNT
Unexecuted instantiation: Python-tokenize.c:_Py_REFCNT
Unexecuted instantiation: asdl.c:_Py_REFCNT
Unexecuted instantiation: assemble.c:_Py_REFCNT
Unexecuted instantiation: ast.c:_Py_REFCNT
Unexecuted instantiation: ast_preprocess.c:_Py_REFCNT
Unexecuted instantiation: ast_unparse.c:_Py_REFCNT
Unexecuted instantiation: critical_section.c:_Py_REFCNT
Unexecuted instantiation: crossinterp.c:_Py_REFCNT
Unexecuted instantiation: getcopyright.c:_Py_REFCNT
Unexecuted instantiation: getplatform.c:_Py_REFCNT
Unexecuted instantiation: getversion.c:_Py_REFCNT
Unexecuted instantiation: optimizer.c:_Py_REFCNT
Unexecuted instantiation: pathconfig.c:_Py_REFCNT
Unexecuted instantiation: pymath.c:_Py_REFCNT
Unexecuted instantiation: pystrhex.c:_Py_REFCNT
Unexecuted instantiation: pegen.c:_Py_REFCNT
Unexecuted instantiation: pegen_errors.c:_Py_REFCNT
Unexecuted instantiation: parser.c:_Py_REFCNT
Unexecuted instantiation: buffer.c:_Py_REFCNT
Unexecuted instantiation: lexer.c:_Py_REFCNT
Unexecuted instantiation: number.c:_Py_REFCNT
Unexecuted instantiation: state.c:_Py_REFCNT
Unexecuted instantiation: string.c:_Py_REFCNT
Unexecuted instantiation: readline_tokenizer.c:_Py_REFCNT
Unexecuted instantiation: string_tokenizer.c:_Py_REFCNT
Unexecuted instantiation: utf8_tokenizer.c:_Py_REFCNT
Unexecuted instantiation: getcompiler.c:_Py_REFCNT
Unexecuted instantiation: mystrtoul.c:_Py_REFCNT
Unexecuted instantiation: token.c:_Py_REFCNT
Unexecuted instantiation: action_helpers.c:_Py_REFCNT
Unexecuted instantiation: string_parser.c:_Py_REFCNT
118
    #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
119
185M
    #  define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST(ob))
120
    #else
121
    #  define Py_REFCNT(ob) _Py_REFCNT(ob)
122
    #endif
123
#endif
124
125
#ifndef _Py_OPAQUE_PYOBJECT
126
static inline Py_ALWAYS_INLINE int _Py_IsImmortal(PyObject *op)
127
4.18G
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
4.18G
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
4.18G
}
exceptions.c:_Py_IsImmortal
Line
Count
Source
127
8.35M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
8.35M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
8.35M
}
genericaliasobject.c:_Py_IsImmortal
Line
Count
Source
127
92
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
92
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
92
}
listobject.c:_Py_IsImmortal
Line
Count
Source
127
684M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
684M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
684M
}
longobject.c:_Py_IsImmortal
Line
Count
Source
127
55.3M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
55.3M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
55.3M
}
dictobject.c:_Py_IsImmortal
Line
Count
Source
127
66.9M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
66.9M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
66.9M
}
moduleobject.c:_Py_IsImmortal
Line
Count
Source
127
3.26M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
3.26M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
3.26M
}
object.c:_Py_IsImmortal
Line
Count
Source
127
124M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
124M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
124M
}
Unexecuted instantiation: obmalloc.c:_Py_IsImmortal
Unexecuted instantiation: picklebufobject.c:_Py_IsImmortal
rangeobject.c:_Py_IsImmortal
Line
Count
Source
127
32.6M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
32.6M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
32.6M
}
sentinelobject.c:_Py_IsImmortal
Line
Count
Source
127
6
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
6
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
6
}
setobject.c:_Py_IsImmortal
Line
Count
Source
127
1.46M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
1.46M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.46M
}
sliceobject.c:_Py_IsImmortal
Line
Count
Source
127
21.6M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
21.6M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
21.6M
}
structseq.c:_Py_IsImmortal
Line
Count
Source
127
25.0k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
25.0k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
25.0k
}
Unexecuted instantiation: templateobject.c:_Py_IsImmortal
tupleobject.c:_Py_IsImmortal
Line
Count
Source
127
449M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
449M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
449M
}
typeobject.c:_Py_IsImmortal
Line
Count
Source
127
49.8M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
49.8M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
49.8M
}
Unexecuted instantiation: typevarobject.c:_Py_IsImmortal
unicode_formatter.c:_Py_IsImmortal
Line
Count
Source
127
128
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
128
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
128
}
unicode_writer.c:_Py_IsImmortal
Line
Count
Source
127
122k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
122k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
122k
}
Unexecuted instantiation: unicodectype.c:_Py_IsImmortal
unicodeobject.c:_Py_IsImmortal
Line
Count
Source
127
65.8M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
65.8M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
65.8M
}
unionobject.c:_Py_IsImmortal
Line
Count
Source
127
200
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
200
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
200
}
weakrefobject.c:_Py_IsImmortal
Line
Count
Source
127
6.34k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
6.34k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
6.34k
}
_warnings.c:_Py_IsImmortal
Line
Count
Source
127
379M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
379M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
379M
}
bltinmodule.c:_Py_IsImmortal
Line
Count
Source
127
59.5M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
59.5M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
59.5M
}
ceval.c:_Py_IsImmortal
Line
Count
Source
127
1.59G
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
1.59G
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.59G
}
codecs.c:_Py_IsImmortal
Line
Count
Source
127
447k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
447k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
447k
}
codegen.c:_Py_IsImmortal
Line
Count
Source
127
797k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
797k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
797k
}
compile.c:_Py_IsImmortal
Line
Count
Source
127
7.93M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
7.93M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
7.93M
}
context.c:_Py_IsImmortal
Line
Count
Source
127
54
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
54
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
54
}
errors.c:_Py_IsImmortal
Line
Count
Source
127
9.35M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
9.35M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
9.35M
}
flowgraph.c:_Py_IsImmortal
Line
Count
Source
127
4.82M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
4.82M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
4.82M
}
frame.c:_Py_IsImmortal
Line
Count
Source
127
12.4M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
12.4M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
12.4M
}
Unexecuted instantiation: future.c:_Py_IsImmortal
gc.c:_Py_IsImmortal
Line
Count
Source
127
248M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
248M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
248M
}
Unexecuted instantiation: gc_gil.c:_Py_IsImmortal
getargs.c:_Py_IsImmortal
Line
Count
Source
127
1.45M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
1.45M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.45M
}
Unexecuted instantiation: ceval_gil.c:_Py_IsImmortal
Unexecuted instantiation: hamt.c:_Py_IsImmortal
Unexecuted instantiation: hashtable.c:_Py_IsImmortal
import.c:_Py_IsImmortal
Line
Count
Source
127
20.7M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
20.7M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
20.7M
}
importdl.c:_Py_IsImmortal
Line
Count
Source
127
764
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
764
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
764
}
initconfig.c:_Py_IsImmortal
Line
Count
Source
127
2.98k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
2.98k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
2.98k
}
instrumentation.c:_Py_IsImmortal
Line
Count
Source
127
504
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
504
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
504
}
instruction_sequence.c:_Py_IsImmortal
Line
Count
Source
127
599
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
599
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
599
}
intrinsics.c:_Py_IsImmortal
Line
Count
Source
127
29.7k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
29.7k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
29.7k
}
Unexecuted instantiation: legacy_tracing.c:_Py_IsImmortal
Unexecuted instantiation: lock.c:_Py_IsImmortal
marshal.c:_Py_IsImmortal
Line
Count
Source
127
234k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
234k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
234k
}
modsupport.c:_Py_IsImmortal
Line
Count
Source
127
7.78k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
7.78k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
7.78k
}
Unexecuted instantiation: mysnprintf.c:_Py_IsImmortal
Unexecuted instantiation: parking_lot.c:_Py_IsImmortal
Unexecuted instantiation: preconfig.c:_Py_IsImmortal
pyarena.c:_Py_IsImmortal
Line
Count
Source
127
7.73M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
7.73M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
7.73M
}
Unexecuted instantiation: pyctype.c:_Py_IsImmortal
Unexecuted instantiation: pyhash.c:_Py_IsImmortal
pylifecycle.c:_Py_IsImmortal
Line
Count
Source
127
756
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
756
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
756
}
Unexecuted instantiation: pystate.c:_Py_IsImmortal
pythonrun.c:_Py_IsImmortal
Line
Count
Source
127
24.5k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
24.5k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
24.5k
}
Unexecuted instantiation: pytime.c:_Py_IsImmortal
Unexecuted instantiation: qsbr.c:_Py_IsImmortal
Unexecuted instantiation: bootstrap_hash.c:_Py_IsImmortal
specialize.c:_Py_IsImmortal
Line
Count
Source
127
13.4k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
13.4k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
13.4k
}
Unexecuted instantiation: slots.c:_Py_IsImmortal
Unexecuted instantiation: slots_generated.c:_Py_IsImmortal
structmember.c:_Py_IsImmortal
Line
Count
Source
127
264
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
264
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
264
}
symtable.c:_Py_IsImmortal
Line
Count
Source
127
3.76M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
3.76M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
3.76M
}
sysmodule.c:_Py_IsImmortal
Line
Count
Source
127
3.14k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
3.14k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
3.14k
}
Unexecuted instantiation: thread.c:_Py_IsImmortal
traceback.c:_Py_IsImmortal
Line
Count
Source
127
7.68M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
7.68M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
7.68M
}
Unexecuted instantiation: tracemalloc.c:_Py_IsImmortal
typecache.c:_Py_IsImmortal
Line
Count
Source
127
69.5M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
69.5M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
69.5M
}
Unexecuted instantiation: getopt.c:_Py_IsImmortal
Unexecuted instantiation: pystrcmp.c:_Py_IsImmortal
Unexecuted instantiation: pystrtod.c:_Py_IsImmortal
Unexecuted instantiation: dtoa.c:_Py_IsImmortal
fileutils.c:_Py_IsImmortal
Line
Count
Source
127
5.70k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
5.70k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
5.70k
}
Unexecuted instantiation: suggestions.c:_Py_IsImmortal
Unexecuted instantiation: perf_trampoline.c:_Py_IsImmortal
Unexecuted instantiation: perf_jit_trampoline.c:_Py_IsImmortal
Unexecuted instantiation: jit_unwind.c:_Py_IsImmortal
Unexecuted instantiation: remote_debugging.c:_Py_IsImmortal
Unexecuted instantiation: dynload_shlib.c:_Py_IsImmortal
Unexecuted instantiation: config.c:_Py_IsImmortal
Unexecuted instantiation: gcmodule.c:_Py_IsImmortal
Unexecuted instantiation: _asynciomodule.c:_Py_IsImmortal
Unexecuted instantiation: atexitmodule.c:_Py_IsImmortal
Unexecuted instantiation: faulthandler.c:_Py_IsImmortal
posixmodule.c:_Py_IsImmortal
Line
Count
Source
127
14.9k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
14.9k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
14.9k
}
Unexecuted instantiation: signalmodule.c:_Py_IsImmortal
Unexecuted instantiation: _tracemalloc.c:_Py_IsImmortal
Unexecuted instantiation: _suggestions.c:_Py_IsImmortal
_datetimemodule.c:_Py_IsImmortal
Line
Count
Source
127
420
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
420
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
420
}
Unexecuted instantiation: _codecsmodule.c:_Py_IsImmortal
_collectionsmodule.c:_Py_IsImmortal
Line
Count
Source
127
55
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
55
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
55
}
Unexecuted instantiation: errnomodule.c:_Py_IsImmortal
_iomodule.c:_Py_IsImmortal
Line
Count
Source
127
1.60k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
1.60k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.60k
}
iobase.c:_Py_IsImmortal
Line
Count
Source
127
863
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
863
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
863
}
fileio.c:_Py_IsImmortal
Line
Count
Source
127
591
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
591
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
591
}
Unexecuted instantiation: bytesio.c:_Py_IsImmortal
bufferedio.c:_Py_IsImmortal
Line
Count
Source
127
1.04M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
1.04M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.04M
}
textio.c:_Py_IsImmortal
Line
Count
Source
127
1.39M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
1.39M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.39M
}
Unexecuted instantiation: stringio.c:_Py_IsImmortal
itertoolsmodule.c:_Py_IsImmortal
Line
Count
Source
127
1.38k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
1.38k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.38k
}
sre.c:_Py_IsImmortal
Line
Count
Source
127
55.5k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
55.5k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
55.5k
}
Unexecuted instantiation: _sysconfig.c:_Py_IsImmortal
_threadmodule.c:_Py_IsImmortal
Line
Count
Source
127
1.96k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
1.96k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.96k
}
Unexecuted instantiation: timemodule.c:_Py_IsImmortal
Unexecuted instantiation: _typesmodule.c:_Py_IsImmortal
Unexecuted instantiation: _typingmodule.c:_Py_IsImmortal
Unexecuted instantiation: _weakref.c:_Py_IsImmortal
_abc.c:_Py_IsImmortal
Line
Count
Source
127
29.5k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
29.5k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
29.5k
}
_functoolsmodule.c:_Py_IsImmortal
Line
Count
Source
127
44
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
44
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
44
}
Unexecuted instantiation: _localemodule.c:_Py_IsImmortal
Unexecuted instantiation: _opcode.c:_Py_IsImmortal
Unexecuted instantiation: _operator.c:_Py_IsImmortal
Unexecuted instantiation: _stat.c:_Py_IsImmortal
Unexecuted instantiation: symtablemodule.c:_Py_IsImmortal
Unexecuted instantiation: pwdmodule.c:_Py_IsImmortal
getpath.c:_Py_IsImmortal
Line
Count
Source
127
672
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
672
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
672
}
Unexecuted instantiation: frozen.c:_Py_IsImmortal
Unexecuted instantiation: getbuildinfo.c:_Py_IsImmortal
Unexecuted instantiation: peg_api.c:_Py_IsImmortal
Unexecuted instantiation: file_tokenizer.c:_Py_IsImmortal
helpers.c:_Py_IsImmortal
Line
Count
Source
127
57.4k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
57.4k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
57.4k
}
Unexecuted instantiation: myreadline.c:_Py_IsImmortal
abstract.c:_Py_IsImmortal
Line
Count
Source
127
65.0M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
65.0M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
65.0M
}
Unexecuted instantiation: boolobject.c:_Py_IsImmortal
Unexecuted instantiation: bytes_methods.c:_Py_IsImmortal
bytearrayobject.c:_Py_IsImmortal
Line
Count
Source
127
992k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
992k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
992k
}
bytesobject.c:_Py_IsImmortal
Line
Count
Source
127
14.6M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
14.6M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
14.6M
}
call.c:_Py_IsImmortal
Line
Count
Source
127
3.18M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
3.18M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
3.18M
}
capsule.c:_Py_IsImmortal
Line
Count
Source
127
4
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
4
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
4
}
cellobject.c:_Py_IsImmortal
Line
Count
Source
127
3.45M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
3.45M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
3.45M
}
classobject.c:_Py_IsImmortal
Line
Count
Source
127
25.4M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
25.4M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
25.4M
}
codeobject.c:_Py_IsImmortal
Line
Count
Source
127
1.22M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
1.22M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.22M
}
complexobject.c:_Py_IsImmortal
Line
Count
Source
127
188k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
188k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
188k
}
descrobject.c:_Py_IsImmortal
Line
Count
Source
127
17.6k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
17.6k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
17.6k
}
enumobject.c:_Py_IsImmortal
Line
Count
Source
127
19.2M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
19.2M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
19.2M
}
genobject.c:_Py_IsImmortal
Line
Count
Source
127
10.9M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
10.9M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
10.9M
}
fileobject.c:_Py_IsImmortal
Line
Count
Source
127
349k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
349k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
349k
}
floatobject.c:_Py_IsImmortal
Line
Count
Source
127
226k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
226k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
226k
}
frameobject.c:_Py_IsImmortal
Line
Count
Source
127
3.33M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
3.33M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
3.33M
}
funcobject.c:_Py_IsImmortal
Line
Count
Source
127
14.0M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
14.0M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
14.0M
}
interpolationobject.c:_Py_IsImmortal
Line
Count
Source
127
21
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
21
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
21
}
iterobject.c:_Py_IsImmortal
Line
Count
Source
127
2.93M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
2.93M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
2.93M
}
lazyimportobject.c:_Py_IsImmortal
Line
Count
Source
127
48
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
48
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
48
}
Unexecuted instantiation: odictobject.c:_Py_IsImmortal
memoryobject.c:_Py_IsImmortal
Line
Count
Source
127
748k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
748k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
748k
}
methodobject.c:_Py_IsImmortal
Line
Count
Source
127
9.33M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
9.33M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
9.33M
}
namespaceobject.c:_Py_IsImmortal
Line
Count
Source
127
21
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
21
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
21
}
unicode_format.c:_Py_IsImmortal
Line
Count
Source
127
1.49M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
1.49M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.49M
}
Unexecuted instantiation: _contextvars.c:_Py_IsImmortal
Python-ast.c:_Py_IsImmortal
Line
Count
Source
127
3.38M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
3.38M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
3.38M
}
Unexecuted instantiation: Python-tokenize.c:_Py_IsImmortal
Unexecuted instantiation: asdl.c:_Py_IsImmortal
assemble.c:_Py_IsImmortal
Line
Count
Source
127
369k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
369k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
369k
}
Unexecuted instantiation: ast.c:_Py_IsImmortal
ast_preprocess.c:_Py_IsImmortal
Line
Count
Source
127
4.05k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
4.05k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
4.05k
}
ast_unparse.c:_Py_IsImmortal
Line
Count
Source
127
159k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
159k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
159k
}
Unexecuted instantiation: critical_section.c:_Py_IsImmortal
Unexecuted instantiation: crossinterp.c:_Py_IsImmortal
Unexecuted instantiation: getcopyright.c:_Py_IsImmortal
Unexecuted instantiation: getplatform.c:_Py_IsImmortal
Unexecuted instantiation: getversion.c:_Py_IsImmortal
Unexecuted instantiation: optimizer.c:_Py_IsImmortal
Unexecuted instantiation: pathconfig.c:_Py_IsImmortal
Unexecuted instantiation: pymath.c:_Py_IsImmortal
Unexecuted instantiation: pystrhex.c:_Py_IsImmortal
pegen.c:_Py_IsImmortal
Line
Count
Source
127
46.7k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
46.7k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
46.7k
}
pegen_errors.c:_Py_IsImmortal
Line
Count
Source
127
31.9k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
31.9k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
31.9k
}
Unexecuted instantiation: parser.c:_Py_IsImmortal
Unexecuted instantiation: buffer.c:_Py_IsImmortal
lexer.c:_Py_IsImmortal
Line
Count
Source
127
96.6k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
96.6k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
96.6k
}
Unexecuted instantiation: number.c:_Py_IsImmortal
state.c:_Py_IsImmortal
Line
Count
Source
127
22.7k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
22.7k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
22.7k
}
Unexecuted instantiation: string.c:_Py_IsImmortal
Unexecuted instantiation: readline_tokenizer.c:_Py_IsImmortal
string_tokenizer.c:_Py_IsImmortal
Line
Count
Source
127
3.15k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
3.15k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
3.15k
}
Unexecuted instantiation: utf8_tokenizer.c:_Py_IsImmortal
Unexecuted instantiation: getcompiler.c:_Py_IsImmortal
Unexecuted instantiation: mystrtoul.c:_Py_IsImmortal
Unexecuted instantiation: token.c:_Py_IsImmortal
Unexecuted instantiation: action_helpers.c:_Py_IsImmortal
string_parser.c:_Py_IsImmortal
Line
Count
Source
127
353k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
353k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
353k
}
137
3.91G
#define _Py_IsImmortal(op) _Py_IsImmortal(_PyObject_CAST(op))
138
139
140
static inline Py_ALWAYS_INLINE int _Py_IsStaticImmortal(PyObject *op)
141
2.31G
{
142
2.31G
#if defined(Py_GIL_DISABLED) || SIZEOF_VOID_P > 4
143
2.31G
    return (op->ob_flags & _Py_STATICALLY_ALLOCATED_FLAG) != 0;
144
#else
145
    return op->ob_refcnt >= _Py_STATIC_IMMORTAL_MINIMUM_REFCNT;
146
#endif
147
2.31G
}
Unexecuted instantiation: exceptions.c:_Py_IsStaticImmortal
Unexecuted instantiation: genericaliasobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: listobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: longobject.c:_Py_IsStaticImmortal
dictobject.c:_Py_IsStaticImmortal
Line
Count
Source
141
2.50M
{
142
2.50M
#if defined(Py_GIL_DISABLED) || SIZEOF_VOID_P > 4
143
2.50M
    return (op->ob_flags & _Py_STATICALLY_ALLOCATED_FLAG) != 0;
144
#else
145
    return op->ob_refcnt >= _Py_STATIC_IMMORTAL_MINIMUM_REFCNT;
146
#endif
147
2.50M
}
Unexecuted instantiation: moduleobject.c:_Py_IsStaticImmortal
object.c:_Py_IsStaticImmortal
Line
Count
Source
141
42.5M
{
142
42.5M
#if defined(Py_GIL_DISABLED) || SIZEOF_VOID_P > 4
143
42.5M
    return (op->ob_flags & _Py_STATICALLY_ALLOCATED_FLAG) != 0;
144
#else
145
    return op->ob_refcnt >= _Py_STATIC_IMMORTAL_MINIMUM_REFCNT;
146
#endif
147
42.5M
}
Unexecuted instantiation: obmalloc.c:_Py_IsStaticImmortal
Unexecuted instantiation: picklebufobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: rangeobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: sentinelobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: setobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: sliceobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: structseq.c:_Py_IsStaticImmortal
Unexecuted instantiation: templateobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: tupleobject.c:_Py_IsStaticImmortal
typeobject.c:_Py_IsStaticImmortal
Line
Count
Source
141
24.9M
{
142
24.9M
#if defined(Py_GIL_DISABLED) || SIZEOF_VOID_P > 4
143
24.9M
    return (op->ob_flags & _Py_STATICALLY_ALLOCATED_FLAG) != 0;
144
#else
145
    return op->ob_refcnt >= _Py_STATIC_IMMORTAL_MINIMUM_REFCNT;
146
#endif
147
24.9M
}
Unexecuted instantiation: typevarobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: unicode_formatter.c:_Py_IsStaticImmortal
Unexecuted instantiation: unicode_writer.c:_Py_IsStaticImmortal
Unexecuted instantiation: unicodectype.c:_Py_IsStaticImmortal
Unexecuted instantiation: unicodeobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: unionobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: weakrefobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: _warnings.c:_Py_IsStaticImmortal
Unexecuted instantiation: bltinmodule.c:_Py_IsStaticImmortal
ceval.c:_Py_IsStaticImmortal
Line
Count
Source
141
1.77G
{
142
1.77G
#if defined(Py_GIL_DISABLED) || SIZEOF_VOID_P > 4
143
1.77G
    return (op->ob_flags & _Py_STATICALLY_ALLOCATED_FLAG) != 0;
144
#else
145
    return op->ob_refcnt >= _Py_STATIC_IMMORTAL_MINIMUM_REFCNT;
146
#endif
147
1.77G
}
Unexecuted instantiation: codecs.c:_Py_IsStaticImmortal
Unexecuted instantiation: codegen.c:_Py_IsStaticImmortal
Unexecuted instantiation: compile.c:_Py_IsStaticImmortal
Unexecuted instantiation: context.c:_Py_IsStaticImmortal
Unexecuted instantiation: errors.c:_Py_IsStaticImmortal
Unexecuted instantiation: flowgraph.c:_Py_IsStaticImmortal
frame.c:_Py_IsStaticImmortal
Line
Count
Source
141
387M
{
142
387M
#if defined(Py_GIL_DISABLED) || SIZEOF_VOID_P > 4
143
387M
    return (op->ob_flags & _Py_STATICALLY_ALLOCATED_FLAG) != 0;
144
#else
145
    return op->ob_refcnt >= _Py_STATIC_IMMORTAL_MINIMUM_REFCNT;
146
#endif
147
387M
}
Unexecuted instantiation: future.c:_Py_IsStaticImmortal
Unexecuted instantiation: gc.c:_Py_IsStaticImmortal
Unexecuted instantiation: gc_gil.c:_Py_IsStaticImmortal
Unexecuted instantiation: getargs.c:_Py_IsStaticImmortal
Unexecuted instantiation: ceval_gil.c:_Py_IsStaticImmortal
Unexecuted instantiation: hamt.c:_Py_IsStaticImmortal
Unexecuted instantiation: hashtable.c:_Py_IsStaticImmortal
Unexecuted instantiation: import.c:_Py_IsStaticImmortal
Unexecuted instantiation: importdl.c:_Py_IsStaticImmortal
Unexecuted instantiation: initconfig.c:_Py_IsStaticImmortal
Unexecuted instantiation: instrumentation.c:_Py_IsStaticImmortal
Unexecuted instantiation: instruction_sequence.c:_Py_IsStaticImmortal
Unexecuted instantiation: intrinsics.c:_Py_IsStaticImmortal
Unexecuted instantiation: legacy_tracing.c:_Py_IsStaticImmortal
Unexecuted instantiation: lock.c:_Py_IsStaticImmortal
Unexecuted instantiation: marshal.c:_Py_IsStaticImmortal
Unexecuted instantiation: modsupport.c:_Py_IsStaticImmortal
Unexecuted instantiation: mysnprintf.c:_Py_IsStaticImmortal
Unexecuted instantiation: parking_lot.c:_Py_IsStaticImmortal
Unexecuted instantiation: preconfig.c:_Py_IsStaticImmortal
Unexecuted instantiation: pyarena.c:_Py_IsStaticImmortal
Unexecuted instantiation: pyctype.c:_Py_IsStaticImmortal
Unexecuted instantiation: pyhash.c:_Py_IsStaticImmortal
Unexecuted instantiation: pylifecycle.c:_Py_IsStaticImmortal
Unexecuted instantiation: pystate.c:_Py_IsStaticImmortal
Unexecuted instantiation: pythonrun.c:_Py_IsStaticImmortal
Unexecuted instantiation: pytime.c:_Py_IsStaticImmortal
Unexecuted instantiation: qsbr.c:_Py_IsStaticImmortal
Unexecuted instantiation: bootstrap_hash.c:_Py_IsStaticImmortal
Unexecuted instantiation: specialize.c:_Py_IsStaticImmortal
Unexecuted instantiation: slots.c:_Py_IsStaticImmortal
Unexecuted instantiation: slots_generated.c:_Py_IsStaticImmortal
Unexecuted instantiation: structmember.c:_Py_IsStaticImmortal
Unexecuted instantiation: symtable.c:_Py_IsStaticImmortal
Unexecuted instantiation: sysmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: thread.c:_Py_IsStaticImmortal
Unexecuted instantiation: traceback.c:_Py_IsStaticImmortal
Unexecuted instantiation: tracemalloc.c:_Py_IsStaticImmortal
typecache.c:_Py_IsStaticImmortal
Line
Count
Source
141
68.5M
{
142
68.5M
#if defined(Py_GIL_DISABLED) || SIZEOF_VOID_P > 4
143
68.5M
    return (op->ob_flags & _Py_STATICALLY_ALLOCATED_FLAG) != 0;
144
#else
145
    return op->ob_refcnt >= _Py_STATIC_IMMORTAL_MINIMUM_REFCNT;
146
#endif
147
68.5M
}
Unexecuted instantiation: getopt.c:_Py_IsStaticImmortal
Unexecuted instantiation: pystrcmp.c:_Py_IsStaticImmortal
Unexecuted instantiation: pystrtod.c:_Py_IsStaticImmortal
Unexecuted instantiation: dtoa.c:_Py_IsStaticImmortal
Unexecuted instantiation: fileutils.c:_Py_IsStaticImmortal
Unexecuted instantiation: suggestions.c:_Py_IsStaticImmortal
Unexecuted instantiation: perf_trampoline.c:_Py_IsStaticImmortal
Unexecuted instantiation: perf_jit_trampoline.c:_Py_IsStaticImmortal
Unexecuted instantiation: jit_unwind.c:_Py_IsStaticImmortal
Unexecuted instantiation: remote_debugging.c:_Py_IsStaticImmortal
Unexecuted instantiation: dynload_shlib.c:_Py_IsStaticImmortal
Unexecuted instantiation: config.c:_Py_IsStaticImmortal
Unexecuted instantiation: gcmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _asynciomodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: atexitmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: faulthandler.c:_Py_IsStaticImmortal
Unexecuted instantiation: posixmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: signalmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _tracemalloc.c:_Py_IsStaticImmortal
Unexecuted instantiation: _suggestions.c:_Py_IsStaticImmortal
Unexecuted instantiation: _datetimemodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _codecsmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _collectionsmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: errnomodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _iomodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: iobase.c:_Py_IsStaticImmortal
Unexecuted instantiation: fileio.c:_Py_IsStaticImmortal
Unexecuted instantiation: bytesio.c:_Py_IsStaticImmortal
Unexecuted instantiation: bufferedio.c:_Py_IsStaticImmortal
Unexecuted instantiation: textio.c:_Py_IsStaticImmortal
Unexecuted instantiation: stringio.c:_Py_IsStaticImmortal
Unexecuted instantiation: itertoolsmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: sre.c:_Py_IsStaticImmortal
Unexecuted instantiation: _sysconfig.c:_Py_IsStaticImmortal
Unexecuted instantiation: _threadmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: timemodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _typesmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _typingmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _weakref.c:_Py_IsStaticImmortal
Unexecuted instantiation: _abc.c:_Py_IsStaticImmortal
Unexecuted instantiation: _functoolsmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _localemodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _opcode.c:_Py_IsStaticImmortal
Unexecuted instantiation: _operator.c:_Py_IsStaticImmortal
Unexecuted instantiation: _stat.c:_Py_IsStaticImmortal
Unexecuted instantiation: symtablemodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: pwdmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: getpath.c:_Py_IsStaticImmortal
Unexecuted instantiation: frozen.c:_Py_IsStaticImmortal
Unexecuted instantiation: getbuildinfo.c:_Py_IsStaticImmortal
Unexecuted instantiation: peg_api.c:_Py_IsStaticImmortal
Unexecuted instantiation: file_tokenizer.c:_Py_IsStaticImmortal
Unexecuted instantiation: helpers.c:_Py_IsStaticImmortal
Unexecuted instantiation: myreadline.c:_Py_IsStaticImmortal
Unexecuted instantiation: abstract.c:_Py_IsStaticImmortal
Unexecuted instantiation: boolobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: bytes_methods.c:_Py_IsStaticImmortal
Unexecuted instantiation: bytearrayobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: bytesobject.c:_Py_IsStaticImmortal
call.c:_Py_IsStaticImmortal
Line
Count
Source
141
1.07M
{
142
1.07M
#if defined(Py_GIL_DISABLED) || SIZEOF_VOID_P > 4
143
1.07M
    return (op->ob_flags & _Py_STATICALLY_ALLOCATED_FLAG) != 0;
144
#else
145
    return op->ob_refcnt >= _Py_STATIC_IMMORTAL_MINIMUM_REFCNT;
146
#endif
147
1.07M
}
Unexecuted instantiation: capsule.c:_Py_IsStaticImmortal
Unexecuted instantiation: cellobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: classobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: codeobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: complexobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: descrobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: enumobject.c:_Py_IsStaticImmortal
genobject.c:_Py_IsStaticImmortal
Line
Count
Source
141
5.40M
{
142
5.40M
#if defined(Py_GIL_DISABLED) || SIZEOF_VOID_P > 4
143
5.40M
    return (op->ob_flags & _Py_STATICALLY_ALLOCATED_FLAG) != 0;
144
#else
145
    return op->ob_refcnt >= _Py_STATIC_IMMORTAL_MINIMUM_REFCNT;
146
#endif
147
5.40M
}
Unexecuted instantiation: fileobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: floatobject.c:_Py_IsStaticImmortal
frameobject.c:_Py_IsStaticImmortal
Line
Count
Source
141
12.1M
{
142
12.1M
#if defined(Py_GIL_DISABLED) || SIZEOF_VOID_P > 4
143
12.1M
    return (op->ob_flags & _Py_STATICALLY_ALLOCATED_FLAG) != 0;
144
#else
145
    return op->ob_refcnt >= _Py_STATIC_IMMORTAL_MINIMUM_REFCNT;
146
#endif
147
12.1M
}
Unexecuted instantiation: funcobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: interpolationobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: iterobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: lazyimportobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: odictobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: memoryobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: methodobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: namespaceobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: unicode_format.c:_Py_IsStaticImmortal
Unexecuted instantiation: _contextvars.c:_Py_IsStaticImmortal
Unexecuted instantiation: Python-ast.c:_Py_IsStaticImmortal
Unexecuted instantiation: Python-tokenize.c:_Py_IsStaticImmortal
Unexecuted instantiation: asdl.c:_Py_IsStaticImmortal
Unexecuted instantiation: assemble.c:_Py_IsStaticImmortal
Unexecuted instantiation: ast.c:_Py_IsStaticImmortal
Unexecuted instantiation: ast_preprocess.c:_Py_IsStaticImmortal
Unexecuted instantiation: ast_unparse.c:_Py_IsStaticImmortal
Unexecuted instantiation: critical_section.c:_Py_IsStaticImmortal
Unexecuted instantiation: crossinterp.c:_Py_IsStaticImmortal
Unexecuted instantiation: getcopyright.c:_Py_IsStaticImmortal
Unexecuted instantiation: getplatform.c:_Py_IsStaticImmortal
Unexecuted instantiation: getversion.c:_Py_IsStaticImmortal
Unexecuted instantiation: optimizer.c:_Py_IsStaticImmortal
Unexecuted instantiation: pathconfig.c:_Py_IsStaticImmortal
Unexecuted instantiation: pymath.c:_Py_IsStaticImmortal
Unexecuted instantiation: pystrhex.c:_Py_IsStaticImmortal
Unexecuted instantiation: pegen.c:_Py_IsStaticImmortal
Unexecuted instantiation: pegen_errors.c:_Py_IsStaticImmortal
Unexecuted instantiation: parser.c:_Py_IsStaticImmortal
Unexecuted instantiation: buffer.c:_Py_IsStaticImmortal
Unexecuted instantiation: lexer.c:_Py_IsStaticImmortal
Unexecuted instantiation: number.c:_Py_IsStaticImmortal
Unexecuted instantiation: state.c:_Py_IsStaticImmortal
Unexecuted instantiation: string.c:_Py_IsStaticImmortal
Unexecuted instantiation: readline_tokenizer.c:_Py_IsStaticImmortal
Unexecuted instantiation: string_tokenizer.c:_Py_IsStaticImmortal
Unexecuted instantiation: utf8_tokenizer.c:_Py_IsStaticImmortal
Unexecuted instantiation: getcompiler.c:_Py_IsStaticImmortal
Unexecuted instantiation: mystrtoul.c:_Py_IsStaticImmortal
Unexecuted instantiation: token.c:_Py_IsStaticImmortal
Unexecuted instantiation: action_helpers.c:_Py_IsStaticImmortal
Unexecuted instantiation: string_parser.c:_Py_IsStaticImmortal
148
0
#define _Py_IsStaticImmortal(op) _Py_IsStaticImmortal(_PyObject_CAST(op))
149
#endif // !defined(_Py_OPAQUE_PYOBJECT)
150
151
// Py_SET_REFCNT() implementation for stable ABI
152
PyAPI_FUNC(void) _Py_SetRefcnt(PyObject *ob, Py_ssize_t refcnt);
153
154
18.7M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
18.7M
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000) \
157
    || defined(_Py_OPAQUE_PYOBJECT)
158
    // Stable ABI implements Py_SET_REFCNT() as a function call
159
    // on limited C API version 3.13 and newer, and abi3t.
160
    _Py_SetRefcnt(ob, refcnt);
161
#else
162
    // This immortal check is for code that is unaware of immortal objects.
163
    // The runtime tracks these objects and we should avoid as much
164
    // as possible having extensions inadvertently change the refcnt
165
    // of an immortalized object.
166
18.7M
    if (_Py_IsImmortal(ob)) {
167
406
        return;
168
406
    }
169
18.7M
#ifndef Py_GIL_DISABLED
170
18.7M
#if SIZEOF_VOID_P > 4
171
18.7M
    ob->ob_refcnt = (uint32_t)refcnt;
172
#else
173
    ob->ob_refcnt = refcnt;
174
#endif
175
#else
176
    if (_Py_IsOwnedByCurrentThread(ob)) {
177
        if ((size_t)refcnt > (size_t)UINT32_MAX) {
178
            // On overflow, make the object immortal
179
            ob->ob_tid = _Py_UNOWNED_TID;
180
            ob->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
181
            ob->ob_ref_shared = 0;
182
        }
183
        else {
184
            // Set local refcount to desired refcount and shared refcount
185
            // to zero, but preserve the shared refcount flags.
186
            ob->ob_ref_local = _Py_STATIC_CAST(uint32_t, refcnt);
187
            ob->ob_ref_shared &= _Py_REF_SHARED_FLAG_MASK;
188
        }
189
    }
190
    else {
191
        // Set local refcount to zero and shared refcount to desired refcount.
192
        // Mark the object as merged.
193
        ob->ob_tid = _Py_UNOWNED_TID;
194
        ob->ob_ref_local = 0;
195
        ob->ob_ref_shared = _Py_REF_SHARED(refcnt, _Py_REF_MERGED);
196
    }
197
#endif  // Py_GIL_DISABLED
198
18.7M
#endif  // Py_LIMITED_API
199
18.7M
}
Unexecuted instantiation: exceptions.c:Py_SET_REFCNT
Unexecuted instantiation: genericaliasobject.c:Py_SET_REFCNT
Unexecuted instantiation: listobject.c:Py_SET_REFCNT
Unexecuted instantiation: longobject.c:Py_SET_REFCNT
dictobject.c:Py_SET_REFCNT
Line
Count
Source
154
5.15M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
5.15M
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000) \
157
    || defined(_Py_OPAQUE_PYOBJECT)
158
    // Stable ABI implements Py_SET_REFCNT() as a function call
159
    // on limited C API version 3.13 and newer, and abi3t.
160
    _Py_SetRefcnt(ob, refcnt);
161
#else
162
    // This immortal check is for code that is unaware of immortal objects.
163
    // The runtime tracks these objects and we should avoid as much
164
    // as possible having extensions inadvertently change the refcnt
165
    // of an immortalized object.
166
5.15M
    if (_Py_IsImmortal(ob)) {
167
0
        return;
168
0
    }
169
5.15M
#ifndef Py_GIL_DISABLED
170
5.15M
#if SIZEOF_VOID_P > 4
171
5.15M
    ob->ob_refcnt = (uint32_t)refcnt;
172
#else
173
    ob->ob_refcnt = refcnt;
174
#endif
175
#else
176
    if (_Py_IsOwnedByCurrentThread(ob)) {
177
        if ((size_t)refcnt > (size_t)UINT32_MAX) {
178
            // On overflow, make the object immortal
179
            ob->ob_tid = _Py_UNOWNED_TID;
180
            ob->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
181
            ob->ob_ref_shared = 0;
182
        }
183
        else {
184
            // Set local refcount to desired refcount and shared refcount
185
            // to zero, but preserve the shared refcount flags.
186
            ob->ob_ref_local = _Py_STATIC_CAST(uint32_t, refcnt);
187
            ob->ob_ref_shared &= _Py_REF_SHARED_FLAG_MASK;
188
        }
189
    }
190
    else {
191
        // Set local refcount to zero and shared refcount to desired refcount.
192
        // Mark the object as merged.
193
        ob->ob_tid = _Py_UNOWNED_TID;
194
        ob->ob_ref_local = 0;
195
        ob->ob_ref_shared = _Py_REF_SHARED(refcnt, _Py_REF_MERGED);
196
    }
197
#endif  // Py_GIL_DISABLED
198
5.15M
#endif  // Py_LIMITED_API
199
5.15M
}
moduleobject.c:Py_SET_REFCNT
Line
Count
Source
154
406
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
406
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000) \
157
    || defined(_Py_OPAQUE_PYOBJECT)
158
    // Stable ABI implements Py_SET_REFCNT() as a function call
159
    // on limited C API version 3.13 and newer, and abi3t.
160
    _Py_SetRefcnt(ob, refcnt);
161
#else
162
    // This immortal check is for code that is unaware of immortal objects.
163
    // The runtime tracks these objects and we should avoid as much
164
    // as possible having extensions inadvertently change the refcnt
165
    // of an immortalized object.
166
406
    if (_Py_IsImmortal(ob)) {
167
406
        return;
168
406
    }
169
0
#ifndef Py_GIL_DISABLED
170
0
#if SIZEOF_VOID_P > 4
171
0
    ob->ob_refcnt = (uint32_t)refcnt;
172
#else
173
    ob->ob_refcnt = refcnt;
174
#endif
175
#else
176
    if (_Py_IsOwnedByCurrentThread(ob)) {
177
        if ((size_t)refcnt > (size_t)UINT32_MAX) {
178
            // On overflow, make the object immortal
179
            ob->ob_tid = _Py_UNOWNED_TID;
180
            ob->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
181
            ob->ob_ref_shared = 0;
182
        }
183
        else {
184
            // Set local refcount to desired refcount and shared refcount
185
            // to zero, but preserve the shared refcount flags.
186
            ob->ob_ref_local = _Py_STATIC_CAST(uint32_t, refcnt);
187
            ob->ob_ref_shared &= _Py_REF_SHARED_FLAG_MASK;
188
        }
189
    }
190
    else {
191
        // Set local refcount to zero and shared refcount to desired refcount.
192
        // Mark the object as merged.
193
        ob->ob_tid = _Py_UNOWNED_TID;
194
        ob->ob_ref_local = 0;
195
        ob->ob_ref_shared = _Py_REF_SHARED(refcnt, _Py_REF_MERGED);
196
    }
197
#endif  // Py_GIL_DISABLED
198
0
#endif  // Py_LIMITED_API
199
0
}
object.c:Py_SET_REFCNT
Line
Count
Source
154
10.8M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
10.8M
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000) \
157
    || defined(_Py_OPAQUE_PYOBJECT)
158
    // Stable ABI implements Py_SET_REFCNT() as a function call
159
    // on limited C API version 3.13 and newer, and abi3t.
160
    _Py_SetRefcnt(ob, refcnt);
161
#else
162
    // This immortal check is for code that is unaware of immortal objects.
163
    // The runtime tracks these objects and we should avoid as much
164
    // as possible having extensions inadvertently change the refcnt
165
    // of an immortalized object.
166
10.8M
    if (_Py_IsImmortal(ob)) {
167
0
        return;
168
0
    }
169
10.8M
#ifndef Py_GIL_DISABLED
170
10.8M
#if SIZEOF_VOID_P > 4
171
10.8M
    ob->ob_refcnt = (uint32_t)refcnt;
172
#else
173
    ob->ob_refcnt = refcnt;
174
#endif
175
#else
176
    if (_Py_IsOwnedByCurrentThread(ob)) {
177
        if ((size_t)refcnt > (size_t)UINT32_MAX) {
178
            // On overflow, make the object immortal
179
            ob->ob_tid = _Py_UNOWNED_TID;
180
            ob->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
181
            ob->ob_ref_shared = 0;
182
        }
183
        else {
184
            // Set local refcount to desired refcount and shared refcount
185
            // to zero, but preserve the shared refcount flags.
186
            ob->ob_ref_local = _Py_STATIC_CAST(uint32_t, refcnt);
187
            ob->ob_ref_shared &= _Py_REF_SHARED_FLAG_MASK;
188
        }
189
    }
190
    else {
191
        // Set local refcount to zero and shared refcount to desired refcount.
192
        // Mark the object as merged.
193
        ob->ob_tid = _Py_UNOWNED_TID;
194
        ob->ob_ref_local = 0;
195
        ob->ob_ref_shared = _Py_REF_SHARED(refcnt, _Py_REF_MERGED);
196
    }
197
#endif  // Py_GIL_DISABLED
198
10.8M
#endif  // Py_LIMITED_API
199
10.8M
}
Unexecuted instantiation: obmalloc.c:Py_SET_REFCNT
Unexecuted instantiation: picklebufobject.c:Py_SET_REFCNT
Unexecuted instantiation: rangeobject.c:Py_SET_REFCNT
Unexecuted instantiation: sentinelobject.c:Py_SET_REFCNT
Unexecuted instantiation: setobject.c:Py_SET_REFCNT
Unexecuted instantiation: sliceobject.c:Py_SET_REFCNT
Unexecuted instantiation: structseq.c:Py_SET_REFCNT
Unexecuted instantiation: templateobject.c:Py_SET_REFCNT
Unexecuted instantiation: tupleobject.c:Py_SET_REFCNT
Unexecuted instantiation: typeobject.c:Py_SET_REFCNT
Unexecuted instantiation: typevarobject.c:Py_SET_REFCNT
Unexecuted instantiation: unicode_formatter.c:Py_SET_REFCNT
Unexecuted instantiation: unicode_writer.c:Py_SET_REFCNT
Unexecuted instantiation: unicodectype.c:Py_SET_REFCNT
unicodeobject.c:Py_SET_REFCNT
Line
Count
Source
154
292k
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
292k
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000) \
157
    || defined(_Py_OPAQUE_PYOBJECT)
158
    // Stable ABI implements Py_SET_REFCNT() as a function call
159
    // on limited C API version 3.13 and newer, and abi3t.
160
    _Py_SetRefcnt(ob, refcnt);
161
#else
162
    // This immortal check is for code that is unaware of immortal objects.
163
    // The runtime tracks these objects and we should avoid as much
164
    // as possible having extensions inadvertently change the refcnt
165
    // of an immortalized object.
166
292k
    if (_Py_IsImmortal(ob)) {
167
0
        return;
168
0
    }
169
292k
#ifndef Py_GIL_DISABLED
170
292k
#if SIZEOF_VOID_P > 4
171
292k
    ob->ob_refcnt = (uint32_t)refcnt;
172
#else
173
    ob->ob_refcnt = refcnt;
174
#endif
175
#else
176
    if (_Py_IsOwnedByCurrentThread(ob)) {
177
        if ((size_t)refcnt > (size_t)UINT32_MAX) {
178
            // On overflow, make the object immortal
179
            ob->ob_tid = _Py_UNOWNED_TID;
180
            ob->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
181
            ob->ob_ref_shared = 0;
182
        }
183
        else {
184
            // Set local refcount to desired refcount and shared refcount
185
            // to zero, but preserve the shared refcount flags.
186
            ob->ob_ref_local = _Py_STATIC_CAST(uint32_t, refcnt);
187
            ob->ob_ref_shared &= _Py_REF_SHARED_FLAG_MASK;
188
        }
189
    }
190
    else {
191
        // Set local refcount to zero and shared refcount to desired refcount.
192
        // Mark the object as merged.
193
        ob->ob_tid = _Py_UNOWNED_TID;
194
        ob->ob_ref_local = 0;
195
        ob->ob_ref_shared = _Py_REF_SHARED(refcnt, _Py_REF_MERGED);
196
    }
197
#endif  // Py_GIL_DISABLED
198
292k
#endif  // Py_LIMITED_API
199
292k
}
Unexecuted instantiation: unionobject.c:Py_SET_REFCNT
Unexecuted instantiation: weakrefobject.c:Py_SET_REFCNT
Unexecuted instantiation: _warnings.c:Py_SET_REFCNT
Unexecuted instantiation: bltinmodule.c:Py_SET_REFCNT
Unexecuted instantiation: ceval.c:Py_SET_REFCNT
Unexecuted instantiation: codecs.c:Py_SET_REFCNT
Unexecuted instantiation: codegen.c:Py_SET_REFCNT
Unexecuted instantiation: compile.c:Py_SET_REFCNT
Unexecuted instantiation: context.c:Py_SET_REFCNT
Unexecuted instantiation: errors.c:Py_SET_REFCNT
Unexecuted instantiation: flowgraph.c:Py_SET_REFCNT
Unexecuted instantiation: frame.c:Py_SET_REFCNT
Unexecuted instantiation: future.c:Py_SET_REFCNT
Unexecuted instantiation: gc.c:Py_SET_REFCNT
Unexecuted instantiation: gc_gil.c:Py_SET_REFCNT
Unexecuted instantiation: getargs.c:Py_SET_REFCNT
Unexecuted instantiation: ceval_gil.c:Py_SET_REFCNT
Unexecuted instantiation: hamt.c:Py_SET_REFCNT
Unexecuted instantiation: hashtable.c:Py_SET_REFCNT
Unexecuted instantiation: import.c:Py_SET_REFCNT
Unexecuted instantiation: importdl.c:Py_SET_REFCNT
Unexecuted instantiation: initconfig.c:Py_SET_REFCNT
Unexecuted instantiation: instrumentation.c:Py_SET_REFCNT
Unexecuted instantiation: instruction_sequence.c:Py_SET_REFCNT
Unexecuted instantiation: intrinsics.c:Py_SET_REFCNT
Unexecuted instantiation: legacy_tracing.c:Py_SET_REFCNT
Unexecuted instantiation: lock.c:Py_SET_REFCNT
Unexecuted instantiation: marshal.c:Py_SET_REFCNT
Unexecuted instantiation: modsupport.c:Py_SET_REFCNT
Unexecuted instantiation: mysnprintf.c:Py_SET_REFCNT
Unexecuted instantiation: parking_lot.c:Py_SET_REFCNT
Unexecuted instantiation: preconfig.c:Py_SET_REFCNT
Unexecuted instantiation: pyarena.c:Py_SET_REFCNT
Unexecuted instantiation: pyctype.c:Py_SET_REFCNT
Unexecuted instantiation: pyhash.c:Py_SET_REFCNT
Unexecuted instantiation: pylifecycle.c:Py_SET_REFCNT
Unexecuted instantiation: pystate.c:Py_SET_REFCNT
Unexecuted instantiation: pythonrun.c:Py_SET_REFCNT
Unexecuted instantiation: pytime.c:Py_SET_REFCNT
Unexecuted instantiation: qsbr.c:Py_SET_REFCNT
Unexecuted instantiation: bootstrap_hash.c:Py_SET_REFCNT
Unexecuted instantiation: specialize.c:Py_SET_REFCNT
Unexecuted instantiation: slots.c:Py_SET_REFCNT
Unexecuted instantiation: slots_generated.c:Py_SET_REFCNT
Unexecuted instantiation: structmember.c:Py_SET_REFCNT
Unexecuted instantiation: symtable.c:Py_SET_REFCNT
Unexecuted instantiation: sysmodule.c:Py_SET_REFCNT
Unexecuted instantiation: thread.c:Py_SET_REFCNT
Unexecuted instantiation: traceback.c:Py_SET_REFCNT
Unexecuted instantiation: tracemalloc.c:Py_SET_REFCNT
Unexecuted instantiation: typecache.c:Py_SET_REFCNT
Unexecuted instantiation: getopt.c:Py_SET_REFCNT
Unexecuted instantiation: pystrcmp.c:Py_SET_REFCNT
Unexecuted instantiation: pystrtod.c:Py_SET_REFCNT
Unexecuted instantiation: dtoa.c:Py_SET_REFCNT
Unexecuted instantiation: fileutils.c:Py_SET_REFCNT
Unexecuted instantiation: suggestions.c:Py_SET_REFCNT
Unexecuted instantiation: perf_trampoline.c:Py_SET_REFCNT
Unexecuted instantiation: perf_jit_trampoline.c:Py_SET_REFCNT
Unexecuted instantiation: jit_unwind.c:Py_SET_REFCNT
Unexecuted instantiation: remote_debugging.c:Py_SET_REFCNT
Unexecuted instantiation: dynload_shlib.c:Py_SET_REFCNT
Unexecuted instantiation: config.c:Py_SET_REFCNT
Unexecuted instantiation: gcmodule.c:Py_SET_REFCNT
Unexecuted instantiation: _asynciomodule.c:Py_SET_REFCNT
Unexecuted instantiation: atexitmodule.c:Py_SET_REFCNT
Unexecuted instantiation: faulthandler.c:Py_SET_REFCNT
Unexecuted instantiation: posixmodule.c:Py_SET_REFCNT
Unexecuted instantiation: signalmodule.c:Py_SET_REFCNT
Unexecuted instantiation: _tracemalloc.c:Py_SET_REFCNT
Unexecuted instantiation: _suggestions.c:Py_SET_REFCNT
Unexecuted instantiation: _datetimemodule.c:Py_SET_REFCNT
Unexecuted instantiation: _codecsmodule.c:Py_SET_REFCNT
Unexecuted instantiation: _collectionsmodule.c:Py_SET_REFCNT
Unexecuted instantiation: errnomodule.c:Py_SET_REFCNT
Unexecuted instantiation: _iomodule.c:Py_SET_REFCNT
Unexecuted instantiation: iobase.c:Py_SET_REFCNT
Unexecuted instantiation: fileio.c:Py_SET_REFCNT
Unexecuted instantiation: bytesio.c:Py_SET_REFCNT
Unexecuted instantiation: bufferedio.c:Py_SET_REFCNT
Unexecuted instantiation: textio.c:Py_SET_REFCNT
Unexecuted instantiation: stringio.c:Py_SET_REFCNT
Unexecuted instantiation: itertoolsmodule.c:Py_SET_REFCNT
Unexecuted instantiation: sre.c:Py_SET_REFCNT
Unexecuted instantiation: _sysconfig.c:Py_SET_REFCNT
Unexecuted instantiation: _threadmodule.c:Py_SET_REFCNT
Unexecuted instantiation: timemodule.c:Py_SET_REFCNT
Unexecuted instantiation: _typesmodule.c:Py_SET_REFCNT
Unexecuted instantiation: _typingmodule.c:Py_SET_REFCNT
Unexecuted instantiation: _weakref.c:Py_SET_REFCNT
Unexecuted instantiation: _abc.c:Py_SET_REFCNT
Unexecuted instantiation: _functoolsmodule.c:Py_SET_REFCNT
Unexecuted instantiation: _localemodule.c:Py_SET_REFCNT
Unexecuted instantiation: _opcode.c:Py_SET_REFCNT
Unexecuted instantiation: _operator.c:Py_SET_REFCNT
Unexecuted instantiation: _stat.c:Py_SET_REFCNT
Unexecuted instantiation: symtablemodule.c:Py_SET_REFCNT
Unexecuted instantiation: pwdmodule.c:Py_SET_REFCNT
Unexecuted instantiation: getpath.c:Py_SET_REFCNT
Unexecuted instantiation: frozen.c:Py_SET_REFCNT
Unexecuted instantiation: getbuildinfo.c:Py_SET_REFCNT
Unexecuted instantiation: peg_api.c:Py_SET_REFCNT
Unexecuted instantiation: file_tokenizer.c:Py_SET_REFCNT
Unexecuted instantiation: helpers.c:Py_SET_REFCNT
Unexecuted instantiation: myreadline.c:Py_SET_REFCNT
Unexecuted instantiation: abstract.c:Py_SET_REFCNT
Unexecuted instantiation: boolobject.c:Py_SET_REFCNT
Unexecuted instantiation: bytes_methods.c:Py_SET_REFCNT
Unexecuted instantiation: bytearrayobject.c:Py_SET_REFCNT
Unexecuted instantiation: bytesobject.c:Py_SET_REFCNT
Unexecuted instantiation: call.c:Py_SET_REFCNT
Unexecuted instantiation: capsule.c:Py_SET_REFCNT
Unexecuted instantiation: cellobject.c:Py_SET_REFCNT
Unexecuted instantiation: classobject.c:Py_SET_REFCNT
codeobject.c:Py_SET_REFCNT
Line
Count
Source
154
114k
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
114k
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000) \
157
    || defined(_Py_OPAQUE_PYOBJECT)
158
    // Stable ABI implements Py_SET_REFCNT() as a function call
159
    // on limited C API version 3.13 and newer, and abi3t.
160
    _Py_SetRefcnt(ob, refcnt);
161
#else
162
    // This immortal check is for code that is unaware of immortal objects.
163
    // The runtime tracks these objects and we should avoid as much
164
    // as possible having extensions inadvertently change the refcnt
165
    // of an immortalized object.
166
114k
    if (_Py_IsImmortal(ob)) {
167
0
        return;
168
0
    }
169
114k
#ifndef Py_GIL_DISABLED
170
114k
#if SIZEOF_VOID_P > 4
171
114k
    ob->ob_refcnt = (uint32_t)refcnt;
172
#else
173
    ob->ob_refcnt = refcnt;
174
#endif
175
#else
176
    if (_Py_IsOwnedByCurrentThread(ob)) {
177
        if ((size_t)refcnt > (size_t)UINT32_MAX) {
178
            // On overflow, make the object immortal
179
            ob->ob_tid = _Py_UNOWNED_TID;
180
            ob->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
181
            ob->ob_ref_shared = 0;
182
        }
183
        else {
184
            // Set local refcount to desired refcount and shared refcount
185
            // to zero, but preserve the shared refcount flags.
186
            ob->ob_ref_local = _Py_STATIC_CAST(uint32_t, refcnt);
187
            ob->ob_ref_shared &= _Py_REF_SHARED_FLAG_MASK;
188
        }
189
    }
190
    else {
191
        // Set local refcount to zero and shared refcount to desired refcount.
192
        // Mark the object as merged.
193
        ob->ob_tid = _Py_UNOWNED_TID;
194
        ob->ob_ref_local = 0;
195
        ob->ob_ref_shared = _Py_REF_SHARED(refcnt, _Py_REF_MERGED);
196
    }
197
#endif  // Py_GIL_DISABLED
198
114k
#endif  // Py_LIMITED_API
199
114k
}
Unexecuted instantiation: complexobject.c:Py_SET_REFCNT
Unexecuted instantiation: descrobject.c:Py_SET_REFCNT
Unexecuted instantiation: enumobject.c:Py_SET_REFCNT
Unexecuted instantiation: genobject.c:Py_SET_REFCNT
Unexecuted instantiation: fileobject.c:Py_SET_REFCNT
Unexecuted instantiation: floatobject.c:Py_SET_REFCNT
Unexecuted instantiation: frameobject.c:Py_SET_REFCNT
funcobject.c:Py_SET_REFCNT
Line
Count
Source
154
2.34M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
2.34M
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000) \
157
    || defined(_Py_OPAQUE_PYOBJECT)
158
    // Stable ABI implements Py_SET_REFCNT() as a function call
159
    // on limited C API version 3.13 and newer, and abi3t.
160
    _Py_SetRefcnt(ob, refcnt);
161
#else
162
    // This immortal check is for code that is unaware of immortal objects.
163
    // The runtime tracks these objects and we should avoid as much
164
    // as possible having extensions inadvertently change the refcnt
165
    // of an immortalized object.
166
2.34M
    if (_Py_IsImmortal(ob)) {
167
0
        return;
168
0
    }
169
2.34M
#ifndef Py_GIL_DISABLED
170
2.34M
#if SIZEOF_VOID_P > 4
171
2.34M
    ob->ob_refcnt = (uint32_t)refcnt;
172
#else
173
    ob->ob_refcnt = refcnt;
174
#endif
175
#else
176
    if (_Py_IsOwnedByCurrentThread(ob)) {
177
        if ((size_t)refcnt > (size_t)UINT32_MAX) {
178
            // On overflow, make the object immortal
179
            ob->ob_tid = _Py_UNOWNED_TID;
180
            ob->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
181
            ob->ob_ref_shared = 0;
182
        }
183
        else {
184
            // Set local refcount to desired refcount and shared refcount
185
            // to zero, but preserve the shared refcount flags.
186
            ob->ob_ref_local = _Py_STATIC_CAST(uint32_t, refcnt);
187
            ob->ob_ref_shared &= _Py_REF_SHARED_FLAG_MASK;
188
        }
189
    }
190
    else {
191
        // Set local refcount to zero and shared refcount to desired refcount.
192
        // Mark the object as merged.
193
        ob->ob_tid = _Py_UNOWNED_TID;
194
        ob->ob_ref_local = 0;
195
        ob->ob_ref_shared = _Py_REF_SHARED(refcnt, _Py_REF_MERGED);
196
    }
197
#endif  // Py_GIL_DISABLED
198
2.34M
#endif  // Py_LIMITED_API
199
2.34M
}
Unexecuted instantiation: interpolationobject.c:Py_SET_REFCNT
Unexecuted instantiation: iterobject.c:Py_SET_REFCNT
Unexecuted instantiation: lazyimportobject.c:Py_SET_REFCNT
Unexecuted instantiation: odictobject.c:Py_SET_REFCNT
Unexecuted instantiation: memoryobject.c:Py_SET_REFCNT
Unexecuted instantiation: methodobject.c:Py_SET_REFCNT
Unexecuted instantiation: namespaceobject.c:Py_SET_REFCNT
Unexecuted instantiation: unicode_format.c:Py_SET_REFCNT
Unexecuted instantiation: _contextvars.c:Py_SET_REFCNT
Unexecuted instantiation: Python-ast.c:Py_SET_REFCNT
Unexecuted instantiation: Python-tokenize.c:Py_SET_REFCNT
Unexecuted instantiation: asdl.c:Py_SET_REFCNT
Unexecuted instantiation: assemble.c:Py_SET_REFCNT
Unexecuted instantiation: ast.c:Py_SET_REFCNT
Unexecuted instantiation: ast_preprocess.c:Py_SET_REFCNT
Unexecuted instantiation: ast_unparse.c:Py_SET_REFCNT
Unexecuted instantiation: critical_section.c:Py_SET_REFCNT
Unexecuted instantiation: crossinterp.c:Py_SET_REFCNT
Unexecuted instantiation: getcopyright.c:Py_SET_REFCNT
Unexecuted instantiation: getplatform.c:Py_SET_REFCNT
Unexecuted instantiation: getversion.c:Py_SET_REFCNT
Unexecuted instantiation: optimizer.c:Py_SET_REFCNT
Unexecuted instantiation: pathconfig.c:Py_SET_REFCNT
Unexecuted instantiation: pymath.c:Py_SET_REFCNT
Unexecuted instantiation: pystrhex.c:Py_SET_REFCNT
Unexecuted instantiation: pegen.c:Py_SET_REFCNT
Unexecuted instantiation: pegen_errors.c:Py_SET_REFCNT
Unexecuted instantiation: parser.c:Py_SET_REFCNT
Unexecuted instantiation: buffer.c:Py_SET_REFCNT
Unexecuted instantiation: lexer.c:Py_SET_REFCNT
Unexecuted instantiation: number.c:Py_SET_REFCNT
Unexecuted instantiation: state.c:Py_SET_REFCNT
Unexecuted instantiation: string.c:Py_SET_REFCNT
Unexecuted instantiation: readline_tokenizer.c:Py_SET_REFCNT
Unexecuted instantiation: string_tokenizer.c:Py_SET_REFCNT
Unexecuted instantiation: utf8_tokenizer.c:Py_SET_REFCNT
Unexecuted instantiation: getcompiler.c:Py_SET_REFCNT
Unexecuted instantiation: mystrtoul.c:Py_SET_REFCNT
Unexecuted instantiation: token.c:Py_SET_REFCNT
Unexecuted instantiation: action_helpers.c:Py_SET_REFCNT
Unexecuted instantiation: string_parser.c:Py_SET_REFCNT
200
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
201
18.7M
#  define Py_SET_REFCNT(ob, refcnt) Py_SET_REFCNT(_PyObject_CAST(ob), (refcnt))
202
#endif
203
204
205
/*
206
The macros Py_INCREF(op) and Py_DECREF(op) are used to increment or decrement
207
reference counts.  Py_DECREF calls the object's deallocator function when
208
the refcount falls to 0; for
209
objects that don't contain references to other objects or heap memory
210
this can be the standard function free().  Both macros can be used
211
wherever a void expression is allowed.  The argument must not be a
212
NULL pointer.  If it may be NULL, use Py_XINCREF/Py_XDECREF instead.
213
The macro _Py_NewReference(op) initialize reference counts to 1, and
214
in special builds (Py_REF_DEBUG, Py_TRACE_REFS) performs additional
215
bookkeeping appropriate to the special build.
216
217
We assume that the reference count field can never overflow; this can
218
be proven when the size of the field is the same as the pointer size, so
219
we ignore the possibility.  Provided a C int is at least 32 bits (which
220
is implicitly assumed in many parts of this code), that's enough for
221
about 2**31 references to an object.
222
223
XXX The following became out of date in Python 2.2, but I'm not sure
224
XXX what the full truth is now.  Certainly, heap-allocated type objects
225
XXX can and should be deallocated.
226
Type objects should never be deallocated; the type pointer in an object
227
is not considered to be a reference to the type object, to save
228
complications in the deallocation function.  (This is actually a
229
decision that's up to the implementer of each new type so if you want,
230
you can count such references to the type object.)
231
*/
232
233
#if defined(Py_REF_DEBUG) && !defined(Py_LIMITED_API)
234
PyAPI_FUNC(void) _Py_NegativeRefcount(const char *filename, int lineno,
235
                                      PyObject *op);
236
PyAPI_FUNC(void) _Py_INCREF_IncRefTotal(void);
237
PyAPI_FUNC(void) _Py_DECREF_DecRefTotal(void);
238
#endif  // Py_REF_DEBUG && !Py_LIMITED_API
239
240
PyAPI_FUNC(void) _Py_Dealloc(PyObject *);
241
242
243
/*
244
These are provided as conveniences to Python runtime embedders, so that
245
they can have object code that is not dependent on Python compilation flags.
246
*/
247
PyAPI_FUNC(void) Py_IncRef(PyObject *);
248
PyAPI_FUNC(void) Py_DecRef(PyObject *);
249
250
// Similar to Py_IncRef() and Py_DecRef() but the argument must be non-NULL.
251
// Private functions used by Py_INCREF() and Py_DECREF().
252
PyAPI_FUNC(void) _Py_IncRef(PyObject *);
253
PyAPI_FUNC(void) _Py_DecRef(PyObject *);
254
255
static inline Py_ALWAYS_INLINE void Py_INCREF(PyObject *op)
256
2.10G
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
2.10G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
658M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
658M
        return;
291
658M
    }
292
1.44G
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
1.44G
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
1.44G
#endif
308
1.44G
}
exceptions.c:Py_INCREF
Line
Count
Source
256
4.53M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
4.53M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
67.4k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
67.4k
        return;
291
67.4k
    }
292
4.46M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
4.46M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
4.46M
#endif
308
4.46M
}
genericaliasobject.c:Py_INCREF
Line
Count
Source
256
194
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
194
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
194
        _Py_INCREF_IMMORTAL_STAT_INC();
290
194
        return;
291
194
    }
292
0
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
0
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
0
#endif
308
0
}
listobject.c:Py_INCREF
Line
Count
Source
256
691M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
691M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
81.1M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
81.1M
        return;
291
81.1M
    }
292
610M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
610M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
610M
#endif
308
610M
}
longobject.c:Py_INCREF
Line
Count
Source
256
12.5M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
12.5M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
12.5M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
12.5M
        return;
291
12.5M
    }
292
60.5k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
60.5k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
60.5k
#endif
308
60.5k
}
dictobject.c:Py_INCREF
Line
Count
Source
256
64.5M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
64.5M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
24.3M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
24.3M
        return;
291
24.3M
    }
292
40.1M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
40.1M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
40.1M
#endif
308
40.1M
}
moduleobject.c:Py_INCREF
Line
Count
Source
256
985
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
985
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
598
        _Py_INCREF_IMMORTAL_STAT_INC();
290
598
        return;
291
598
    }
292
387
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
387
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
387
#endif
308
387
}
object.c:Py_INCREF
Line
Count
Source
256
65.0M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
65.0M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
57.0M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
57.0M
        return;
291
57.0M
    }
292
8.06M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
8.06M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
8.06M
#endif
308
8.06M
}
Unexecuted instantiation: obmalloc.c:Py_INCREF
Unexecuted instantiation: picklebufobject.c:Py_INCREF
rangeobject.c:Py_INCREF
Line
Count
Source
256
84
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
84
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
63
        _Py_INCREF_IMMORTAL_STAT_INC();
290
63
        return;
291
63
    }
292
21
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
21
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
21
#endif
308
21
}
sentinelobject.c:Py_INCREF
Line
Count
Source
256
18
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
18
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
18
        _Py_INCREF_IMMORTAL_STAT_INC();
290
18
        return;
291
18
    }
292
0
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
0
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
0
#endif
308
0
}
setobject.c:Py_INCREF
Line
Count
Source
256
2.05M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
2.05M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
573k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
573k
        return;
291
573k
    }
292
1.48M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
1.48M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
1.48M
#endif
308
1.48M
}
sliceobject.c:Py_INCREF
Line
Count
Source
256
21.5M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
21.5M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
21.5M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
21.5M
        return;
291
21.5M
    }
292
8.09k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
8.09k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
8.09k
#endif
308
8.09k
}
Unexecuted instantiation: structseq.c:Py_INCREF
Unexecuted instantiation: templateobject.c:Py_INCREF
tupleobject.c:Py_INCREF
Line
Count
Source
256
273M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
273M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
91.9M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
91.9M
        return;
291
91.9M
    }
292
181M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
181M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
181M
#endif
308
181M
}
typeobject.c:Py_INCREF
Line
Count
Source
256
41.4M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
41.4M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
33.6M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
33.6M
        return;
291
33.6M
    }
292
7.88M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
7.88M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
7.88M
#endif
308
7.88M
}
Unexecuted instantiation: typevarobject.c:Py_INCREF
Unexecuted instantiation: unicode_formatter.c:Py_INCREF
Unexecuted instantiation: unicode_writer.c:Py_INCREF
Unexecuted instantiation: unicodectype.c:Py_INCREF
unicodeobject.c:Py_INCREF
Line
Count
Source
256
31.3M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
31.3M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
30.6M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
30.6M
        return;
291
30.6M
    }
292
650k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
650k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
650k
#endif
308
650k
}
Unexecuted instantiation: unionobject.c:Py_INCREF
weakrefobject.c:Py_INCREF
Line
Count
Source
256
10.6k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
10.6k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
1.89k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
1.89k
        return;
291
1.89k
    }
292
8.77k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
8.77k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
8.77k
#endif
308
8.77k
}
_warnings.c:Py_INCREF
Line
Count
Source
256
5.34M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
5.34M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
2.28M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
2.28M
        return;
291
2.28M
    }
292
3.06M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
3.06M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
3.06M
#endif
308
3.06M
}
bltinmodule.c:Py_INCREF
Line
Count
Source
256
62.4M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
62.4M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
35.8M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
35.8M
        return;
291
35.8M
    }
292
26.6M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
26.6M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
26.6M
#endif
308
26.6M
}
ceval.c:Py_INCREF
Line
Count
Source
256
108M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
108M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
57.1M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
57.1M
        return;
291
57.1M
    }
292
51.6M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
51.6M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
51.6M
#endif
308
51.6M
}
codecs.c:Py_INCREF
Line
Count
Source
256
124k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
124k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
2.65k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
2.65k
        return;
291
2.65k
    }
292
122k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
122k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
122k
#endif
308
122k
}
codegen.c:Py_INCREF
Line
Count
Source
256
25.9k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
25.9k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
25.7k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
25.7k
        return;
291
25.7k
    }
292
167
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
167
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
167
#endif
308
167
}
compile.c:Py_INCREF
Line
Count
Source
256
1.14M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
1.14M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
369k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
369k
        return;
291
369k
    }
292
779k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
779k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
779k
#endif
308
779k
}
context.c:Py_INCREF
Line
Count
Source
256
36
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
36
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
7
        _Py_INCREF_IMMORTAL_STAT_INC();
290
7
        return;
291
7
    }
292
29
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
29
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
29
#endif
308
29
}
errors.c:Py_INCREF
Line
Count
Source
256
6.25M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
6.25M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
6.06M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
6.06M
        return;
291
6.06M
    }
292
186k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
186k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
186k
#endif
308
186k
}
flowgraph.c:Py_INCREF
Line
Count
Source
256
3.00M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
3.00M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
1.07M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
1.07M
        return;
291
1.07M
    }
292
1.93M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
1.93M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
1.93M
#endif
308
1.93M
}
frame.c:Py_INCREF
Line
Count
Source
256
4.01M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
4.01M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
4.01M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
4.01M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
4.01M
#endif
308
4.01M
}
Unexecuted instantiation: future.c:Py_INCREF
gc.c:Py_INCREF
Line
Count
Source
256
117M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
117M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
117M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
117M
        return;
291
117M
    }
292
73.3k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
73.3k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
73.3k
#endif
308
73.3k
}
Unexecuted instantiation: gc_gil.c:Py_INCREF
getargs.c:Py_INCREF
Line
Count
Source
256
1.26M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
1.26M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
1.25M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
1.25M
        return;
291
1.25M
    }
292
8.32k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
8.32k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
8.32k
#endif
308
8.32k
}
Unexecuted instantiation: ceval_gil.c:Py_INCREF
hamt.c:Py_INCREF
Line
Count
Source
256
12
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
12
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
4
        _Py_INCREF_IMMORTAL_STAT_INC();
290
4
        return;
291
4
    }
292
8
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
8
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
8
#endif
308
8
}
Unexecuted instantiation: hashtable.c:Py_INCREF
import.c:Py_INCREF
Line
Count
Source
256
12.2M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
12.2M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
2.29M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
2.29M
        return;
291
2.29M
    }
292
9.99M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
9.99M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
9.99M
#endif
308
9.99M
}
importdl.c:Py_INCREF
Line
Count
Source
256
362
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
362
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
309
        _Py_INCREF_IMMORTAL_STAT_INC();
290
309
        return;
291
309
    }
292
53
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
53
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
53
#endif
308
53
}
initconfig.c:Py_INCREF
Line
Count
Source
256
336
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
336
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
336
        _Py_INCREF_IMMORTAL_STAT_INC();
290
336
        return;
291
336
    }
292
0
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
0
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
0
#endif
308
0
}
Unexecuted instantiation: instrumentation.c:Py_INCREF
Unexecuted instantiation: instruction_sequence.c:Py_INCREF
intrinsics.c:Py_INCREF
Line
Count
Source
256
25.8k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
25.8k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
25.8k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
25.8k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
25.8k
#endif
308
25.8k
}
Unexecuted instantiation: legacy_tracing.c:Py_INCREF
Unexecuted instantiation: lock.c:Py_INCREF
marshal.c:Py_INCREF
Line
Count
Source
256
245k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
245k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
220k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
220k
        return;
291
220k
    }
292
25.3k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
25.3k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
25.3k
#endif
308
25.3k
}
modsupport.c:Py_INCREF
Line
Count
Source
256
1.60M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
1.60M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
360k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
360k
        return;
291
360k
    }
292
1.23M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
1.23M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
1.23M
#endif
308
1.23M
}
Unexecuted instantiation: mysnprintf.c:Py_INCREF
Unexecuted instantiation: parking_lot.c:Py_INCREF
Unexecuted instantiation: preconfig.c:Py_INCREF
Unexecuted instantiation: pyarena.c:Py_INCREF
Unexecuted instantiation: pyctype.c:Py_INCREF
Unexecuted instantiation: pyhash.c:Py_INCREF
pylifecycle.c:Py_INCREF
Line
Count
Source
256
21
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
21
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
21
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
21
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
21
#endif
308
21
}
pystate.c:Py_INCREF
Line
Count
Source
256
1.24M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
1.24M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
1.24M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
1.24M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
1.24M
#endif
308
1.24M
}
Unexecuted instantiation: pythonrun.c:Py_INCREF
Unexecuted instantiation: pytime.c:Py_INCREF
Unexecuted instantiation: qsbr.c:Py_INCREF
Unexecuted instantiation: bootstrap_hash.c:Py_INCREF
Unexecuted instantiation: specialize.c:Py_INCREF
Unexecuted instantiation: slots.c:Py_INCREF
Unexecuted instantiation: slots_generated.c:Py_INCREF
structmember.c:Py_INCREF
Line
Count
Source
256
5.36k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
5.36k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
2.53k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
2.53k
        return;
291
2.53k
    }
292
2.83k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
2.83k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
2.83k
#endif
308
2.83k
}
symtable.c:Py_INCREF
Line
Count
Source
256
1.24M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
1.24M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
1.21M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
1.21M
        return;
291
1.21M
    }
292
32.0k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
32.0k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
32.0k
#endif
308
32.0k
}
sysmodule.c:Py_INCREF
Line
Count
Source
256
1.13k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
1.13k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
970
        _Py_INCREF_IMMORTAL_STAT_INC();
290
970
        return;
291
970
    }
292
162
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
162
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
162
#endif
308
162
}
Unexecuted instantiation: thread.c:Py_INCREF
traceback.c:Py_INCREF
Line
Count
Source
256
3.84M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
3.84M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
3.84M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
3.84M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
3.84M
#endif
308
3.84M
}
Unexecuted instantiation: tracemalloc.c:Py_INCREF
typecache.c:Py_INCREF
Line
Count
Source
256
74.1k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
74.1k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
47.5k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
47.5k
        return;
291
47.5k
    }
292
26.5k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
26.5k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
26.5k
#endif
308
26.5k
}
Unexecuted instantiation: getopt.c:Py_INCREF
Unexecuted instantiation: pystrcmp.c:Py_INCREF
Unexecuted instantiation: pystrtod.c:Py_INCREF
Unexecuted instantiation: dtoa.c:Py_INCREF
Unexecuted instantiation: fileutils.c:Py_INCREF
Unexecuted instantiation: suggestions.c:Py_INCREF
Unexecuted instantiation: perf_trampoline.c:Py_INCREF
Unexecuted instantiation: perf_jit_trampoline.c:Py_INCREF
Unexecuted instantiation: jit_unwind.c:Py_INCREF
Unexecuted instantiation: remote_debugging.c:Py_INCREF
Unexecuted instantiation: dynload_shlib.c:Py_INCREF
Unexecuted instantiation: config.c:Py_INCREF
Unexecuted instantiation: gcmodule.c:Py_INCREF
Unexecuted instantiation: _asynciomodule.c:Py_INCREF
Unexecuted instantiation: atexitmodule.c:Py_INCREF
Unexecuted instantiation: faulthandler.c:Py_INCREF
posixmodule.c:Py_INCREF
Line
Count
Source
256
8.81k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
8.81k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
135
        _Py_INCREF_IMMORTAL_STAT_INC();
290
135
        return;
291
135
    }
292
8.68k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
8.68k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
8.68k
#endif
308
8.68k
}
Unexecuted instantiation: signalmodule.c:Py_INCREF
Unexecuted instantiation: _tracemalloc.c:Py_INCREF
Unexecuted instantiation: _suggestions.c:Py_INCREF
_datetimemodule.c:Py_INCREF
Line
Count
Source
256
126
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
126
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
84
        _Py_INCREF_IMMORTAL_STAT_INC();
290
84
        return;
291
84
    }
292
42
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
42
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
42
#endif
308
42
}
Unexecuted instantiation: _codecsmodule.c:Py_INCREF
_collectionsmodule.c:Py_INCREF
Line
Count
Source
256
55
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
55
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
4
        _Py_INCREF_IMMORTAL_STAT_INC();
290
4
        return;
291
4
    }
292
51
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
51
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
51
#endif
308
51
}
Unexecuted instantiation: errnomodule.c:Py_INCREF
_iomodule.c:Py_INCREF
Line
Count
Source
256
63
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
63
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
63
        _Py_INCREF_IMMORTAL_STAT_INC();
290
63
        return;
291
63
    }
292
0
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
0
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
0
#endif
308
0
}
iobase.c:Py_INCREF
Line
Count
Source
256
200
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
200
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
200
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
200
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
200
#endif
308
200
}
Unexecuted instantiation: fileio.c:Py_INCREF
Unexecuted instantiation: bytesio.c:Py_INCREF
bufferedio.c:Py_INCREF
Line
Count
Source
256
454
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
454
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
454
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
454
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
454
#endif
308
454
}
textio.c:Py_INCREF
Line
Count
Source
256
699k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
699k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
3
        _Py_INCREF_IMMORTAL_STAT_INC();
290
3
        return;
291
3
    }
292
699k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
699k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
699k
#endif
308
699k
}
Unexecuted instantiation: stringio.c:Py_INCREF
itertoolsmodule.c:Py_INCREF
Line
Count
Source
256
1.12k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
1.12k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
513
        _Py_INCREF_IMMORTAL_STAT_INC();
290
513
        return;
291
513
    }
292
612
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
612
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
612
#endif
308
612
}
sre.c:Py_INCREF
Line
Count
Source
256
32.4k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
32.4k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
334
        _Py_INCREF_IMMORTAL_STAT_INC();
290
334
        return;
291
334
    }
292
32.0k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
32.0k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
32.0k
#endif
308
32.0k
}
Unexecuted instantiation: _sysconfig.c:Py_INCREF
Unexecuted instantiation: _threadmodule.c:Py_INCREF
Unexecuted instantiation: timemodule.c:Py_INCREF
Unexecuted instantiation: _typesmodule.c:Py_INCREF
Unexecuted instantiation: _typingmodule.c:Py_INCREF
Unexecuted instantiation: _weakref.c:Py_INCREF
_abc.c:Py_INCREF
Line
Count
Source
256
9.02k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
9.02k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
8.97k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
8.97k
        return;
291
8.97k
    }
292
42
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
42
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
42
#endif
308
42
}
_functoolsmodule.c:Py_INCREF
Line
Count
Source
256
74
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
74
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
16
        _Py_INCREF_IMMORTAL_STAT_INC();
290
16
        return;
291
16
    }
292
58
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
58
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
58
#endif
308
58
}
Unexecuted instantiation: _localemodule.c:Py_INCREF
Unexecuted instantiation: _opcode.c:Py_INCREF
Unexecuted instantiation: _operator.c:Py_INCREF
Unexecuted instantiation: _stat.c:Py_INCREF
Unexecuted instantiation: symtablemodule.c:Py_INCREF
Unexecuted instantiation: pwdmodule.c:Py_INCREF
getpath.c:Py_INCREF
Line
Count
Source
256
252
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
252
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
252
        _Py_INCREF_IMMORTAL_STAT_INC();
290
252
        return;
291
252
    }
292
0
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
0
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
0
#endif
308
0
}
Unexecuted instantiation: frozen.c:Py_INCREF
Unexecuted instantiation: getbuildinfo.c:Py_INCREF
Unexecuted instantiation: peg_api.c:Py_INCREF
Unexecuted instantiation: file_tokenizer.c:Py_INCREF
Unexecuted instantiation: helpers.c:Py_INCREF
Unexecuted instantiation: myreadline.c:Py_INCREF
abstract.c:Py_INCREF
Line
Count
Source
256
65.3M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
65.3M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
54.5M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
54.5M
        return;
291
54.5M
    }
292
10.7M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
10.7M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
10.7M
#endif
308
10.7M
}
Unexecuted instantiation: boolobject.c:Py_INCREF
Unexecuted instantiation: bytes_methods.c:Py_INCREF
bytearrayobject.c:Py_INCREF
Line
Count
Source
256
31
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
31
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
31
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
31
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
31
#endif
308
31
}
bytesobject.c:Py_INCREF
Line
Count
Source
256
5.39M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
5.39M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
5.39M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
5.39M
        return;
291
5.39M
    }
292
259
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
259
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
259
#endif
308
259
}
call.c:Py_INCREF
Line
Count
Source
256
5.90k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
5.90k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
4.06k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
4.06k
        return;
291
4.06k
    }
292
1.83k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
1.83k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
1.83k
#endif
308
1.83k
}
Unexecuted instantiation: capsule.c:Py_INCREF
cellobject.c:Py_INCREF
Line
Count
Source
256
22.7k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
22.7k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
46
        _Py_INCREF_IMMORTAL_STAT_INC();
290
46
        return;
291
46
    }
292
22.6k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
22.6k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
22.6k
#endif
308
22.6k
}
classobject.c:Py_INCREF
Line
Count
Source
256
25.4M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
25.4M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
25.4M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
25.4M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
25.4M
#endif
308
25.4M
}
codeobject.c:Py_INCREF
Line
Count
Source
256
64.6M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
64.6M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
2.06M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
2.06M
        return;
291
2.06M
    }
292
62.5M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
62.5M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
62.5M
#endif
308
62.5M
}
complexobject.c:Py_INCREF
Line
Count
Source
256
375k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
375k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
371k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
371k
        return;
291
371k
    }
292
3.55k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
3.55k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
3.55k
#endif
308
3.55k
}
descrobject.c:Py_INCREF
Line
Count
Source
256
57.7k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
57.7k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
40.0k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
40.0k
        return;
291
40.0k
    }
292
17.6k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
17.6k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
17.6k
#endif
308
17.6k
}
enumobject.c:Py_INCREF
Line
Count
Source
256
6.41M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
6.41M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
6.41M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
6.41M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
6.41M
#endif
308
6.41M
}
genobject.c:Py_INCREF
Line
Count
Source
256
10.8M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
10.8M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
10.8M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
10.8M
        return;
291
10.8M
    }
292
25.8k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
25.8k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
25.8k
#endif
308
25.8k
}
Unexecuted instantiation: fileobject.c:Py_INCREF
floatobject.c:Py_INCREF
Line
Count
Source
256
255k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
255k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
249k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
249k
        return;
291
249k
    }
292
5.99k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
5.99k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
5.99k
#endif
308
5.99k
}
frameobject.c:Py_INCREF
Line
Count
Source
256
360M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
360M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
360M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
360M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
360M
#endif
308
360M
}
funcobject.c:Py_INCREF
Line
Count
Source
256
5.97M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
5.97M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
3.57M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
3.57M
        return;
291
3.57M
    }
292
2.40M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
2.40M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
2.40M
#endif
308
2.40M
}
Unexecuted instantiation: interpolationobject.c:Py_INCREF
iterobject.c:Py_INCREF
Line
Count
Source
256
2.93M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
2.93M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
2.93M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
2.93M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
2.93M
#endif
308
2.93M
}
lazyimportobject.c:Py_INCREF
Line
Count
Source
256
360
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
360
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
124
        _Py_INCREF_IMMORTAL_STAT_INC();
290
124
        return;
291
124
    }
292
236
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
236
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
236
#endif
308
236
}
Unexecuted instantiation: odictobject.c:Py_INCREF
memoryobject.c:Py_INCREF
Line
Count
Source
256
748k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
748k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
414
        _Py_INCREF_IMMORTAL_STAT_INC();
290
414
        return;
291
414
    }
292
748k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
748k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
748k
#endif
308
748k
}
methodobject.c:Py_INCREF
Line
Count
Source
256
9.36M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
9.36M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
1.30M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
1.30M
        return;
291
1.30M
    }
292
8.05M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
8.05M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
8.05M
#endif
308
8.05M
}
Unexecuted instantiation: namespaceobject.c:Py_INCREF
unicode_format.c:Py_INCREF
Line
Count
Source
256
1.49M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
1.49M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
102k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
102k
        return;
291
102k
    }
292
1.38M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
1.38M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
1.38M
#endif
308
1.38M
}
Unexecuted instantiation: _contextvars.c:Py_INCREF
Python-ast.c:Py_INCREF
Line
Count
Source
256
546k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
546k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
298k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
298k
        return;
291
298k
    }
292
247k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
247k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
247k
#endif
308
247k
}
Unexecuted instantiation: Python-tokenize.c:Py_INCREF
Unexecuted instantiation: asdl.c:Py_INCREF
assemble.c:Py_INCREF
Line
Count
Source
256
200k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
200k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
191k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
191k
        return;
291
191k
    }
292
8.72k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
8.72k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
8.72k
#endif
308
8.72k
}
Unexecuted instantiation: ast.c:Py_INCREF
Unexecuted instantiation: ast_preprocess.c:Py_INCREF
Unexecuted instantiation: ast_unparse.c:Py_INCREF
Unexecuted instantiation: critical_section.c:Py_INCREF
Unexecuted instantiation: crossinterp.c:Py_INCREF
Unexecuted instantiation: getcopyright.c:Py_INCREF
Unexecuted instantiation: getplatform.c:Py_INCREF
Unexecuted instantiation: getversion.c:Py_INCREF
Unexecuted instantiation: optimizer.c:Py_INCREF
Unexecuted instantiation: pathconfig.c:Py_INCREF
Unexecuted instantiation: pymath.c:Py_INCREF
Unexecuted instantiation: pystrhex.c:Py_INCREF
pegen.c:Py_INCREF
Line
Count
Source
256
24.2k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
24.2k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
1.53k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
1.53k
        return;
291
1.53k
    }
292
22.6k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
22.6k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
22.6k
#endif
308
22.6k
}
Unexecuted instantiation: pegen_errors.c:Py_INCREF
Unexecuted instantiation: parser.c:Py_INCREF
Unexecuted instantiation: buffer.c:Py_INCREF
Unexecuted instantiation: lexer.c:Py_INCREF
Unexecuted instantiation: number.c:Py_INCREF
Unexecuted instantiation: state.c:Py_INCREF
Unexecuted instantiation: string.c:Py_INCREF
Unexecuted instantiation: readline_tokenizer.c:Py_INCREF
Unexecuted instantiation: string_tokenizer.c:Py_INCREF
Unexecuted instantiation: utf8_tokenizer.c:Py_INCREF
Unexecuted instantiation: getcompiler.c:Py_INCREF
Unexecuted instantiation: mystrtoul.c:Py_INCREF
Unexecuted instantiation: token.c:Py_INCREF
Unexecuted instantiation: action_helpers.c:Py_INCREF
Unexecuted instantiation: string_parser.c:Py_INCREF
309
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
310
2.10G
#  define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op))
311
#endif
312
313
#if !defined(Py_LIMITED_API)
314
#if defined(Py_GIL_DISABLED)
315
// Implements Py_DECREF on objects not owned by the current thread.
316
PyAPI_FUNC(void) _Py_DecRefShared(PyObject *);
317
PyAPI_FUNC(void) _Py_DecRefSharedDebug(PyObject *, const char *, int);
318
319
// Called from Py_DECREF by the owning thread when the local refcount reaches
320
// zero. The call will deallocate the object if the shared refcount is also
321
// zero. Otherwise, the thread gives up ownership and merges the reference
322
// count fields.
323
PyAPI_FUNC(void) _Py_MergeZeroLocalRefcount(PyObject *);
324
#endif  // Py_GIL_DISABLED
325
#endif  // Py_LIMITED_API
326
327
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
328
    || defined(_Py_OPAQUE_PYOBJECT)
329
// Stable ABI implements Py_DECREF() as a function call on limited C API
330
// version 3.12 and newer, abi3t, and on Python built in debug mode.
331
// _Py_DecRef() was added to Python 3.10.0a7, use Py_DecRef() on older versions.
332
// Py_DecRef() accepts NULL whereas _Py_DecRef() doesn't.
333
5.77k
static inline void Py_DECREF(PyObject *op) {
334
5.77k
#  if Py_LIMITED_API+0 >= 0x030a00A7
335
5.77k
    _Py_DecRef(op);
336
#  else
337
    Py_DecRef(op);
338
#  endif
339
5.77k
}
errnomodule.c:Py_DECREF
Line
Count
Source
333
5.77k
static inline void Py_DECREF(PyObject *op) {
334
5.77k
#  if Py_LIMITED_API+0 >= 0x030a00A7
335
5.77k
    _Py_DecRef(op);
336
#  else
337
    Py_DecRef(op);
338
#  endif
339
5.77k
}
Unexecuted instantiation: _stat.c:Py_DECREF
340
5.77k
#define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op))
341
342
#elif defined(Py_GIL_DISABLED) && defined(Py_REF_DEBUG)
343
static inline void Py_DECREF(const char *filename, int lineno, PyObject *op)
344
{
345
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
346
    if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
347
        _Py_DECREF_IMMORTAL_STAT_INC();
348
        return;
349
    }
350
    _Py_DECREF_STAT_INC();
351
    _Py_DECREF_DecRefTotal();
352
    if (_Py_IsOwnedByCurrentThread(op)) {
353
        if (local == 0) {
354
            _Py_NegativeRefcount(filename, lineno, op);
355
        }
356
        local--;
357
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, local);
358
        if (local == 0) {
359
            _Py_MergeZeroLocalRefcount(op);
360
        }
361
    }
362
    else {
363
        _Py_DecRefSharedDebug(op, filename, lineno);
364
    }
365
}
366
#define Py_DECREF(op) Py_DECREF(__FILE__, __LINE__, _PyObject_CAST(op))
367
368
#elif defined(Py_GIL_DISABLED)
369
static inline void Py_DECREF(PyObject *op)
370
{
371
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
372
    if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
373
        _Py_DECREF_IMMORTAL_STAT_INC();
374
        return;
375
    }
376
    _Py_DECREF_STAT_INC();
377
    if (_Py_IsOwnedByCurrentThread(op)) {
378
        local--;
379
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, local);
380
        if (local == 0) {
381
            _Py_MergeZeroLocalRefcount(op);
382
        }
383
    }
384
    else {
385
        _Py_DecRefShared(op);
386
    }
387
}
388
#define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op))
389
390
#elif defined(Py_REF_DEBUG)
391
392
static inline void Py_DECREF(const char *filename, int lineno, PyObject *op)
393
{
394
#if SIZEOF_VOID_P > 4
395
    /* If an object has been freed, it will have a negative full refcnt
396
     * If it has not it been freed, will have a very large refcnt */
397
    if (op->ob_refcnt_full <= 0 || op->ob_refcnt > (((uint32_t)-1) - (1<<20))) {
398
#else
399
    if (op->ob_refcnt <= 0) {
400
#endif
401
        _Py_NegativeRefcount(filename, lineno, op);
402
    }
403
    if (_Py_IsImmortal(op)) {
404
        _Py_DECREF_IMMORTAL_STAT_INC();
405
        return;
406
    }
407
    _Py_DECREF_STAT_INC();
408
    _Py_DECREF_DecRefTotal();
409
    if (--op->ob_refcnt == 0) {
410
        _Py_Dealloc(op);
411
    }
412
}
413
#define Py_DECREF(op) Py_DECREF(__FILE__, __LINE__, _PyObject_CAST(op))
414
415
#else
416
417
static inline Py_ALWAYS_INLINE void Py_DECREF(PyObject *op)
418
2.07G
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
2.07G
    if (_Py_IsImmortal(op)) {
422
502M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
502M
        return;
424
502M
    }
425
1.57G
    _Py_DECREF_STAT_INC();
426
1.57G
    if (--op->ob_refcnt == 0) {
427
164M
        _Py_Dealloc(op);
428
164M
    }
429
1.57G
}
exceptions.c:Py_DECREF
Line
Count
Source
418
8.35M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
8.35M
    if (_Py_IsImmortal(op)) {
422
100k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
100k
        return;
424
100k
    }
425
8.25M
    _Py_DECREF_STAT_INC();
426
8.25M
    if (--op->ob_refcnt == 0) {
427
7.56M
        _Py_Dealloc(op);
428
7.56M
    }
429
8.25M
}
genericaliasobject.c:Py_DECREF
Line
Count
Source
418
92
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
92
    if (_Py_IsImmortal(op)) {
422
46
        _Py_DECREF_IMMORTAL_STAT_INC();
423
46
        return;
424
46
    }
425
46
    _Py_DECREF_STAT_INC();
426
46
    if (--op->ob_refcnt == 0) {
427
46
        _Py_Dealloc(op);
428
46
    }
429
46
}
listobject.c:Py_DECREF
Line
Count
Source
418
683M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
683M
    if (_Py_IsImmortal(op)) {
422
52.7M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
52.7M
        return;
424
52.7M
    }
425
631M
    _Py_DECREF_STAT_INC();
426
631M
    if (--op->ob_refcnt == 0) {
427
36.6M
        _Py_Dealloc(op);
428
36.6M
    }
429
631M
}
longobject.c:Py_DECREF
Line
Count
Source
418
1.69M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.69M
    if (_Py_IsImmortal(op)) {
422
953k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
953k
        return;
424
953k
    }
425
746k
    _Py_DECREF_STAT_INC();
426
746k
    if (--op->ob_refcnt == 0) {
427
490k
        _Py_Dealloc(op);
428
490k
    }
429
746k
}
dictobject.c:Py_DECREF
Line
Count
Source
418
60.4M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
60.4M
    if (_Py_IsImmortal(op)) {
422
18.2M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
18.2M
        return;
424
18.2M
    }
425
42.2M
    _Py_DECREF_STAT_INC();
426
42.2M
    if (--op->ob_refcnt == 0) {
427
14.4M
        _Py_Dealloc(op);
428
14.4M
    }
429
42.2M
}
moduleobject.c:Py_DECREF
Line
Count
Source
418
3.26M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
3.26M
    if (_Py_IsImmortal(op)) {
422
3.25M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
3.25M
        return;
424
3.25M
    }
425
12.7k
    _Py_DECREF_STAT_INC();
426
12.7k
    if (--op->ob_refcnt == 0) {
427
4
        _Py_Dealloc(op);
428
4
    }
429
12.7k
}
object.c:Py_DECREF
Line
Count
Source
418
64.2M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
64.2M
    if (_Py_IsImmortal(op)) {
422
56.5M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
56.5M
        return;
424
56.5M
    }
425
7.68M
    _Py_DECREF_STAT_INC();
426
7.68M
    if (--op->ob_refcnt == 0) {
427
27.4k
        _Py_Dealloc(op);
428
27.4k
    }
429
7.68M
}
Unexecuted instantiation: obmalloc.c:Py_DECREF
Unexecuted instantiation: picklebufobject.c:Py_DECREF
rangeobject.c:Py_DECREF
Line
Count
Source
418
32.6M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
32.6M
    if (_Py_IsImmortal(op)) {
422
32.6M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
32.6M
        return;
424
32.6M
    }
425
64.7k
    _Py_DECREF_STAT_INC();
426
64.7k
    if (--op->ob_refcnt == 0) {
427
64.7k
        _Py_Dealloc(op);
428
64.7k
    }
429
64.7k
}
sentinelobject.c:Py_DECREF
Line
Count
Source
418
6
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
6
    if (_Py_IsImmortal(op)) {
422
6
        _Py_DECREF_IMMORTAL_STAT_INC();
423
6
        return;
424
6
    }
425
0
    _Py_DECREF_STAT_INC();
426
0
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
0
}
setobject.c:Py_DECREF
Line
Count
Source
418
1.46M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.46M
    if (_Py_IsImmortal(op)) {
422
553k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
553k
        return;
424
553k
    }
425
914k
    _Py_DECREF_STAT_INC();
426
914k
    if (--op->ob_refcnt == 0) {
427
50.0k
        _Py_Dealloc(op);
428
50.0k
    }
429
914k
}
sliceobject.c:Py_DECREF
Line
Count
Source
418
21.6M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
21.6M
    if (_Py_IsImmortal(op)) {
422
21.6M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
21.6M
        return;
424
21.6M
    }
425
37.1k
    _Py_DECREF_STAT_INC();
426
37.1k
    if (--op->ob_refcnt == 0) {
427
26.2k
        _Py_Dealloc(op);
428
26.2k
    }
429
37.1k
}
structseq.c:Py_DECREF
Line
Count
Source
418
25.0k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
25.0k
    if (_Py_IsImmortal(op)) {
422
7.32k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
7.32k
        return;
424
7.32k
    }
425
17.7k
    _Py_DECREF_STAT_INC();
426
17.7k
    if (--op->ob_refcnt == 0) {
427
15.2k
        _Py_Dealloc(op);
428
15.2k
    }
429
17.7k
}
Unexecuted instantiation: templateobject.c:Py_DECREF
tupleobject.c:Py_DECREF
Line
Count
Source
418
449M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
449M
    if (_Py_IsImmortal(op)) {
422
102M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
102M
        return;
424
102M
    }
425
346M
    _Py_DECREF_STAT_INC();
426
346M
    if (--op->ob_refcnt == 0) {
427
68.7M
        _Py_Dealloc(op);
428
68.7M
    }
429
346M
}
typeobject.c:Py_DECREF
Line
Count
Source
418
38.0M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
38.0M
    if (_Py_IsImmortal(op)) {
422
26.4M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
26.4M
        return;
424
26.4M
    }
425
11.5M
    _Py_DECREF_STAT_INC();
426
11.5M
    if (--op->ob_refcnt == 0) {
427
2.89M
        _Py_Dealloc(op);
428
2.89M
    }
429
11.5M
}
Unexecuted instantiation: typevarobject.c:Py_DECREF
unicode_formatter.c:Py_DECREF
Line
Count
Source
418
128
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
128
    if (_Py_IsImmortal(op)) {
422
96
        _Py_DECREF_IMMORTAL_STAT_INC();
423
96
        return;
424
96
    }
425
32
    _Py_DECREF_STAT_INC();
426
32
    if (--op->ob_refcnt == 0) {
427
32
        _Py_Dealloc(op);
428
32
    }
429
32
}
unicode_writer.c:Py_DECREF
Line
Count
Source
418
122k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
122k
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
122k
    _Py_DECREF_STAT_INC();
426
122k
    if (--op->ob_refcnt == 0) {
427
122k
        _Py_Dealloc(op);
428
122k
    }
429
122k
}
Unexecuted instantiation: unicodectype.c:Py_DECREF
unicodeobject.c:Py_DECREF
Line
Count
Source
418
34.5M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
34.5M
    if (_Py_IsImmortal(op)) {
422
32.4M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
32.4M
        return;
424
32.4M
    }
425
2.12M
    _Py_DECREF_STAT_INC();
426
2.12M
    if (--op->ob_refcnt == 0) {
427
701k
        _Py_Dealloc(op);
428
701k
    }
429
2.12M
}
unionobject.c:Py_DECREF
Line
Count
Source
418
200
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
200
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
200
    _Py_DECREF_STAT_INC();
426
200
    if (--op->ob_refcnt == 0) {
427
200
        _Py_Dealloc(op);
428
200
    }
429
200
}
weakrefobject.c:Py_DECREF
Line
Count
Source
418
6.34k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
6.34k
    if (_Py_IsImmortal(op)) {
422
3.77k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
3.77k
        return;
424
3.77k
    }
425
2.57k
    _Py_DECREF_STAT_INC();
426
2.57k
    if (--op->ob_refcnt == 0) {
427
2.44k
        _Py_Dealloc(op);
428
2.44k
    }
429
2.57k
}
_warnings.c:Py_DECREF
Line
Count
Source
418
379M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
379M
    if (_Py_IsImmortal(op)) {
422
6.01M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
6.01M
        return;
424
6.01M
    }
425
373M
    _Py_DECREF_STAT_INC();
426
373M
    if (--op->ob_refcnt == 0) {
427
3.35M
        _Py_Dealloc(op);
428
3.35M
    }
429
373M
}
bltinmodule.c:Py_DECREF
Line
Count
Source
418
59.5M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
59.5M
    if (_Py_IsImmortal(op)) {
422
34.4M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
34.4M
        return;
424
34.4M
    }
425
25.0M
    _Py_DECREF_STAT_INC();
426
25.0M
    if (--op->ob_refcnt == 0) {
427
196k
        _Py_Dealloc(op);
428
196k
    }
429
25.0M
}
ceval.c:Py_DECREF
Line
Count
Source
418
255
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
255
    if (_Py_IsImmortal(op)) {
422
12
        _Py_DECREF_IMMORTAL_STAT_INC();
423
12
        return;
424
12
    }
425
243
    _Py_DECREF_STAT_INC();
426
243
    if (--op->ob_refcnt == 0) {
427
62
        _Py_Dealloc(op);
428
62
    }
429
243
}
codecs.c:Py_DECREF
Line
Count
Source
418
447k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
447k
    if (_Py_IsImmortal(op)) {
422
85.6k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
85.6k
        return;
424
85.6k
    }
425
362k
    _Py_DECREF_STAT_INC();
426
362k
    if (--op->ob_refcnt == 0) {
427
82.5k
        _Py_Dealloc(op);
428
82.5k
    }
429
362k
}
codegen.c:Py_DECREF
Line
Count
Source
418
797k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
797k
    if (_Py_IsImmortal(op)) {
422
662k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
662k
        return;
424
662k
    }
425
134k
    _Py_DECREF_STAT_INC();
426
134k
    if (--op->ob_refcnt == 0) {
427
35.3k
        _Py_Dealloc(op);
428
35.3k
    }
429
134k
}
compile.c:Py_DECREF
Line
Count
Source
418
7.93M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
7.93M
    if (_Py_IsImmortal(op)) {
422
3.59M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
3.59M
        return;
424
3.59M
    }
425
4.34M
    _Py_DECREF_STAT_INC();
426
4.34M
    if (--op->ob_refcnt == 0) {
427
1.88M
        _Py_Dealloc(op);
428
1.88M
    }
429
4.34M
}
context.c:Py_DECREF
Line
Count
Source
418
54
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
54
    if (_Py_IsImmortal(op)) {
422
25
        _Py_DECREF_IMMORTAL_STAT_INC();
423
25
        return;
424
25
    }
425
29
    _Py_DECREF_STAT_INC();
426
29
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
29
}
errors.c:Py_DECREF
Line
Count
Source
418
9.35M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
9.35M
    if (_Py_IsImmortal(op)) {
422
6.06M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
6.06M
        return;
424
6.06M
    }
425
3.29M
    _Py_DECREF_STAT_INC();
426
3.29M
    if (--op->ob_refcnt == 0) {
427
3.06M
        _Py_Dealloc(op);
428
3.06M
    }
429
3.29M
}
flowgraph.c:Py_DECREF
Line
Count
Source
418
4.03M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
4.03M
    if (_Py_IsImmortal(op)) {
422
1.60M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.60M
        return;
424
1.60M
    }
425
2.42M
    _Py_DECREF_STAT_INC();
426
2.42M
    if (--op->ob_refcnt == 0) {
427
4.29k
        _Py_Dealloc(op);
428
4.29k
    }
429
2.42M
}
frame.c:Py_DECREF
Line
Count
Source
418
6.51M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
6.51M
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
6.51M
    _Py_DECREF_STAT_INC();
426
6.51M
    if (--op->ob_refcnt == 0) {
427
3.13M
        _Py_Dealloc(op);
428
3.13M
    }
429
6.51M
}
Unexecuted instantiation: future.c:Py_DECREF
gc.c:Py_DECREF
Line
Count
Source
418
117k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
117k
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
117k
    _Py_DECREF_STAT_INC();
426
117k
    if (--op->ob_refcnt == 0) {
427
78.3k
        _Py_Dealloc(op);
428
78.3k
    }
429
117k
}
Unexecuted instantiation: gc_gil.c:Py_DECREF
getargs.c:Py_DECREF
Line
Count
Source
418
1.45M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.45M
    if (_Py_IsImmortal(op)) {
422
1.37M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.37M
        return;
424
1.37M
    }
425
80.7k
    _Py_DECREF_STAT_INC();
426
80.7k
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
80.7k
}
Unexecuted instantiation: ceval_gil.c:Py_DECREF
Unexecuted instantiation: hamt.c:Py_DECREF
Unexecuted instantiation: hashtable.c:Py_DECREF
import.c:Py_DECREF
Line
Count
Source
418
20.7M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
20.7M
    if (_Py_IsImmortal(op)) {
422
2.29M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
2.29M
        return;
424
2.29M
    }
425
18.4M
    _Py_DECREF_STAT_INC();
426
18.4M
    if (--op->ob_refcnt == 0) {
427
511k
        _Py_Dealloc(op);
428
511k
    }
429
18.4M
}
importdl.c:Py_DECREF
Line
Count
Source
418
764
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
764
    if (_Py_IsImmortal(op)) {
422
323
        _Py_DECREF_IMMORTAL_STAT_INC();
423
323
        return;
424
323
    }
425
441
    _Py_DECREF_STAT_INC();
426
441
    if (--op->ob_refcnt == 0) {
427
342
        _Py_Dealloc(op);
428
342
    }
429
441
}
initconfig.c:Py_DECREF
Line
Count
Source
418
2.98k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
2.98k
    if (_Py_IsImmortal(op)) {
422
2.41k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
2.41k
        return;
424
2.41k
    }
425
567
    _Py_DECREF_STAT_INC();
426
567
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
567
}
instrumentation.c:Py_DECREF
Line
Count
Source
418
504
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
504
    if (_Py_IsImmortal(op)) {
422
315
        _Py_DECREF_IMMORTAL_STAT_INC();
423
315
        return;
424
315
    }
425
189
    _Py_DECREF_STAT_INC();
426
189
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
189
}
instruction_sequence.c:Py_DECREF
Line
Count
Source
418
599
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
599
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
599
    _Py_DECREF_STAT_INC();
426
599
    if (--op->ob_refcnt == 0) {
427
599
        _Py_Dealloc(op);
428
599
    }
429
599
}
intrinsics.c:Py_DECREF
Line
Count
Source
418
29.7k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
29.7k
    if (_Py_IsImmortal(op)) {
422
15.7k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
15.7k
        return;
424
15.7k
    }
425
14.0k
    _Py_DECREF_STAT_INC();
426
14.0k
    if (--op->ob_refcnt == 0) {
427
100
        _Py_Dealloc(op);
428
100
    }
429
14.0k
}
Unexecuted instantiation: legacy_tracing.c:Py_DECREF
Unexecuted instantiation: lock.c:Py_DECREF
marshal.c:Py_DECREF
Line
Count
Source
418
234k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
234k
    if (_Py_IsImmortal(op)) {
422
96.6k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
96.6k
        return;
424
96.6k
    }
425
137k
    _Py_DECREF_STAT_INC();
426
137k
    if (--op->ob_refcnt == 0) {
427
558
        _Py_Dealloc(op);
428
558
    }
429
137k
}
modsupport.c:Py_DECREF
Line
Count
Source
418
7.78k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
7.78k
    if (_Py_IsImmortal(op)) {
422
5.01k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
5.01k
        return;
424
5.01k
    }
425
2.76k
    _Py_DECREF_STAT_INC();
426
2.76k
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
2.76k
}
Unexecuted instantiation: mysnprintf.c:Py_DECREF
Unexecuted instantiation: parking_lot.c:Py_DECREF
Unexecuted instantiation: preconfig.c:Py_DECREF
pyarena.c:Py_DECREF
Line
Count
Source
418
7.73M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
7.73M
    if (_Py_IsImmortal(op)) {
422
4.82M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
4.82M
        return;
424
4.82M
    }
425
2.90M
    _Py_DECREF_STAT_INC();
426
2.90M
    if (--op->ob_refcnt == 0) {
427
24.5k
        _Py_Dealloc(op);
428
24.5k
    }
429
2.90M
}
Unexecuted instantiation: pyctype.c:Py_DECREF
Unexecuted instantiation: pyhash.c:Py_DECREF
pylifecycle.c:Py_DECREF
Line
Count
Source
418
756
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
756
    if (_Py_IsImmortal(op)) {
422
147
        _Py_DECREF_IMMORTAL_STAT_INC();
423
147
        return;
424
147
    }
425
609
    _Py_DECREF_STAT_INC();
426
609
    if (--op->ob_refcnt == 0) {
427
63
        _Py_Dealloc(op);
428
63
    }
429
609
}
Unexecuted instantiation: pystate.c:Py_DECREF
pythonrun.c:Py_DECREF
Line
Count
Source
418
24.5k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
24.5k
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
24.5k
    _Py_DECREF_STAT_INC();
426
24.5k
    if (--op->ob_refcnt == 0) {
427
2.27k
        _Py_Dealloc(op);
428
2.27k
    }
429
24.5k
}
Unexecuted instantiation: pytime.c:Py_DECREF
Unexecuted instantiation: qsbr.c:Py_DECREF
Unexecuted instantiation: bootstrap_hash.c:Py_DECREF
specialize.c:Py_DECREF
Line
Count
Source
418
13.4k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
13.4k
    if (_Py_IsImmortal(op)) {
422
133
        _Py_DECREF_IMMORTAL_STAT_INC();
423
133
        return;
424
133
    }
425
13.3k
    _Py_DECREF_STAT_INC();
426
13.3k
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
13.3k
}
Unexecuted instantiation: slots.c:Py_DECREF
Unexecuted instantiation: slots_generated.c:Py_DECREF
structmember.c:Py_DECREF
Line
Count
Source
418
264
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
264
    if (_Py_IsImmortal(op)) {
422
240
        _Py_DECREF_IMMORTAL_STAT_INC();
423
240
        return;
424
240
    }
425
24
    _Py_DECREF_STAT_INC();
426
24
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
24
}
symtable.c:Py_DECREF
Line
Count
Source
418
3.76M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
3.76M
    if (_Py_IsImmortal(op)) {
422
1.68M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.68M
        return;
424
1.68M
    }
425
2.07M
    _Py_DECREF_STAT_INC();
426
2.07M
    if (--op->ob_refcnt == 0) {
427
1.00M
        _Py_Dealloc(op);
428
1.00M
    }
429
2.07M
}
sysmodule.c:Py_DECREF
Line
Count
Source
418
3.14k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
3.14k
    if (_Py_IsImmortal(op)) {
422
1.05k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.05k
        return;
424
1.05k
    }
425
2.09k
    _Py_DECREF_STAT_INC();
426
2.09k
    if (--op->ob_refcnt == 0) {
427
1.06k
        _Py_Dealloc(op);
428
1.06k
    }
429
2.09k
}
Unexecuted instantiation: thread.c:Py_DECREF
traceback.c:Py_DECREF
Line
Count
Source
418
7.68M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
7.68M
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
7.68M
    _Py_DECREF_STAT_INC();
426
7.68M
    if (--op->ob_refcnt == 0) {
427
3.73M
        _Py_Dealloc(op);
428
3.73M
    }
429
7.68M
}
Unexecuted instantiation: tracemalloc.c:Py_DECREF
typecache.c:Py_DECREF
Line
Count
Source
418
42.8k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
42.8k
    if (_Py_IsImmortal(op)) {
422
24.4k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
24.4k
        return;
424
24.4k
    }
425
18.3k
    _Py_DECREF_STAT_INC();
426
18.3k
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
18.3k
}
Unexecuted instantiation: getopt.c:Py_DECREF
Unexecuted instantiation: pystrcmp.c:Py_DECREF
Unexecuted instantiation: pystrtod.c:Py_DECREF
Unexecuted instantiation: dtoa.c:Py_DECREF
fileutils.c:Py_DECREF
Line
Count
Source
418
5.70k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
5.70k
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
5.70k
    _Py_DECREF_STAT_INC();
426
5.70k
    if (--op->ob_refcnt == 0) {
427
5.70k
        _Py_Dealloc(op);
428
5.70k
    }
429
5.70k
}
Unexecuted instantiation: suggestions.c:Py_DECREF
Unexecuted instantiation: perf_trampoline.c:Py_DECREF
Unexecuted instantiation: perf_jit_trampoline.c:Py_DECREF
Unexecuted instantiation: jit_unwind.c:Py_DECREF
Unexecuted instantiation: remote_debugging.c:Py_DECREF
Unexecuted instantiation: dynload_shlib.c:Py_DECREF
Unexecuted instantiation: config.c:Py_DECREF
Unexecuted instantiation: gcmodule.c:Py_DECREF
Unexecuted instantiation: _asynciomodule.c:Py_DECREF
Unexecuted instantiation: atexitmodule.c:Py_DECREF
Unexecuted instantiation: faulthandler.c:Py_DECREF
posixmodule.c:Py_DECREF
Line
Count
Source
418
14.9k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
14.9k
    if (_Py_IsImmortal(op)) {
422
3.55k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
3.55k
        return;
424
3.55k
    }
425
11.4k
    _Py_DECREF_STAT_INC();
426
11.4k
    if (--op->ob_refcnt == 0) {
427
1.43k
        _Py_Dealloc(op);
428
1.43k
    }
429
11.4k
}
Unexecuted instantiation: signalmodule.c:Py_DECREF
Unexecuted instantiation: _tracemalloc.c:Py_DECREF
Unexecuted instantiation: _suggestions.c:Py_DECREF
_datetimemodule.c:Py_DECREF
Line
Count
Source
418
336
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
336
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
336
    _Py_DECREF_STAT_INC();
426
336
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
336
}
Unexecuted instantiation: _codecsmodule.c:Py_DECREF
_collectionsmodule.c:Py_DECREF
Line
Count
Source
418
55
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
55
    if (_Py_IsImmortal(op)) {
422
55
        _Py_DECREF_IMMORTAL_STAT_INC();
423
55
        return;
424
55
    }
425
0
    _Py_DECREF_STAT_INC();
426
0
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
0
}
_iomodule.c:Py_DECREF
Line
Count
Source
418
1.60k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.60k
    if (_Py_IsImmortal(op)) {
422
627
        _Py_DECREF_IMMORTAL_STAT_INC();
423
627
        return;
424
627
    }
425
978
    _Py_DECREF_STAT_INC();
426
978
    if (--op->ob_refcnt == 0) {
427
520
        _Py_Dealloc(op);
428
520
    }
429
978
}
iobase.c:Py_DECREF
Line
Count
Source
418
863
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
863
    if (_Py_IsImmortal(op)) {
422
863
        _Py_DECREF_IMMORTAL_STAT_INC();
423
863
        return;
424
863
    }
425
0
    _Py_DECREF_STAT_INC();
426
0
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
0
}
fileio.c:Py_DECREF
Line
Count
Source
418
591
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
591
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
591
    _Py_DECREF_STAT_INC();
426
591
    if (--op->ob_refcnt == 0) {
427
394
        _Py_Dealloc(op);
428
394
    }
429
591
}
Unexecuted instantiation: bytesio.c:Py_DECREF
bufferedio.c:Py_DECREF
Line
Count
Source
418
1.04M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.04M
    if (_Py_IsImmortal(op)) {
422
697k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
697k
        return;
424
697k
    }
425
349k
    _Py_DECREF_STAT_INC();
426
349k
    if (--op->ob_refcnt == 0) {
427
348k
        _Py_Dealloc(op);
428
348k
    }
429
349k
}
textio.c:Py_DECREF
Line
Count
Source
418
1.39M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.39M
    if (_Py_IsImmortal(op)) {
422
348k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
348k
        return;
424
348k
    }
425
1.04M
    _Py_DECREF_STAT_INC();
426
1.04M
    if (--op->ob_refcnt == 0) {
427
348k
        _Py_Dealloc(op);
428
348k
    }
429
1.04M
}
Unexecuted instantiation: stringio.c:Py_DECREF
itertoolsmodule.c:Py_DECREF
Line
Count
Source
418
1.38k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.38k
    if (_Py_IsImmortal(op)) {
422
261
        _Py_DECREF_IMMORTAL_STAT_INC();
423
261
        return;
424
261
    }
425
1.12k
    _Py_DECREF_STAT_INC();
426
1.12k
    if (--op->ob_refcnt == 0) {
427
342
        _Py_Dealloc(op);
428
342
    }
429
1.12k
}
sre.c:Py_DECREF
Line
Count
Source
418
55.5k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
55.5k
    if (_Py_IsImmortal(op)) {
422
11.9k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
11.9k
        return;
424
11.9k
    }
425
43.5k
    _Py_DECREF_STAT_INC();
426
43.5k
    if (--op->ob_refcnt == 0) {
427
42
        _Py_Dealloc(op);
428
42
    }
429
43.5k
}
Unexecuted instantiation: _sysconfig.c:Py_DECREF
_threadmodule.c:Py_DECREF
Line
Count
Source
418
1.96k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.96k
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
1.96k
    _Py_DECREF_STAT_INC();
426
1.96k
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
1.96k
}
Unexecuted instantiation: timemodule.c:Py_DECREF
Unexecuted instantiation: _typesmodule.c:Py_DECREF
Unexecuted instantiation: _typingmodule.c:Py_DECREF
Unexecuted instantiation: _weakref.c:Py_DECREF
_abc.c:Py_DECREF
Line
Count
Source
418
29.5k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
29.5k
    if (_Py_IsImmortal(op)) {
422
9.94k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
9.94k
        return;
424
9.94k
    }
425
19.6k
    _Py_DECREF_STAT_INC();
426
19.6k
    if (--op->ob_refcnt == 0) {
427
2.68k
        _Py_Dealloc(op);
428
2.68k
    }
429
19.6k
}
_functoolsmodule.c:Py_DECREF
Line
Count
Source
418
44
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
44
    if (_Py_IsImmortal(op)) {
422
8
        _Py_DECREF_IMMORTAL_STAT_INC();
423
8
        return;
424
8
    }
425
36
    _Py_DECREF_STAT_INC();
426
36
    if (--op->ob_refcnt == 0) {
427
8
        _Py_Dealloc(op);
428
8
    }
429
36
}
Unexecuted instantiation: _localemodule.c:Py_DECREF
Unexecuted instantiation: _opcode.c:Py_DECREF
Unexecuted instantiation: _operator.c:Py_DECREF
Unexecuted instantiation: symtablemodule.c:Py_DECREF
Unexecuted instantiation: pwdmodule.c:Py_DECREF
getpath.c:Py_DECREF
Line
Count
Source
418
672
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
672
    if (_Py_IsImmortal(op)) {
422
252
        _Py_DECREF_IMMORTAL_STAT_INC();
423
252
        return;
424
252
    }
425
420
    _Py_DECREF_STAT_INC();
426
420
    if (--op->ob_refcnt == 0) {
427
21
        _Py_Dealloc(op);
428
21
    }
429
420
}
Unexecuted instantiation: frozen.c:Py_DECREF
Unexecuted instantiation: getbuildinfo.c:Py_DECREF
Unexecuted instantiation: peg_api.c:Py_DECREF
Unexecuted instantiation: file_tokenizer.c:Py_DECREF
helpers.c:Py_DECREF
Line
Count
Source
418
57.4k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
57.4k
    if (_Py_IsImmortal(op)) {
422
1.99k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.99k
        return;
424
1.99k
    }
425
55.5k
    _Py_DECREF_STAT_INC();
426
55.5k
    if (--op->ob_refcnt == 0) {
427
43.9k
        _Py_Dealloc(op);
428
43.9k
    }
429
55.5k
}
Unexecuted instantiation: myreadline.c:Py_DECREF
abstract.c:Py_DECREF
Line
Count
Source
418
65.0M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
65.0M
    if (_Py_IsImmortal(op)) {
422
61.0M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
61.0M
        return;
424
61.0M
    }
425
4.01M
    _Py_DECREF_STAT_INC();
426
4.01M
    if (--op->ob_refcnt == 0) {
427
395k
        _Py_Dealloc(op);
428
395k
    }
429
4.01M
}
Unexecuted instantiation: boolobject.c:Py_DECREF
Unexecuted instantiation: bytes_methods.c:Py_DECREF
bytearrayobject.c:Py_DECREF
Line
Count
Source
418
992k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
992k
    if (_Py_IsImmortal(op)) {
422
238k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
238k
        return;
424
238k
    }
425
754k
    _Py_DECREF_STAT_INC();
426
754k
    if (--op->ob_refcnt == 0) {
427
754k
        _Py_Dealloc(op);
428
754k
    }
429
754k
}
bytesobject.c:Py_DECREF
Line
Count
Source
418
599k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
599k
    if (_Py_IsImmortal(op)) {
422
495k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
495k
        return;
424
495k
    }
425
104k
    _Py_DECREF_STAT_INC();
426
104k
    if (--op->ob_refcnt == 0) {
427
51.4k
        _Py_Dealloc(op);
428
51.4k
    }
429
104k
}
call.c:Py_DECREF
Line
Count
Source
418
3.18M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
3.18M
    if (_Py_IsImmortal(op)) {
422
1.06M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.06M
        return;
424
1.06M
    }
425
2.11M
    _Py_DECREF_STAT_INC();
426
2.11M
    if (--op->ob_refcnt == 0) {
427
737k
        _Py_Dealloc(op);
428
737k
    }
429
2.11M
}
capsule.c:Py_DECREF
Line
Count
Source
418
4
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
4
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
4
    _Py_DECREF_STAT_INC();
426
4
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
4
}
cellobject.c:Py_DECREF
Line
Count
Source
418
3.45M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
3.45M
    if (_Py_IsImmortal(op)) {
422
53
        _Py_DECREF_IMMORTAL_STAT_INC();
423
53
        return;
424
53
    }
425
3.45M
    _Py_DECREF_STAT_INC();
426
3.45M
    if (--op->ob_refcnt == 0) {
427
3.43M
        _Py_Dealloc(op);
428
3.43M
    }
429
3.45M
}
classobject.c:Py_DECREF
Line
Count
Source
418
25.4M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
25.4M
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
25.4M
    _Py_DECREF_STAT_INC();
426
25.4M
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
25.4M
}
codeobject.c:Py_DECREF
Line
Count
Source
418
1.11M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.11M
    if (_Py_IsImmortal(op)) {
422
455k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
455k
        return;
424
455k
    }
425
654k
    _Py_DECREF_STAT_INC();
426
654k
    if (--op->ob_refcnt == 0) {
427
167k
        _Py_Dealloc(op);
428
167k
    }
429
654k
}
complexobject.c:Py_DECREF
Line
Count
Source
418
41
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
41
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
41
    _Py_DECREF_STAT_INC();
426
41
    if (--op->ob_refcnt == 0) {
427
41
        _Py_Dealloc(op);
428
41
    }
429
41
}
descrobject.c:Py_DECREF
Line
Count
Source
418
17.6k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
17.6k
    if (_Py_IsImmortal(op)) {
422
1.30k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.30k
        return;
424
1.30k
    }
425
16.3k
    _Py_DECREF_STAT_INC();
426
16.3k
    if (--op->ob_refcnt == 0) {
427
2.54k
        _Py_Dealloc(op);
428
2.54k
    }
429
16.3k
}
enumobject.c:Py_DECREF
Line
Count
Source
418
19.2M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
19.2M
    if (_Py_IsImmortal(op)) {
422
6.24M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
6.24M
        return;
424
6.24M
    }
425
13.0M
    _Py_DECREF_STAT_INC();
426
13.0M
    if (--op->ob_refcnt == 0) {
427
6.46M
        _Py_Dealloc(op);
428
6.46M
    }
429
13.0M
}
genobject.c:Py_DECREF
Line
Count
Source
418
10.8M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
10.8M
    if (_Py_IsImmortal(op)) {
422
10.8M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
10.8M
        return;
424
10.8M
    }
425
25.8k
    _Py_DECREF_STAT_INC();
426
25.8k
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
25.8k
}
fileobject.c:Py_DECREF
Line
Count
Source
418
349k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
349k
    if (_Py_IsImmortal(op)) {
422
348k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
348k
        return;
424
348k
    }
425
194
    _Py_DECREF_STAT_INC();
426
194
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
194
}
floatobject.c:Py_DECREF
Line
Count
Source
418
73
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
73
    if (_Py_IsImmortal(op)) {
422
3
        _Py_DECREF_IMMORTAL_STAT_INC();
423
3
        return;
424
3
    }
425
70
    _Py_DECREF_STAT_INC();
426
70
    if (--op->ob_refcnt == 0) {
427
69
        _Py_Dealloc(op);
428
69
    }
429
70
}
frameobject.c:Py_DECREF
Line
Count
Source
418
3.33M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
3.33M
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
3.33M
    _Py_DECREF_STAT_INC();
426
3.33M
    if (--op->ob_refcnt == 0) {
427
30.7k
        _Py_Dealloc(op);
428
30.7k
    }
429
3.33M
}
funcobject.c:Py_DECREF
Line
Count
Source
418
11.7M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
11.7M
    if (_Py_IsImmortal(op)) {
422
5.87M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
5.87M
        return;
424
5.87M
    }
425
5.84M
    _Py_DECREF_STAT_INC();
426
5.84M
    if (--op->ob_refcnt == 0) {
427
1.14M
        _Py_Dealloc(op);
428
1.14M
    }
429
5.84M
}
interpolationobject.c:Py_DECREF
Line
Count
Source
418
21
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
21
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
21
    _Py_DECREF_STAT_INC();
426
21
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
21
}
iterobject.c:Py_DECREF
Line
Count
Source
418
2.93M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
2.93M
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
2.93M
    _Py_DECREF_STAT_INC();
426
2.93M
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
2.93M
}
lazyimportobject.c:Py_DECREF
Line
Count
Source
418
48
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
48
    if (_Py_IsImmortal(op)) {
422
12
        _Py_DECREF_IMMORTAL_STAT_INC();
423
12
        return;
424
12
    }
425
36
    _Py_DECREF_STAT_INC();
426
36
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
36
}
Unexecuted instantiation: odictobject.c:Py_DECREF
memoryobject.c:Py_DECREF
Line
Count
Source
418
748k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
748k
    if (_Py_IsImmortal(op)) {
422
2
        _Py_DECREF_IMMORTAL_STAT_INC();
423
2
        return;
424
2
    }
425
748k
    _Py_DECREF_STAT_INC();
426
748k
    if (--op->ob_refcnt == 0) {
427
373k
        _Py_Dealloc(op);
428
373k
    }
429
748k
}
methodobject.c:Py_DECREF
Line
Count
Source
418
9.33M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
9.33M
    if (_Py_IsImmortal(op)) {
422
1.29M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.29M
        return;
424
1.29M
    }
425
8.04M
    _Py_DECREF_STAT_INC();
426
8.04M
    if (--op->ob_refcnt == 0) {
427
327k
        _Py_Dealloc(op);
428
327k
    }
429
8.04M
}
namespaceobject.c:Py_DECREF
Line
Count
Source
418
21
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
21
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
21
    _Py_DECREF_STAT_INC();
426
21
    if (--op->ob_refcnt == 0) {
427
21
        _Py_Dealloc(op);
428
21
    }
429
21
}
unicode_format.c:Py_DECREF
Line
Count
Source
418
1.49M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.49M
    if (_Py_IsImmortal(op)) {
422
102k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
102k
        return;
424
102k
    }
425
1.38M
    _Py_DECREF_STAT_INC();
426
1.38M
    if (--op->ob_refcnt == 0) {
427
383
        _Py_Dealloc(op);
428
383
    }
429
1.38M
}
Unexecuted instantiation: _contextvars.c:Py_DECREF
Python-ast.c:Py_DECREF
Line
Count
Source
418
3.38M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
3.38M
    if (_Py_IsImmortal(op)) {
422
1.61M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.61M
        return;
424
1.61M
    }
425
1.76M
    _Py_DECREF_STAT_INC();
426
1.76M
    if (--op->ob_refcnt == 0) {
427
414k
        _Py_Dealloc(op);
428
414k
    }
429
1.76M
}
Unexecuted instantiation: Python-tokenize.c:Py_DECREF
Unexecuted instantiation: asdl.c:Py_DECREF
assemble.c:Py_DECREF
Line
Count
Source
418
369k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
369k
    if (_Py_IsImmortal(op)) {
422
100k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
100k
        return;
424
100k
    }
425
268k
    _Py_DECREF_STAT_INC();
426
268k
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
268k
}
Unexecuted instantiation: ast.c:Py_DECREF
ast_preprocess.c:Py_DECREF
Line
Count
Source
418
4.05k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
4.05k
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
4.05k
    _Py_DECREF_STAT_INC();
426
4.05k
    if (--op->ob_refcnt == 0) {
427
3.61k
        _Py_Dealloc(op);
428
3.61k
    }
429
4.05k
}
ast_unparse.c:Py_DECREF
Line
Count
Source
418
159k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
159k
    if (_Py_IsImmortal(op)) {
422
12.1k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
12.1k
        return;
424
12.1k
    }
425
147k
    _Py_DECREF_STAT_INC();
426
147k
    if (--op->ob_refcnt == 0) {
427
117k
        _Py_Dealloc(op);
428
117k
    }
429
147k
}
Unexecuted instantiation: critical_section.c:Py_DECREF
Unexecuted instantiation: crossinterp.c:Py_DECREF
Unexecuted instantiation: getcopyright.c:Py_DECREF
Unexecuted instantiation: getplatform.c:Py_DECREF
Unexecuted instantiation: getversion.c:Py_DECREF
Unexecuted instantiation: optimizer.c:Py_DECREF
Unexecuted instantiation: pathconfig.c:Py_DECREF
Unexecuted instantiation: pymath.c:Py_DECREF
Unexecuted instantiation: pystrhex.c:Py_DECREF
pegen.c:Py_DECREF
Line
Count
Source
418
46.7k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
46.7k
    if (_Py_IsImmortal(op)) {
422
15.6k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
15.6k
        return;
424
15.6k
    }
425
31.0k
    _Py_DECREF_STAT_INC();
426
31.0k
    if (--op->ob_refcnt == 0) {
427
15.2k
        _Py_Dealloc(op);
428
15.2k
    }
429
31.0k
}
pegen_errors.c:Py_DECREF
Line
Count
Source
418
31.9k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
31.9k
    if (_Py_IsImmortal(op)) {
422
2.35k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
2.35k
        return;
424
2.35k
    }
425
29.6k
    _Py_DECREF_STAT_INC();
426
29.6k
    if (--op->ob_refcnt == 0) {
427
3.21k
        _Py_Dealloc(op);
428
3.21k
    }
429
29.6k
}
Unexecuted instantiation: parser.c:Py_DECREF
Unexecuted instantiation: buffer.c:Py_DECREF
lexer.c:Py_DECREF
Line
Count
Source
418
96.6k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
96.6k
    if (_Py_IsImmortal(op)) {
422
1.88k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.88k
        return;
424
1.88k
    }
425
94.7k
    _Py_DECREF_STAT_INC();
426
94.7k
    if (--op->ob_refcnt == 0) {
427
94.7k
        _Py_Dealloc(op);
428
94.7k
    }
429
94.7k
}
Unexecuted instantiation: number.c:Py_DECREF
state.c:Py_DECREF
Line
Count
Source
418
22.7k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
22.7k
    if (_Py_IsImmortal(op)) {
422
34
        _Py_DECREF_IMMORTAL_STAT_INC();
423
34
        return;
424
34
    }
425
22.7k
    _Py_DECREF_STAT_INC();
426
22.7k
    if (--op->ob_refcnt == 0) {
427
82
        _Py_Dealloc(op);
428
82
    }
429
22.7k
}
Unexecuted instantiation: string.c:Py_DECREF
Unexecuted instantiation: readline_tokenizer.c:Py_DECREF
string_tokenizer.c:Py_DECREF
Line
Count
Source
418
3.15k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
3.15k
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
3.15k
    _Py_DECREF_STAT_INC();
426
3.15k
    if (--op->ob_refcnt == 0) {
427
3.15k
        _Py_Dealloc(op);
428
3.15k
    }
429
3.15k
}
Unexecuted instantiation: utf8_tokenizer.c:Py_DECREF
Unexecuted instantiation: getcompiler.c:Py_DECREF
Unexecuted instantiation: mystrtoul.c:Py_DECREF
Unexecuted instantiation: token.c:Py_DECREF
Unexecuted instantiation: action_helpers.c:Py_DECREF
string_parser.c:Py_DECREF
Line
Count
Source
418
353k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
353k
    if (_Py_IsImmortal(op)) {
422
236k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
236k
        return;
424
236k
    }
425
117k
    _Py_DECREF_STAT_INC();
426
117k
    if (--op->ob_refcnt == 0) {
427
117k
        _Py_Dealloc(op);
428
117k
    }
429
117k
}
430
2.07G
#define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op))
431
#endif
432
433
434
/* Safely decref `op` and set `op` to NULL, especially useful in tp_clear
435
 * and tp_dealloc implementations.
436
 *
437
 * Note that "the obvious" code can be deadly:
438
 *
439
 *     Py_XDECREF(op);
440
 *     op = NULL;
441
 *
442
 * Typically, `op` is something like self->containee, and `self` is done
443
 * using its `containee` member.  In the code sequence above, suppose
444
 * `containee` is non-NULL with a refcount of 1.  Its refcount falls to
445
 * 0 on the first line, which can trigger an arbitrary amount of code,
446
 * possibly including finalizers (like __del__ methods or weakref callbacks)
447
 * coded in Python, which in turn can release the GIL and allow other threads
448
 * to run, etc.  Such code may even invoke methods of `self` again, or cause
449
 * cyclic gc to trigger, but-- oops! --self->containee still points to the
450
 * object being torn down, and it may be in an insane state while being torn
451
 * down.  This has in fact been a rich historic source of miserable (rare &
452
 * hard-to-diagnose) segfaulting (and other) bugs.
453
 *
454
 * The safe way is:
455
 *
456
 *      Py_CLEAR(op);
457
 *
458
 * That arranges to set `op` to NULL _before_ decref'ing, so that any code
459
 * triggered as a side-effect of `op` getting torn down no longer believes
460
 * `op` points to a valid object.
461
 *
462
 * There are cases where it's safe to use the naive code, but they're brittle.
463
 * For example, if `op` points to a Python integer, you know that destroying
464
 * one of those can't cause problems -- but in part that relies on that
465
 * Python integers aren't currently weakly referencable.  Best practice is
466
 * to use Py_CLEAR() even if you can't think of a reason for why you need to.
467
 *
468
 * gh-98724: Use a temporary variable to only evaluate the macro argument once,
469
 * to avoid the duplication of side effects if the argument has side effects.
470
 *
471
 * gh-99701: If the PyObject* type is used with casting arguments to PyObject*,
472
 * the code can be miscompiled with strict aliasing because of type punning.
473
 * With strict aliasing, a compiler considers that two pointers of different
474
 * types cannot read or write the same memory which enables optimization
475
 * opportunities.
476
 *
477
 * If available, use _Py_TYPEOF() to use the 'op' type for temporary variables,
478
 * and so avoid type punning. Otherwise, use memcpy() which causes type erasure
479
 * and so prevents the compiler to reuse an old cached 'op' value after
480
 * Py_CLEAR().
481
 */
482
#ifdef _Py_TYPEOF
483
#define Py_CLEAR(op) \
484
296M
    do { \
485
296M
        _Py_TYPEOF(op)* _tmp_op_ptr = &(op); \
486
296M
        _Py_TYPEOF(op) _tmp_old_op = (*_tmp_op_ptr); \
487
296M
        if (_tmp_old_op != NULL) { \
488
59.9M
            *_tmp_op_ptr = _Py_NULL; \
489
59.9M
            Py_DECREF(_tmp_old_op); \
490
59.9M
        } \
491
296M
    } while (0)
492
#else
493
#define Py_CLEAR(op) \
494
    do { \
495
        PyObject **_tmp_op_ptr = _Py_CAST(PyObject**, &(op)); \
496
        PyObject *_tmp_old_op = (*_tmp_op_ptr); \
497
        if (_tmp_old_op != NULL) { \
498
            PyObject *_null_ptr = _Py_NULL; \
499
            memcpy(_tmp_op_ptr, &_null_ptr, sizeof(PyObject*)); \
500
            Py_DECREF(_tmp_old_op); \
501
        } \
502
    } while (0)
503
#endif
504
505
506
/* Function to use in case the object pointer can be NULL: */
507
static inline void Py_XINCREF(PyObject *op)
508
274M
{
509
274M
    if (op != _Py_NULL) {
510
226M
        Py_INCREF(op);
511
226M
    }
512
274M
}
exceptions.c:Py_XINCREF
Line
Count
Source
508
6.64M
{
509
6.64M
    if (op != _Py_NULL) {
510
440k
        Py_INCREF(op);
511
440k
    }
512
6.64M
}
Unexecuted instantiation: genericaliasobject.c:Py_XINCREF
listobject.c:Py_XINCREF
Line
Count
Source
508
7.47M
{
509
7.47M
    if (op != _Py_NULL) {
510
7.47M
        Py_INCREF(op);
511
7.47M
    }
512
7.47M
}
Unexecuted instantiation: longobject.c:Py_XINCREF
dictobject.c:Py_XINCREF
Line
Count
Source
508
9.37M
{
509
9.37M
    if (op != _Py_NULL) {
510
7.28M
        Py_INCREF(op);
511
7.28M
    }
512
9.37M
}
Unexecuted instantiation: moduleobject.c:Py_XINCREF
Unexecuted instantiation: object.c:Py_XINCREF
Unexecuted instantiation: obmalloc.c:Py_XINCREF
Unexecuted instantiation: picklebufobject.c:Py_XINCREF
Unexecuted instantiation: rangeobject.c:Py_XINCREF
sentinelobject.c:Py_XINCREF
Line
Count
Source
508
6
{
509
6
    if (op != _Py_NULL) {
510
0
        Py_INCREF(op);
511
0
    }
512
6
}
Unexecuted instantiation: setobject.c:Py_XINCREF
Unexecuted instantiation: sliceobject.c:Py_XINCREF
Unexecuted instantiation: structseq.c:Py_XINCREF
Unexecuted instantiation: templateobject.c:Py_XINCREF
Unexecuted instantiation: tupleobject.c:Py_XINCREF
typeobject.c:Py_XINCREF
Line
Count
Source
508
12.7k
{
509
12.7k
    if (op != _Py_NULL) {
510
4.01k
        Py_INCREF(op);
511
4.01k
    }
512
12.7k
}
Unexecuted instantiation: typevarobject.c:Py_XINCREF
Unexecuted instantiation: unicode_formatter.c:Py_XINCREF
Unexecuted instantiation: unicode_writer.c:Py_XINCREF
Unexecuted instantiation: unicodectype.c:Py_XINCREF
Unexecuted instantiation: unicodeobject.c:Py_XINCREF
Unexecuted instantiation: unionobject.c:Py_XINCREF
weakrefobject.c:Py_XINCREF
Line
Count
Source
508
12.6k
{
509
12.6k
    if (op != _Py_NULL) {
510
3.47k
        Py_INCREF(op);
511
3.47k
    }
512
12.6k
}
Unexecuted instantiation: _warnings.c:Py_XINCREF
bltinmodule.c:Py_XINCREF
Line
Count
Source
508
180
{
509
180
    if (op != _Py_NULL) {
510
180
        Py_INCREF(op);
511
180
    }
512
180
}
ceval.c:Py_XINCREF
Line
Count
Source
508
35.6M
{
509
35.6M
    if (op != _Py_NULL) {
510
13.0M
        Py_INCREF(op);
511
13.0M
    }
512
35.6M
}
Unexecuted instantiation: codecs.c:Py_XINCREF
Unexecuted instantiation: codegen.c:Py_XINCREF
compile.c:Py_XINCREF
Line
Count
Source
508
102k
{
509
102k
    if (op != _Py_NULL) {
510
37.0k
        Py_INCREF(op);
511
37.0k
    }
512
102k
}
context.c:Py_XINCREF
Line
Count
Source
508
357k
{
509
357k
    if (op != _Py_NULL) {
510
0
        Py_INCREF(op);
511
0
    }
512
357k
}
errors.c:Py_XINCREF
Line
Count
Source
508
3.13M
{
509
3.13M
    if (op != _Py_NULL) {
510
3.10M
        Py_INCREF(op);
511
3.10M
    }
512
3.13M
}
Unexecuted instantiation: flowgraph.c:Py_XINCREF
Unexecuted instantiation: frame.c:Py_XINCREF
Unexecuted instantiation: future.c:Py_XINCREF
Unexecuted instantiation: gc.c:Py_XINCREF
Unexecuted instantiation: gc_gil.c:Py_XINCREF
Unexecuted instantiation: getargs.c:Py_XINCREF
Unexecuted instantiation: ceval_gil.c:Py_XINCREF
Unexecuted instantiation: hamt.c:Py_XINCREF
Unexecuted instantiation: hashtable.c:Py_XINCREF
import.c:Py_XINCREF
Line
Count
Source
508
656
{
509
656
    if (op != _Py_NULL) {
510
328
        Py_INCREF(op);
511
328
    }
512
656
}
Unexecuted instantiation: importdl.c:Py_XINCREF
Unexecuted instantiation: initconfig.c:Py_XINCREF
Unexecuted instantiation: instrumentation.c:Py_XINCREF
Unexecuted instantiation: instruction_sequence.c:Py_XINCREF
Unexecuted instantiation: intrinsics.c:Py_XINCREF
Unexecuted instantiation: legacy_tracing.c:Py_XINCREF
Unexecuted instantiation: lock.c:Py_XINCREF
Unexecuted instantiation: marshal.c:Py_XINCREF
Unexecuted instantiation: modsupport.c:Py_XINCREF
Unexecuted instantiation: mysnprintf.c:Py_XINCREF
Unexecuted instantiation: parking_lot.c:Py_XINCREF
Unexecuted instantiation: preconfig.c:Py_XINCREF
Unexecuted instantiation: pyarena.c:Py_XINCREF
Unexecuted instantiation: pyctype.c:Py_XINCREF
Unexecuted instantiation: pyhash.c:Py_XINCREF
Unexecuted instantiation: pylifecycle.c:Py_XINCREF
pystate.c:Py_XINCREF
Line
Count
Source
508
1.24M
{
509
1.24M
    if (op != _Py_NULL) {
510
1.24M
        Py_INCREF(op);
511
1.24M
    }
512
1.24M
}
Unexecuted instantiation: pythonrun.c:Py_XINCREF
Unexecuted instantiation: pytime.c:Py_XINCREF
Unexecuted instantiation: qsbr.c:Py_XINCREF
Unexecuted instantiation: bootstrap_hash.c:Py_XINCREF
Unexecuted instantiation: specialize.c:Py_XINCREF
Unexecuted instantiation: slots.c:Py_XINCREF
Unexecuted instantiation: slots_generated.c:Py_XINCREF
structmember.c:Py_XINCREF
Line
Count
Source
508
3.88k
{
509
3.88k
    if (op != _Py_NULL) {
510
3.88k
        Py_INCREF(op);
511
3.88k
    }
512
3.88k
}
Unexecuted instantiation: symtable.c:Py_XINCREF
sysmodule.c:Py_XINCREF
Line
Count
Source
508
21
{
509
21
    if (op != _Py_NULL) {
510
21
        Py_INCREF(op);
511
21
    }
512
21
}
Unexecuted instantiation: thread.c:Py_XINCREF
traceback.c:Py_XINCREF
Line
Count
Source
508
6.88M
{
509
6.88M
    if (op != _Py_NULL) {
510
3.84M
        Py_INCREF(op);
511
3.84M
    }
512
6.88M
}
Unexecuted instantiation: tracemalloc.c:Py_XINCREF
Unexecuted instantiation: typecache.c:Py_XINCREF
Unexecuted instantiation: getopt.c:Py_XINCREF
Unexecuted instantiation: pystrcmp.c:Py_XINCREF
Unexecuted instantiation: pystrtod.c:Py_XINCREF
Unexecuted instantiation: dtoa.c:Py_XINCREF
Unexecuted instantiation: fileutils.c:Py_XINCREF
Unexecuted instantiation: suggestions.c:Py_XINCREF
Unexecuted instantiation: perf_trampoline.c:Py_XINCREF
Unexecuted instantiation: perf_jit_trampoline.c:Py_XINCREF
Unexecuted instantiation: jit_unwind.c:Py_XINCREF
Unexecuted instantiation: remote_debugging.c:Py_XINCREF
Unexecuted instantiation: dynload_shlib.c:Py_XINCREF
Unexecuted instantiation: config.c:Py_XINCREF
Unexecuted instantiation: gcmodule.c:Py_XINCREF
Unexecuted instantiation: _asynciomodule.c:Py_XINCREF
Unexecuted instantiation: atexitmodule.c:Py_XINCREF
Unexecuted instantiation: faulthandler.c:Py_XINCREF
Unexecuted instantiation: posixmodule.c:Py_XINCREF
Unexecuted instantiation: signalmodule.c:Py_XINCREF
Unexecuted instantiation: _tracemalloc.c:Py_XINCREF
Unexecuted instantiation: _suggestions.c:Py_XINCREF
_datetimemodule.c:Py_XINCREF
Line
Count
Source
508
42
{
509
42
    if (op != _Py_NULL) {
510
0
        Py_INCREF(op);
511
0
    }
512
42
}
Unexecuted instantiation: _codecsmodule.c:Py_XINCREF
_collectionsmodule.c:Py_XINCREF
Line
Count
Source
508
4
{
509
4
    if (op != _Py_NULL) {
510
4
        Py_INCREF(op);
511
4
    }
512
4
}
Unexecuted instantiation: errnomodule.c:Py_XINCREF
Unexecuted instantiation: _iomodule.c:Py_XINCREF
Unexecuted instantiation: iobase.c:Py_XINCREF
Unexecuted instantiation: fileio.c:Py_XINCREF
Unexecuted instantiation: bytesio.c:Py_XINCREF
bufferedio.c:Py_XINCREF
Line
Count
Source
508
194
{
509
194
    if (op != _Py_NULL) {
510
194
        Py_INCREF(op);
511
194
    }
512
194
}
Unexecuted instantiation: textio.c:Py_XINCREF
Unexecuted instantiation: stringio.c:Py_XINCREF
Unexecuted instantiation: itertoolsmodule.c:Py_XINCREF
Unexecuted instantiation: sre.c:Py_XINCREF
Unexecuted instantiation: _sysconfig.c:Py_XINCREF
Unexecuted instantiation: _threadmodule.c:Py_XINCREF
Unexecuted instantiation: timemodule.c:Py_XINCREF
Unexecuted instantiation: _typesmodule.c:Py_XINCREF
Unexecuted instantiation: _typingmodule.c:Py_XINCREF
Unexecuted instantiation: _weakref.c:Py_XINCREF
_abc.c:Py_XINCREF
Line
Count
Source
508
804
{
509
804
    if (op != _Py_NULL) {
510
804
        Py_INCREF(op);
511
804
    }
512
804
}
Unexecuted instantiation: _functoolsmodule.c:Py_XINCREF
Unexecuted instantiation: _localemodule.c:Py_XINCREF
Unexecuted instantiation: _opcode.c:Py_XINCREF
Unexecuted instantiation: _operator.c:Py_XINCREF
Unexecuted instantiation: _stat.c:Py_XINCREF
Unexecuted instantiation: symtablemodule.c:Py_XINCREF
Unexecuted instantiation: pwdmodule.c:Py_XINCREF
getpath.c:Py_XINCREF
Line
Count
Source
508
84
{
509
84
    if (op != _Py_NULL) {
510
84
        Py_INCREF(op);
511
84
    }
512
84
}
Unexecuted instantiation: frozen.c:Py_XINCREF
Unexecuted instantiation: getbuildinfo.c:Py_XINCREF
Unexecuted instantiation: peg_api.c:Py_XINCREF
Unexecuted instantiation: file_tokenizer.c:Py_XINCREF
Unexecuted instantiation: helpers.c:Py_XINCREF
Unexecuted instantiation: myreadline.c:Py_XINCREF
abstract.c:Py_XINCREF
Line
Count
Source
508
1.07M
{
509
1.07M
    if (op != _Py_NULL) {
510
699k
        Py_INCREF(op);
511
699k
    }
512
1.07M
}
Unexecuted instantiation: boolobject.c:Py_XINCREF
Unexecuted instantiation: bytes_methods.c:Py_XINCREF
Unexecuted instantiation: bytearrayobject.c:Py_XINCREF
Unexecuted instantiation: bytesobject.c:Py_XINCREF
Unexecuted instantiation: call.c:Py_XINCREF
Unexecuted instantiation: capsule.c:Py_XINCREF
cellobject.c:Py_XINCREF
Line
Count
Source
508
3.45M
{
509
3.45M
    if (op != _Py_NULL) {
510
22.7k
        Py_INCREF(op);
511
22.7k
    }
512
3.45M
}
Unexecuted instantiation: classobject.c:Py_XINCREF
Unexecuted instantiation: codeobject.c:Py_XINCREF
Unexecuted instantiation: complexobject.c:Py_XINCREF
descrobject.c:Py_XINCREF
Line
Count
Source
508
52.9k
{
509
52.9k
    if (op != _Py_NULL) {
510
52.4k
        Py_INCREF(op);
511
52.4k
    }
512
52.9k
}
Unexecuted instantiation: enumobject.c:Py_XINCREF
Unexecuted instantiation: genobject.c:Py_XINCREF
Unexecuted instantiation: fileobject.c:Py_XINCREF
Unexecuted instantiation: floatobject.c:Py_XINCREF
frameobject.c:Py_XINCREF
Line
Count
Source
508
180M
{
509
180M
    if (op != _Py_NULL) {
510
179M
        Py_INCREF(op);
511
179M
    }
512
180M
}
funcobject.c:Py_XINCREF
Line
Count
Source
508
2.19k
{
509
2.19k
    if (op != _Py_NULL) {
510
482
        Py_INCREF(op);
511
482
    }
512
2.19k
}
Unexecuted instantiation: interpolationobject.c:Py_XINCREF
Unexecuted instantiation: iterobject.c:Py_XINCREF
lazyimportobject.c:Py_XINCREF
Line
Count
Source
508
224
{
509
224
    if (op != _Py_NULL) {
510
136
        Py_INCREF(op);
511
136
    }
512
224
}
Unexecuted instantiation: odictobject.c:Py_XINCREF
memoryobject.c:Py_XINCREF
Line
Count
Source
508
414
{
509
414
    if (op != _Py_NULL) {
510
414
        Py_INCREF(op);
511
414
    }
512
414
}
methodobject.c:Py_XINCREF
Line
Count
Source
508
18.7M
{
509
18.7M
    if (op != _Py_NULL) {
510
9.36M
        Py_INCREF(op);
511
9.36M
    }
512
18.7M
}
Unexecuted instantiation: namespaceobject.c:Py_XINCREF
Unexecuted instantiation: unicode_format.c:Py_XINCREF
Unexecuted instantiation: _contextvars.c:Py_XINCREF
Unexecuted instantiation: Python-ast.c:Py_XINCREF
Unexecuted instantiation: Python-tokenize.c:Py_XINCREF
Unexecuted instantiation: asdl.c:Py_XINCREF
Unexecuted instantiation: assemble.c:Py_XINCREF
Unexecuted instantiation: ast.c:Py_XINCREF
Unexecuted instantiation: ast_preprocess.c:Py_XINCREF
Unexecuted instantiation: ast_unparse.c:Py_XINCREF
Unexecuted instantiation: critical_section.c:Py_XINCREF
Unexecuted instantiation: crossinterp.c:Py_XINCREF
Unexecuted instantiation: getcopyright.c:Py_XINCREF
Unexecuted instantiation: getplatform.c:Py_XINCREF
Unexecuted instantiation: getversion.c:Py_XINCREF
Unexecuted instantiation: optimizer.c:Py_XINCREF
Unexecuted instantiation: pathconfig.c:Py_XINCREF
Unexecuted instantiation: pymath.c:Py_XINCREF
Unexecuted instantiation: pystrhex.c:Py_XINCREF
pegen.c:Py_XINCREF
Line
Count
Source
508
22.6k
{
509
22.6k
    if (op != _Py_NULL) {
510
13
        Py_INCREF(op);
511
13
    }
512
22.6k
}
Unexecuted instantiation: pegen_errors.c:Py_XINCREF
Unexecuted instantiation: parser.c:Py_XINCREF
Unexecuted instantiation: buffer.c:Py_XINCREF
Unexecuted instantiation: lexer.c:Py_XINCREF
Unexecuted instantiation: number.c:Py_XINCREF
Unexecuted instantiation: state.c:Py_XINCREF
Unexecuted instantiation: string.c:Py_XINCREF
Unexecuted instantiation: readline_tokenizer.c:Py_XINCREF
Unexecuted instantiation: string_tokenizer.c:Py_XINCREF
Unexecuted instantiation: utf8_tokenizer.c:Py_XINCREF
Unexecuted instantiation: getcompiler.c:Py_XINCREF
Unexecuted instantiation: mystrtoul.c:Py_XINCREF
Unexecuted instantiation: token.c:Py_XINCREF
Unexecuted instantiation: action_helpers.c:Py_XINCREF
Unexecuted instantiation: string_parser.c:Py_XINCREF
513
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
514
274M
#  define Py_XINCREF(op) Py_XINCREF(_PyObject_CAST(op))
515
#endif
516
517
static inline void Py_XDECREF(PyObject *op)
518
1.29G
{
519
1.29G
    if (op != _Py_NULL) {
520
1.20G
        Py_DECREF(op);
521
1.20G
    }
522
1.29G
}
exceptions.c:Py_XDECREF
Line
Count
Source
518
3.90M
{
519
3.90M
    if (op != _Py_NULL) {
520
574k
        Py_DECREF(op);
521
574k
    }
522
3.90M
}
genericaliasobject.c:Py_XDECREF
Line
Count
Source
518
138
{
519
138
    if (op != _Py_NULL) {
520
92
        Py_DECREF(op);
521
92
    }
522
138
}
listobject.c:Py_XDECREF
Line
Count
Source
518
678M
{
519
678M
    if (op != _Py_NULL) {
520
673M
        Py_DECREF(op);
521
673M
    }
522
678M
}
longobject.c:Py_XDECREF
Line
Count
Source
518
1.07M
{
519
1.07M
    if (op != _Py_NULL) {
520
834k
        Py_DECREF(op);
521
834k
    }
522
1.07M
}
dictobject.c:Py_XDECREF
Line
Count
Source
518
22.1M
{
519
22.1M
    if (op != _Py_NULL) {
520
22.1M
        Py_DECREF(op);
521
22.1M
    }
522
22.1M
}
moduleobject.c:Py_XDECREF
Line
Count
Source
518
1.33k
{
519
1.33k
    if (op != _Py_NULL) {
520
162
        Py_DECREF(op);
521
162
    }
522
1.33k
}
object.c:Py_XDECREF
Line
Count
Source
518
1.69k
{
519
1.69k
    if (op != _Py_NULL) {
520
168
        Py_DECREF(op);
521
168
    }
522
1.69k
}
Unexecuted instantiation: obmalloc.c:Py_XDECREF
Unexecuted instantiation: picklebufobject.c:Py_XDECREF
rangeobject.c:Py_XDECREF
Line
Count
Source
518
63
{
519
63
    if (op != _Py_NULL) {
520
63
        Py_DECREF(op);
521
63
    }
522
63
}
Unexecuted instantiation: sentinelobject.c:Py_XDECREF
setobject.c:Py_XDECREF
Line
Count
Source
518
124k
{
519
124k
    if (op != _Py_NULL) {
520
21
        Py_DECREF(op);
521
21
    }
522
124k
}
Unexecuted instantiation: sliceobject.c:Py_XDECREF
structseq.c:Py_XDECREF
Line
Count
Source
518
22.4k
{
519
22.4k
    if (op != _Py_NULL) {
520
22.4k
        Py_DECREF(op);
521
22.4k
    }
522
22.4k
}
Unexecuted instantiation: templateobject.c:Py_XDECREF
tupleobject.c:Py_XDECREF
Line
Count
Source
518
449M
{
519
449M
    if (op != _Py_NULL) {
520
449M
        Py_DECREF(op);
521
449M
    }
522
449M
}
typeobject.c:Py_XDECREF
Line
Count
Source
518
44.5k
{
519
44.5k
    if (op != _Py_NULL) {
520
11.5k
        Py_DECREF(op);
521
11.5k
    }
522
44.5k
}
Unexecuted instantiation: typevarobject.c:Py_XDECREF
unicode_formatter.c:Py_XDECREF
Line
Count
Source
518
292
{
519
292
    if (op != _Py_NULL) {
520
128
        Py_DECREF(op);
521
128
    }
522
292
}
Unexecuted instantiation: unicode_writer.c:Py_XDECREF
Unexecuted instantiation: unicodectype.c:Py_XDECREF
unicodeobject.c:Py_XDECREF
Line
Count
Source
518
1.56M
{
519
1.56M
    if (op != _Py_NULL) {
520
442k
        Py_DECREF(op);
521
442k
    }
522
1.56M
}
unionobject.c:Py_XDECREF
Line
Count
Source
518
118
{
519
118
    if (op != _Py_NULL) {
520
12
        Py_DECREF(op);
521
12
    }
522
118
}
weakrefobject.c:Py_XDECREF
Line
Count
Source
518
4.94k
{
519
4.94k
    if (op != _Py_NULL) {
520
214
        Py_DECREF(op);
521
214
    }
522
4.94k
}
_warnings.c:Py_XDECREF
Line
Count
Source
518
7.75M
{
519
7.75M
    if (op != _Py_NULL) {
520
6.81M
        Py_DECREF(op);
521
6.81M
    }
522
7.75M
}
bltinmodule.c:Py_XDECREF
Line
Count
Source
518
15.7M
{
519
15.7M
    if (op != _Py_NULL) {
520
231k
        Py_DECREF(op);
521
231k
    }
522
15.7M
}
ceval.c:Py_XDECREF
Line
Count
Source
518
3.43M
{
519
3.43M
    if (op != _Py_NULL) {
520
255
        Py_DECREF(op);
521
255
    }
522
3.43M
}
codecs.c:Py_XDECREF
Line
Count
Source
518
7.15k
{
519
7.15k
    if (op != _Py_NULL) {
520
4.76k
        Py_DECREF(op);
521
4.76k
    }
522
7.15k
}
codegen.c:Py_XDECREF
Line
Count
Source
518
278
{
519
278
    if (op != _Py_NULL) {
520
75
        Py_DECREF(op);
521
75
    }
522
278
}
compile.c:Py_XDECREF
Line
Count
Source
518
234k
{
519
234k
    if (op != _Py_NULL) {
520
102k
        Py_DECREF(op);
521
102k
    }
522
234k
}
context.c:Py_XDECREF
Line
Count
Source
518
4
{
519
4
    if (op != _Py_NULL) {
520
0
        Py_DECREF(op);
521
0
    }
522
4
}
errors.c:Py_XDECREF
Line
Count
Source
518
25.8M
{
519
25.8M
    if (op != _Py_NULL) {
520
6.09M
        Py_DECREF(op);
521
6.09M
    }
522
25.8M
}
Unexecuted instantiation: flowgraph.c:Py_XDECREF
Unexecuted instantiation: frame.c:Py_XDECREF
Unexecuted instantiation: future.c:Py_XDECREF
gc.c:Py_XDECREF
Line
Count
Source
518
59.0k
{
519
59.0k
    if (op != _Py_NULL) {
520
0
        Py_DECREF(op);
521
0
    }
522
59.0k
}
Unexecuted instantiation: gc_gil.c:Py_XDECREF
Unexecuted instantiation: getargs.c:Py_XDECREF
Unexecuted instantiation: ceval_gil.c:Py_XDECREF
Unexecuted instantiation: hamt.c:Py_XDECREF
Unexecuted instantiation: hashtable.c:Py_XDECREF
import.c:Py_XDECREF
Line
Count
Source
518
6.25M
{
519
6.25M
    if (op != _Py_NULL) {
520
6.25M
        Py_DECREF(op);
521
6.25M
    }
522
6.25M
}
Unexecuted instantiation: importdl.c:Py_XDECREF
Unexecuted instantiation: initconfig.c:Py_XDECREF
Unexecuted instantiation: instrumentation.c:Py_XDECREF
instruction_sequence.c:Py_XDECREF
Line
Count
Source
518
107k
{
519
107k
    if (op != _Py_NULL) {
520
0
        Py_DECREF(op);
521
0
    }
522
107k
}
intrinsics.c:Py_XDECREF
Line
Count
Source
518
14.2k
{
519
14.2k
    if (op != _Py_NULL) {
520
14.2k
        Py_DECREF(op);
521
14.2k
    }
522
14.2k
}
Unexecuted instantiation: legacy_tracing.c:Py_XDECREF
Unexecuted instantiation: lock.c:Py_XDECREF
marshal.c:Py_XDECREF
Line
Count
Source
518
233k
{
519
233k
    if (op != _Py_NULL) {
520
233k
        Py_DECREF(op);
521
233k
    }
522
233k
}
modsupport.c:Py_XDECREF
Line
Count
Source
518
5.73k
{
519
5.73k
    if (op != _Py_NULL) {
520
5.73k
        Py_DECREF(op);
521
5.73k
    }
522
5.73k
}
Unexecuted instantiation: mysnprintf.c:Py_XDECREF
Unexecuted instantiation: parking_lot.c:Py_XDECREF
Unexecuted instantiation: preconfig.c:Py_XDECREF
Unexecuted instantiation: pyarena.c:Py_XDECREF
Unexecuted instantiation: pyctype.c:Py_XDECREF
Unexecuted instantiation: pyhash.c:Py_XDECREF
pylifecycle.c:Py_XDECREF
Line
Count
Source
518
126
{
519
126
    if (op != _Py_NULL) {
520
126
        Py_DECREF(op);
521
126
    }
522
126
}
Unexecuted instantiation: pystate.c:Py_XDECREF
pythonrun.c:Py_XDECREF
Line
Count
Source
518
39
{
519
39
    if (op != _Py_NULL) {
520
26
        Py_DECREF(op);
521
26
    }
522
39
}
Unexecuted instantiation: pytime.c:Py_XDECREF
Unexecuted instantiation: qsbr.c:Py_XDECREF
Unexecuted instantiation: bootstrap_hash.c:Py_XDECREF
specialize.c:Py_XDECREF
Line
Count
Source
518
13.0k
{
519
13.0k
    if (op != _Py_NULL) {
520
8.07k
        Py_DECREF(op);
521
8.07k
    }
522
13.0k
}
Unexecuted instantiation: slots.c:Py_XDECREF
Unexecuted instantiation: slots_generated.c:Py_XDECREF
structmember.c:Py_XDECREF
Line
Count
Source
518
3.69k
{
519
3.69k
    if (op != _Py_NULL) {
520
264
        Py_DECREF(op);
521
264
    }
522
3.69k
}
symtable.c:Py_XDECREF
Line
Count
Source
518
938k
{
519
938k
    if (op != _Py_NULL) {
520
700k
        Py_DECREF(op);
521
700k
    }
522
938k
}
sysmodule.c:Py_XDECREF
Line
Count
Source
518
1.96k
{
519
1.96k
    if (op != _Py_NULL) {
520
1.04k
        Py_DECREF(op);
521
1.04k
    }
522
1.96k
}
Unexecuted instantiation: thread.c:Py_XDECREF
traceback.c:Py_XDECREF
Line
Count
Source
518
13.7M
{
519
13.7M
    if (op != _Py_NULL) {
520
7.68M
        Py_DECREF(op);
521
7.68M
    }
522
13.7M
}
Unexecuted instantiation: tracemalloc.c:Py_XDECREF
Unexecuted instantiation: typecache.c:Py_XDECREF
Unexecuted instantiation: getopt.c:Py_XDECREF
Unexecuted instantiation: pystrcmp.c:Py_XDECREF
Unexecuted instantiation: pystrtod.c:Py_XDECREF
Unexecuted instantiation: dtoa.c:Py_XDECREF
Unexecuted instantiation: fileutils.c:Py_XDECREF
Unexecuted instantiation: suggestions.c:Py_XDECREF
Unexecuted instantiation: perf_trampoline.c:Py_XDECREF
Unexecuted instantiation: perf_jit_trampoline.c:Py_XDECREF
Unexecuted instantiation: jit_unwind.c:Py_XDECREF
Unexecuted instantiation: remote_debugging.c:Py_XDECREF
Unexecuted instantiation: dynload_shlib.c:Py_XDECREF
Unexecuted instantiation: config.c:Py_XDECREF
Unexecuted instantiation: gcmodule.c:Py_XDECREF
Unexecuted instantiation: _asynciomodule.c:Py_XDECREF
Unexecuted instantiation: atexitmodule.c:Py_XDECREF
Unexecuted instantiation: faulthandler.c:Py_XDECREF
Unexecuted instantiation: posixmodule.c:Py_XDECREF
Unexecuted instantiation: signalmodule.c:Py_XDECREF
Unexecuted instantiation: _tracemalloc.c:Py_XDECREF
Unexecuted instantiation: _suggestions.c:Py_XDECREF
Unexecuted instantiation: _datetimemodule.c:Py_XDECREF
Unexecuted instantiation: _codecsmodule.c:Py_XDECREF
_collectionsmodule.c:Py_XDECREF
Line
Count
Source
518
4
{
519
4
    if (op != _Py_NULL) {
520
0
        Py_DECREF(op);
521
0
    }
522
4
}
Unexecuted instantiation: errnomodule.c:Py_XDECREF
Unexecuted instantiation: _iomodule.c:Py_XDECREF
Unexecuted instantiation: iobase.c:Py_XDECREF
Unexecuted instantiation: fileio.c:Py_XDECREF
Unexecuted instantiation: bytesio.c:Py_XDECREF
bufferedio.c:Py_XDECREF
Line
Count
Source
518
851
{
519
851
    if (op != _Py_NULL) {
520
200
        Py_DECREF(op);
521
200
    }
522
851
}
textio.c:Py_XDECREF
Line
Count
Source
518
145
{
519
145
    if (op != _Py_NULL) {
520
59
        Py_DECREF(op);
521
59
    }
522
145
}
Unexecuted instantiation: stringio.c:Py_XDECREF
itertoolsmodule.c:Py_XDECREF
Line
Count
Source
518
342
{
519
342
    if (op != _Py_NULL) {
520
342
        Py_DECREF(op);
521
342
    }
522
342
}
sre.c:Py_XDECREF
Line
Count
Source
518
10.2k
{
519
10.2k
    if (op != _Py_NULL) {
520
10.2k
        Py_DECREF(op);
521
10.2k
    }
522
10.2k
}
Unexecuted instantiation: _sysconfig.c:Py_XDECREF
Unexecuted instantiation: _threadmodule.c:Py_XDECREF
Unexecuted instantiation: timemodule.c:Py_XDECREF
Unexecuted instantiation: _typesmodule.c:Py_XDECREF
Unexecuted instantiation: _typingmodule.c:Py_XDECREF
Unexecuted instantiation: _weakref.c:Py_XDECREF
_abc.c:Py_XDECREF
Line
Count
Source
518
3.54k
{
519
3.54k
    if (op != _Py_NULL) {
520
2.55k
        Py_DECREF(op);
521
2.55k
    }
522
3.54k
}
_functoolsmodule.c:Py_XDECREF
Line
Count
Source
518
4
{
519
4
    if (op != _Py_NULL) {
520
0
        Py_DECREF(op);
521
0
    }
522
4
}
Unexecuted instantiation: _localemodule.c:Py_XDECREF
Unexecuted instantiation: _opcode.c:Py_XDECREF
Unexecuted instantiation: _operator.c:Py_XDECREF
Unexecuted instantiation: _stat.c:Py_XDECREF
Unexecuted instantiation: symtablemodule.c:Py_XDECREF
Unexecuted instantiation: pwdmodule.c:Py_XDECREF
Unexecuted instantiation: getpath.c:Py_XDECREF
Unexecuted instantiation: frozen.c:Py_XDECREF
Unexecuted instantiation: getbuildinfo.c:Py_XDECREF
Unexecuted instantiation: peg_api.c:Py_XDECREF
Unexecuted instantiation: file_tokenizer.c:Py_XDECREF
helpers.c:Py_XDECREF
Line
Count
Source
518
11.4k
{
519
11.4k
    if (op != _Py_NULL) {
520
10.9k
        Py_DECREF(op);
521
10.9k
    }
522
11.4k
}
Unexecuted instantiation: myreadline.c:Py_XDECREF
abstract.c:Py_XDECREF
Line
Count
Source
518
348k
{
519
348k
    if (op != _Py_NULL) {
520
348k
        Py_DECREF(op);
521
348k
    }
522
348k
}
Unexecuted instantiation: boolobject.c:Py_XDECREF
Unexecuted instantiation: bytes_methods.c:Py_XDECREF
bytearrayobject.c:Py_XDECREF
Line
Count
Source
518
992k
{
519
992k
    if (op != _Py_NULL) {
520
992k
        Py_DECREF(op);
521
992k
    }
522
992k
}
bytesobject.c:Py_XDECREF
Line
Count
Source
518
76.8k
{
519
76.8k
    if (op != _Py_NULL) {
520
2.73k
        Py_DECREF(op);
521
2.73k
    }
522
76.8k
}
Unexecuted instantiation: call.c:Py_XDECREF
capsule.c:Py_XDECREF
Line
Count
Source
518
2
{
519
2
    if (op != _Py_NULL) {
520
2
        Py_DECREF(op);
521
2
    }
522
2
}
cellobject.c:Py_XDECREF
Line
Count
Source
518
3.45M
{
519
3.45M
    if (op != _Py_NULL) {
520
3.39M
        Py_DECREF(op);
521
3.39M
    }
522
3.45M
}
classobject.c:Py_XDECREF
Line
Count
Source
518
12.7M
{
519
12.7M
    if (op != _Py_NULL) {
520
12.7M
        Py_DECREF(op);
521
12.7M
    }
522
12.7M
}
codeobject.c:Py_XDECREF
Line
Count
Source
518
612k
{
519
612k
    if (op != _Py_NULL) {
520
536k
        Py_DECREF(op);
521
536k
    }
522
612k
}
Unexecuted instantiation: complexobject.c:Py_XDECREF
descrobject.c:Py_XDECREF
Line
Count
Source
518
5.78k
{
519
5.78k
    if (op != _Py_NULL) {
520
2.80k
        Py_DECREF(op);
521
2.80k
    }
522
5.78k
}
enumobject.c:Py_XDECREF
Line
Count
Source
518
9.69M
{
519
9.69M
    if (op != _Py_NULL) {
520
6.46M
        Py_DECREF(op);
521
6.46M
    }
522
9.69M
}
genobject.c:Py_XDECREF
Line
Count
Source
518
25.8k
{
519
25.8k
    if (op != _Py_NULL) {
520
0
        Py_DECREF(op);
521
0
    }
522
25.8k
}
Unexecuted instantiation: fileobject.c:Py_XDECREF
floatobject.c:Py_XDECREF
Line
Count
Source
518
106k
{
519
106k
    if (op != _Py_NULL) {
520
73
        Py_DECREF(op);
521
73
    }
522
106k
}
Unexecuted instantiation: frameobject.c:Py_XDECREF
funcobject.c:Py_XDECREF
Line
Count
Source
518
2.61k
{
519
2.61k
    if (op != _Py_NULL) {
520
1.04k
        Py_DECREF(op);
521
1.04k
    }
522
2.61k
}
Unexecuted instantiation: interpolationobject.c:Py_XDECREF
iterobject.c:Py_XDECREF
Line
Count
Source
518
2.93M
{
519
2.93M
    if (op != _Py_NULL) {
520
236
        Py_DECREF(op);
521
236
    }
522
2.93M
}
Unexecuted instantiation: lazyimportobject.c:Py_XDECREF
Unexecuted instantiation: odictobject.c:Py_XDECREF
Unexecuted instantiation: memoryobject.c:Py_XDECREF
methodobject.c:Py_XDECREF
Line
Count
Source
518
28.0M
{
519
28.0M
    if (op != _Py_NULL) {
520
9.33M
        Py_DECREF(op);
521
9.33M
    }
522
28.0M
}
Unexecuted instantiation: namespaceobject.c:Py_XDECREF
unicode_format.c:Py_XDECREF
Line
Count
Source
518
1.49M
{
519
1.49M
    if (op != _Py_NULL) {
520
0
        Py_DECREF(op);
521
0
    }
522
1.49M
}
Unexecuted instantiation: _contextvars.c:Py_XDECREF
Unexecuted instantiation: Python-ast.c:Py_XDECREF
Unexecuted instantiation: Python-tokenize.c:Py_XDECREF
Unexecuted instantiation: asdl.c:Py_XDECREF
assemble.c:Py_XDECREF
Line
Count
Source
518
369k
{
519
369k
    if (op != _Py_NULL) {
520
369k
        Py_DECREF(op);
521
369k
    }
522
369k
}
Unexecuted instantiation: ast.c:Py_XDECREF
Unexecuted instantiation: ast_preprocess.c:Py_XDECREF
Unexecuted instantiation: ast_unparse.c:Py_XDECREF
Unexecuted instantiation: critical_section.c:Py_XDECREF
Unexecuted instantiation: crossinterp.c:Py_XDECREF
Unexecuted instantiation: getcopyright.c:Py_XDECREF
Unexecuted instantiation: getplatform.c:Py_XDECREF
Unexecuted instantiation: getversion.c:Py_XDECREF
Unexecuted instantiation: optimizer.c:Py_XDECREF
Unexecuted instantiation: pathconfig.c:Py_XDECREF
Unexecuted instantiation: pymath.c:Py_XDECREF
Unexecuted instantiation: pystrhex.c:Py_XDECREF
pegen.c:Py_XDECREF
Line
Count
Source
518
31.4k
{
519
31.4k
    if (op != _Py_NULL) {
520
3.01k
        Py_DECREF(op);
521
3.01k
    }
522
31.4k
}
pegen_errors.c:Py_XDECREF
Line
Count
Source
518
7.05k
{
519
7.05k
    if (op != _Py_NULL) {
520
4.70k
        Py_DECREF(op);
521
4.70k
    }
522
7.05k
}
Unexecuted instantiation: parser.c:Py_XDECREF
Unexecuted instantiation: buffer.c:Py_XDECREF
Unexecuted instantiation: lexer.c:Py_XDECREF
Unexecuted instantiation: number.c:Py_XDECREF
state.c:Py_XDECREF
Line
Count
Source
518
128k
{
519
128k
    if (op != _Py_NULL) {
520
22.7k
        Py_DECREF(op);
521
22.7k
    }
522
128k
}
Unexecuted instantiation: string.c:Py_XDECREF
Unexecuted instantiation: readline_tokenizer.c:Py_XDECREF
Unexecuted instantiation: string_tokenizer.c:Py_XDECREF
Unexecuted instantiation: utf8_tokenizer.c:Py_XDECREF
Unexecuted instantiation: getcompiler.c:Py_XDECREF
Unexecuted instantiation: mystrtoul.c:Py_XDECREF
Unexecuted instantiation: token.c:Py_XDECREF
Unexecuted instantiation: action_helpers.c:Py_XDECREF
string_parser.c:Py_XDECREF
Line
Count
Source
518
33.9k
{
519
33.9k
    if (op != _Py_NULL) {
520
33.9k
        Py_DECREF(op);
521
33.9k
    }
522
33.9k
}
523
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
524
1.29G
#  define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op))
525
#endif
526
527
// Create a new strong reference to an object:
528
// increment the reference count of the object and return the object.
529
PyAPI_FUNC(PyObject*) Py_NewRef(PyObject *obj);
530
531
// Similar to Py_NewRef(), but the object can be NULL.
532
PyAPI_FUNC(PyObject*) Py_XNewRef(PyObject *obj);
533
534
static inline PyObject* _Py_NewRef(PyObject *obj)
535
1.54G
{
536
1.54G
    Py_INCREF(obj);
537
1.54G
    return obj;
538
1.54G
}
exceptions.c:_Py_NewRef
Line
Count
Source
535
4.08M
{
536
4.08M
    Py_INCREF(obj);
537
4.08M
    return obj;
538
4.08M
}
genericaliasobject.c:_Py_NewRef
Line
Count
Source
535
194
{
536
194
    Py_INCREF(obj);
537
194
    return obj;
538
194
}
listobject.c:_Py_NewRef
Line
Count
Source
535
679M
{
536
679M
    Py_INCREF(obj);
537
679M
    return obj;
538
679M
}
longobject.c:_Py_NewRef
Line
Count
Source
535
309k
{
536
309k
    Py_INCREF(obj);
537
309k
    return obj;
538
309k
}
dictobject.c:_Py_NewRef
Line
Count
Source
535
51.8M
{
536
51.8M
    Py_INCREF(obj);
537
51.8M
    return obj;
538
51.8M
}
moduleobject.c:_Py_NewRef
Line
Count
Source
535
985
{
536
985
    Py_INCREF(obj);
537
985
    return obj;
538
985
}
object.c:_Py_NewRef
Line
Count
Source
535
482k
{
536
482k
    Py_INCREF(obj);
537
482k
    return obj;
538
482k
}
Unexecuted instantiation: obmalloc.c:_Py_NewRef
Unexecuted instantiation: picklebufobject.c:_Py_NewRef
rangeobject.c:_Py_NewRef
Line
Count
Source
535
63
{
536
63
    Py_INCREF(obj);
537
63
    return obj;
538
63
}
sentinelobject.c:_Py_NewRef
Line
Count
Source
535
18
{
536
18
    Py_INCREF(obj);
537
18
    return obj;
538
18
}
setobject.c:_Py_NewRef
Line
Count
Source
535
1.83M
{
536
1.83M
    Py_INCREF(obj);
537
1.83M
    return obj;
538
1.83M
}
sliceobject.c:_Py_NewRef
Line
Count
Source
535
21.5M
{
536
21.5M
    Py_INCREF(obj);
537
21.5M
    return obj;
538
21.5M
}
Unexecuted instantiation: structseq.c:_Py_NewRef
Unexecuted instantiation: templateobject.c:_Py_NewRef
tupleobject.c:_Py_NewRef
Line
Count
Source
535
273M
{
536
273M
    Py_INCREF(obj);
537
273M
    return obj;
538
273M
}
typeobject.c:_Py_NewRef
Line
Count
Source
535
22.1M
{
536
22.1M
    Py_INCREF(obj);
537
22.1M
    return obj;
538
22.1M
}
Unexecuted instantiation: typevarobject.c:_Py_NewRef
Unexecuted instantiation: unicode_formatter.c:_Py_NewRef
Unexecuted instantiation: unicode_writer.c:_Py_NewRef
Unexecuted instantiation: unicodectype.c:_Py_NewRef
unicodeobject.c:_Py_NewRef
Line
Count
Source
535
851k
{
536
851k
    Py_INCREF(obj);
537
851k
    return obj;
538
851k
}
Unexecuted instantiation: unionobject.c:_Py_NewRef
Unexecuted instantiation: weakrefobject.c:_Py_NewRef
_warnings.c:_Py_NewRef
Line
Count
Source
535
2.28M
{
536
2.28M
    Py_INCREF(obj);
537
2.28M
    return obj;
538
2.28M
}
bltinmodule.c:_Py_NewRef
Line
Count
Source
535
31.3M
{
536
31.3M
    Py_INCREF(obj);
537
31.3M
    return obj;
538
31.3M
}
ceval.c:_Py_NewRef
Line
Count
Source
535
80.1M
{
536
80.1M
    Py_INCREF(obj);
537
80.1M
    return obj;
538
80.1M
}
codecs.c:_Py_NewRef
Line
Count
Source
535
124k
{
536
124k
    Py_INCREF(obj);
537
124k
    return obj;
538
124k
}
codegen.c:_Py_NewRef
Line
Count
Source
535
19.0k
{
536
19.0k
    Py_INCREF(obj);
537
19.0k
    return obj;
538
19.0k
}
compile.c:_Py_NewRef
Line
Count
Source
535
1.11M
{
536
1.11M
    Py_INCREF(obj);
537
1.11M
    return obj;
538
1.11M
}
context.c:_Py_NewRef
Line
Count
Source
535
36
{
536
36
    Py_INCREF(obj);
537
36
    return obj;
538
36
}
errors.c:_Py_NewRef
Line
Count
Source
535
3.14M
{
536
3.14M
    Py_INCREF(obj);
537
3.14M
    return obj;
538
3.14M
}
flowgraph.c:_Py_NewRef
Line
Count
Source
535
3.00M
{
536
3.00M
    Py_INCREF(obj);
537
3.00M
    return obj;
538
3.00M
}
frame.c:_Py_NewRef
Line
Count
Source
535
3.33M
{
536
3.33M
    Py_INCREF(obj);
537
3.33M
    return obj;
538
3.33M
}
Unexecuted instantiation: future.c:_Py_NewRef
Unexecuted instantiation: gc.c:_Py_NewRef
Unexecuted instantiation: gc_gil.c:_Py_NewRef
getargs.c:_Py_NewRef
Line
Count
Source
535
1.26M
{
536
1.26M
    Py_INCREF(obj);
537
1.26M
    return obj;
538
1.26M
}
Unexecuted instantiation: ceval_gil.c:_Py_NewRef
hamt.c:_Py_NewRef
Line
Count
Source
535
12
{
536
12
    Py_INCREF(obj);
537
12
    return obj;
538
12
}
Unexecuted instantiation: hashtable.c:_Py_NewRef
import.c:_Py_NewRef
Line
Count
Source
535
4.74M
{
536
4.74M
    Py_INCREF(obj);
537
4.74M
    return obj;
538
4.74M
}
importdl.c:_Py_NewRef
Line
Count
Source
535
342
{
536
342
    Py_INCREF(obj);
537
342
    return obj;
538
342
}
initconfig.c:_Py_NewRef
Line
Count
Source
535
336
{
536
336
    Py_INCREF(obj);
537
336
    return obj;
538
336
}
Unexecuted instantiation: instrumentation.c:_Py_NewRef
Unexecuted instantiation: instruction_sequence.c:_Py_NewRef
intrinsics.c:_Py_NewRef
Line
Count
Source
535
25.8k
{
536
25.8k
    Py_INCREF(obj);
537
25.8k
    return obj;
538
25.8k
}
Unexecuted instantiation: legacy_tracing.c:_Py_NewRef
Unexecuted instantiation: lock.c:_Py_NewRef
marshal.c:_Py_NewRef
Line
Count
Source
535
245k
{
536
245k
    Py_INCREF(obj);
537
245k
    return obj;
538
245k
}
Unexecuted instantiation: modsupport.c:_Py_NewRef
Unexecuted instantiation: mysnprintf.c:_Py_NewRef
Unexecuted instantiation: parking_lot.c:_Py_NewRef
Unexecuted instantiation: preconfig.c:_Py_NewRef
Unexecuted instantiation: pyarena.c:_Py_NewRef
Unexecuted instantiation: pyctype.c:_Py_NewRef
Unexecuted instantiation: pyhash.c:_Py_NewRef
pylifecycle.c:_Py_NewRef
Line
Count
Source
535
21
{
536
21
    Py_INCREF(obj);
537
21
    return obj;
538
21
}
Unexecuted instantiation: pystate.c:_Py_NewRef
Unexecuted instantiation: pythonrun.c:_Py_NewRef
Unexecuted instantiation: pytime.c:_Py_NewRef
Unexecuted instantiation: qsbr.c:_Py_NewRef
Unexecuted instantiation: bootstrap_hash.c:_Py_NewRef
Unexecuted instantiation: specialize.c:_Py_NewRef
Unexecuted instantiation: slots.c:_Py_NewRef
Unexecuted instantiation: slots_generated.c:_Py_NewRef
Unexecuted instantiation: structmember.c:_Py_NewRef
symtable.c:_Py_NewRef
Line
Count
Source
535
1.24M
{
536
1.24M
    Py_INCREF(obj);
537
1.24M
    return obj;
538
1.24M
}
sysmodule.c:_Py_NewRef
Line
Count
Source
535
996
{
536
996
    Py_INCREF(obj);
537
996
    return obj;
538
996
}
Unexecuted instantiation: thread.c:_Py_NewRef
Unexecuted instantiation: traceback.c:_Py_NewRef
Unexecuted instantiation: tracemalloc.c:_Py_NewRef
Unexecuted instantiation: typecache.c:_Py_NewRef
Unexecuted instantiation: getopt.c:_Py_NewRef
Unexecuted instantiation: pystrcmp.c:_Py_NewRef
Unexecuted instantiation: pystrtod.c:_Py_NewRef
Unexecuted instantiation: dtoa.c:_Py_NewRef
Unexecuted instantiation: fileutils.c:_Py_NewRef
Unexecuted instantiation: suggestions.c:_Py_NewRef
Unexecuted instantiation: perf_trampoline.c:_Py_NewRef
Unexecuted instantiation: perf_jit_trampoline.c:_Py_NewRef
Unexecuted instantiation: jit_unwind.c:_Py_NewRef
Unexecuted instantiation: remote_debugging.c:_Py_NewRef
Unexecuted instantiation: dynload_shlib.c:_Py_NewRef
Unexecuted instantiation: config.c:_Py_NewRef
Unexecuted instantiation: gcmodule.c:_Py_NewRef
Unexecuted instantiation: _asynciomodule.c:_Py_NewRef
Unexecuted instantiation: atexitmodule.c:_Py_NewRef
Unexecuted instantiation: faulthandler.c:_Py_NewRef
posixmodule.c:_Py_NewRef
Line
Count
Source
535
7.27k
{
536
7.27k
    Py_INCREF(obj);
537
7.27k
    return obj;
538
7.27k
}
Unexecuted instantiation: signalmodule.c:_Py_NewRef
Unexecuted instantiation: _tracemalloc.c:_Py_NewRef
Unexecuted instantiation: _suggestions.c:_Py_NewRef
_datetimemodule.c:_Py_NewRef
Line
Count
Source
535
42
{
536
42
    Py_INCREF(obj);
537
42
    return obj;
538
42
}
Unexecuted instantiation: _codecsmodule.c:_Py_NewRef
_collectionsmodule.c:_Py_NewRef
Line
Count
Source
535
51
{
536
51
    Py_INCREF(obj);
537
51
    return obj;
538
51
}
Unexecuted instantiation: errnomodule.c:_Py_NewRef
_iomodule.c:_Py_NewRef
Line
Count
Source
535
63
{
536
63
    Py_INCREF(obj);
537
63
    return obj;
538
63
}
iobase.c:_Py_NewRef
Line
Count
Source
535
200
{
536
200
    Py_INCREF(obj);
537
200
    return obj;
538
200
}
Unexecuted instantiation: fileio.c:_Py_NewRef
Unexecuted instantiation: bytesio.c:_Py_NewRef
bufferedio.c:_Py_NewRef
Line
Count
Source
535
218
{
536
218
    Py_INCREF(obj);
537
218
    return obj;
538
218
}
textio.c:_Py_NewRef
Line
Count
Source
535
350k
{
536
350k
    Py_INCREF(obj);
537
350k
    return obj;
538
350k
}
Unexecuted instantiation: stringio.c:_Py_NewRef
itertoolsmodule.c:_Py_NewRef
Line
Count
Source
535
405
{
536
405
    Py_INCREF(obj);
537
405
    return obj;
538
405
}
sre.c:_Py_NewRef
Line
Count
Source
535
22.5k
{
536
22.5k
    Py_INCREF(obj);
537
22.5k
    return obj;
538
22.5k
}
Unexecuted instantiation: _sysconfig.c:_Py_NewRef
Unexecuted instantiation: _threadmodule.c:_Py_NewRef
Unexecuted instantiation: timemodule.c:_Py_NewRef
Unexecuted instantiation: _typesmodule.c:_Py_NewRef
Unexecuted instantiation: _typingmodule.c:_Py_NewRef
Unexecuted instantiation: _weakref.c:_Py_NewRef
_abc.c:_Py_NewRef
Line
Count
Source
535
772
{
536
772
    Py_INCREF(obj);
537
772
    return obj;
538
772
}
_functoolsmodule.c:_Py_NewRef
Line
Count
Source
535
74
{
536
74
    Py_INCREF(obj);
537
74
    return obj;
538
74
}
Unexecuted instantiation: _localemodule.c:_Py_NewRef
Unexecuted instantiation: _opcode.c:_Py_NewRef
Unexecuted instantiation: _operator.c:_Py_NewRef
Unexecuted instantiation: _stat.c:_Py_NewRef
Unexecuted instantiation: symtablemodule.c:_Py_NewRef
Unexecuted instantiation: pwdmodule.c:_Py_NewRef
getpath.c:_Py_NewRef
Line
Count
Source
535
168
{
536
168
    Py_INCREF(obj);
537
168
    return obj;
538
168
}
Unexecuted instantiation: frozen.c:_Py_NewRef
Unexecuted instantiation: getbuildinfo.c:_Py_NewRef
Unexecuted instantiation: peg_api.c:_Py_NewRef
Unexecuted instantiation: file_tokenizer.c:_Py_NewRef
Unexecuted instantiation: helpers.c:_Py_NewRef
Unexecuted instantiation: myreadline.c:_Py_NewRef
abstract.c:_Py_NewRef
Line
Count
Source
535
64.6M
{
536
64.6M
    Py_INCREF(obj);
537
64.6M
    return obj;
538
64.6M
}
Unexecuted instantiation: boolobject.c:_Py_NewRef
Unexecuted instantiation: bytes_methods.c:_Py_NewRef
bytearrayobject.c:_Py_NewRef
Line
Count
Source
535
31
{
536
31
    Py_INCREF(obj);
537
31
    return obj;
538
31
}
bytesobject.c:_Py_NewRef
Line
Count
Source
535
5.48k
{
536
5.48k
    Py_INCREF(obj);
537
5.48k
    return obj;
538
5.48k
}
call.c:_Py_NewRef
Line
Count
Source
535
5.90k
{
536
5.90k
    Py_INCREF(obj);
537
5.90k
    return obj;
538
5.90k
}
Unexecuted instantiation: capsule.c:_Py_NewRef
Unexecuted instantiation: cellobject.c:_Py_NewRef
classobject.c:_Py_NewRef
Line
Count
Source
535
25.4M
{
536
25.4M
    Py_INCREF(obj);
537
25.4M
    return obj;
538
25.4M
}
codeobject.c:_Py_NewRef
Line
Count
Source
535
64.6M
{
536
64.6M
    Py_INCREF(obj);
537
64.6M
    return obj;
538
64.6M
}
complexobject.c:_Py_NewRef
Line
Count
Source
535
186k
{
536
186k
    Py_INCREF(obj);
537
186k
    return obj;
538
186k
}
descrobject.c:_Py_NewRef
Line
Count
Source
535
5.22k
{
536
5.22k
    Py_INCREF(obj);
537
5.22k
    return obj;
538
5.22k
}
Unexecuted instantiation: enumobject.c:_Py_NewRef
genobject.c:_Py_NewRef
Line
Count
Source
535
10.8M
{
536
10.8M
    Py_INCREF(obj);
537
10.8M
    return obj;
538
10.8M
}
Unexecuted instantiation: fileobject.c:_Py_NewRef
floatobject.c:_Py_NewRef
Line
Count
Source
535
28.4k
{
536
28.4k
    Py_INCREF(obj);
537
28.4k
    return obj;
538
28.4k
}
frameobject.c:_Py_NewRef
Line
Count
Source
535
180M
{
536
180M
    Py_INCREF(obj);
537
180M
    return obj;
538
180M
}
funcobject.c:_Py_NewRef
Line
Count
Source
535
1.20M
{
536
1.20M
    Py_INCREF(obj);
537
1.20M
    return obj;
538
1.20M
}
Unexecuted instantiation: interpolationobject.c:_Py_NewRef
iterobject.c:_Py_NewRef
Line
Count
Source
535
2.93M
{
536
2.93M
    Py_INCREF(obj);
537
2.93M
    return obj;
538
2.93M
}
lazyimportobject.c:_Py_NewRef
Line
Count
Source
535
224
{
536
224
    Py_INCREF(obj);
537
224
    return obj;
538
224
}
Unexecuted instantiation: odictobject.c:_Py_NewRef
memoryobject.c:_Py_NewRef
Line
Count
Source
535
748k
{
536
748k
    Py_INCREF(obj);
537
748k
    return obj;
538
748k
}
methodobject.c:_Py_NewRef
Line
Count
Source
535
684
{
536
684
    Py_INCREF(obj);
537
684
    return obj;
538
684
}
Unexecuted instantiation: namespaceobject.c:_Py_NewRef
unicode_format.c:_Py_NewRef
Line
Count
Source
535
1.49M
{
536
1.49M
    Py_INCREF(obj);
537
1.49M
    return obj;
538
1.49M
}
Unexecuted instantiation: _contextvars.c:_Py_NewRef
Python-ast.c:_Py_NewRef
Line
Count
Source
535
546k
{
536
546k
    Py_INCREF(obj);
537
546k
    return obj;
538
546k
}
Unexecuted instantiation: Python-tokenize.c:_Py_NewRef
Unexecuted instantiation: asdl.c:_Py_NewRef
assemble.c:_Py_NewRef
Line
Count
Source
535
200k
{
536
200k
    Py_INCREF(obj);
537
200k
    return obj;
538
200k
}
Unexecuted instantiation: ast.c:_Py_NewRef
Unexecuted instantiation: ast_preprocess.c:_Py_NewRef
Unexecuted instantiation: ast_unparse.c:_Py_NewRef
Unexecuted instantiation: critical_section.c:_Py_NewRef
Unexecuted instantiation: crossinterp.c:_Py_NewRef
Unexecuted instantiation: getcopyright.c:_Py_NewRef
Unexecuted instantiation: getplatform.c:_Py_NewRef
Unexecuted instantiation: getversion.c:_Py_NewRef
Unexecuted instantiation: optimizer.c:_Py_NewRef
Unexecuted instantiation: pathconfig.c:_Py_NewRef
Unexecuted instantiation: pymath.c:_Py_NewRef
Unexecuted instantiation: pystrhex.c:_Py_NewRef
pegen.c:_Py_NewRef
Line
Count
Source
535
22.6k
{
536
22.6k
    Py_INCREF(obj);
537
22.6k
    return obj;
538
22.6k
}
Unexecuted instantiation: pegen_errors.c:_Py_NewRef
Unexecuted instantiation: parser.c:_Py_NewRef
Unexecuted instantiation: buffer.c:_Py_NewRef
Unexecuted instantiation: lexer.c:_Py_NewRef
Unexecuted instantiation: number.c:_Py_NewRef
Unexecuted instantiation: state.c:_Py_NewRef
Unexecuted instantiation: string.c:_Py_NewRef
Unexecuted instantiation: readline_tokenizer.c:_Py_NewRef
Unexecuted instantiation: string_tokenizer.c:_Py_NewRef
Unexecuted instantiation: utf8_tokenizer.c:_Py_NewRef
Unexecuted instantiation: getcompiler.c:_Py_NewRef
Unexecuted instantiation: mystrtoul.c:_Py_NewRef
Unexecuted instantiation: token.c:_Py_NewRef
Unexecuted instantiation: action_helpers.c:_Py_NewRef
Unexecuted instantiation: string_parser.c:_Py_NewRef
539
540
static inline PyObject* _Py_XNewRef(PyObject *obj)
541
248M
{
542
248M
    Py_XINCREF(obj);
543
248M
    return obj;
544
248M
}
exceptions.c:_Py_XNewRef
Line
Count
Source
541
6.64M
{
542
6.64M
    Py_XINCREF(obj);
543
6.64M
    return obj;
544
6.64M
}
Unexecuted instantiation: genericaliasobject.c:_Py_XNewRef
listobject.c:_Py_XNewRef
Line
Count
Source
541
7.47M
{
542
7.47M
    Py_XINCREF(obj);
543
7.47M
    return obj;
544
7.47M
}
Unexecuted instantiation: longobject.c:_Py_XNewRef
dictobject.c:_Py_XNewRef
Line
Count
Source
541
9.37M
{
542
9.37M
    Py_XINCREF(obj);
543
9.37M
    return obj;
544
9.37M
}
Unexecuted instantiation: moduleobject.c:_Py_XNewRef
Unexecuted instantiation: object.c:_Py_XNewRef
Unexecuted instantiation: obmalloc.c:_Py_XNewRef
Unexecuted instantiation: picklebufobject.c:_Py_XNewRef
Unexecuted instantiation: rangeobject.c:_Py_XNewRef
sentinelobject.c:_Py_XNewRef
Line
Count
Source
541
6
{
542
6
    Py_XINCREF(obj);
543
6
    return obj;
544
6
}
Unexecuted instantiation: setobject.c:_Py_XNewRef
Unexecuted instantiation: sliceobject.c:_Py_XNewRef
Unexecuted instantiation: structseq.c:_Py_XNewRef
Unexecuted instantiation: templateobject.c:_Py_XNewRef
Unexecuted instantiation: tupleobject.c:_Py_XNewRef
typeobject.c:_Py_XNewRef
Line
Count
Source
541
9.81k
{
542
9.81k
    Py_XINCREF(obj);
543
9.81k
    return obj;
544
9.81k
}
Unexecuted instantiation: typevarobject.c:_Py_XNewRef
Unexecuted instantiation: unicode_formatter.c:_Py_XNewRef
Unexecuted instantiation: unicode_writer.c:_Py_XNewRef
Unexecuted instantiation: unicodectype.c:_Py_XNewRef
Unexecuted instantiation: unicodeobject.c:_Py_XNewRef
Unexecuted instantiation: unionobject.c:_Py_XNewRef
weakrefobject.c:_Py_XNewRef
Line
Count
Source
541
12.6k
{
542
12.6k
    Py_XINCREF(obj);
543
12.6k
    return obj;
544
12.6k
}
Unexecuted instantiation: _warnings.c:_Py_XNewRef
bltinmodule.c:_Py_XNewRef
Line
Count
Source
541
180
{
542
180
    Py_XINCREF(obj);
543
180
    return obj;
544
180
}
ceval.c:_Py_XNewRef
Line
Count
Source
541
13.0M
{
542
13.0M
    Py_XINCREF(obj);
543
13.0M
    return obj;
544
13.0M
}
Unexecuted instantiation: codecs.c:_Py_XNewRef
Unexecuted instantiation: codegen.c:_Py_XNewRef
compile.c:_Py_XNewRef
Line
Count
Source
541
102k
{
542
102k
    Py_XINCREF(obj);
543
102k
    return obj;
544
102k
}
context.c:_Py_XNewRef
Line
Count
Source
541
32
{
542
32
    Py_XINCREF(obj);
543
32
    return obj;
544
32
}
Unexecuted instantiation: errors.c:_Py_XNewRef
Unexecuted instantiation: flowgraph.c:_Py_XNewRef
Unexecuted instantiation: frame.c:_Py_XNewRef
Unexecuted instantiation: future.c:_Py_XNewRef
Unexecuted instantiation: gc.c:_Py_XNewRef
Unexecuted instantiation: gc_gil.c:_Py_XNewRef
Unexecuted instantiation: getargs.c:_Py_XNewRef
Unexecuted instantiation: ceval_gil.c:_Py_XNewRef
Unexecuted instantiation: hamt.c:_Py_XNewRef
Unexecuted instantiation: hashtable.c:_Py_XNewRef
import.c:_Py_XNewRef
Line
Count
Source
541
556
{
542
556
    Py_XINCREF(obj);
543
556
    return obj;
544
556
}
Unexecuted instantiation: importdl.c:_Py_XNewRef
Unexecuted instantiation: initconfig.c:_Py_XNewRef
Unexecuted instantiation: instrumentation.c:_Py_XNewRef
Unexecuted instantiation: instruction_sequence.c:_Py_XNewRef
Unexecuted instantiation: intrinsics.c:_Py_XNewRef
Unexecuted instantiation: legacy_tracing.c:_Py_XNewRef
Unexecuted instantiation: lock.c:_Py_XNewRef
Unexecuted instantiation: marshal.c:_Py_XNewRef
Unexecuted instantiation: modsupport.c:_Py_XNewRef
Unexecuted instantiation: mysnprintf.c:_Py_XNewRef
Unexecuted instantiation: parking_lot.c:_Py_XNewRef
Unexecuted instantiation: preconfig.c:_Py_XNewRef
Unexecuted instantiation: pyarena.c:_Py_XNewRef
Unexecuted instantiation: pyctype.c:_Py_XNewRef
Unexecuted instantiation: pyhash.c:_Py_XNewRef
Unexecuted instantiation: pylifecycle.c:_Py_XNewRef
pystate.c:_Py_XNewRef
Line
Count
Source
541
1.24M
{
542
1.24M
    Py_XINCREF(obj);
543
1.24M
    return obj;
544
1.24M
}
Unexecuted instantiation: pythonrun.c:_Py_XNewRef
Unexecuted instantiation: pytime.c:_Py_XNewRef
Unexecuted instantiation: qsbr.c:_Py_XNewRef
Unexecuted instantiation: bootstrap_hash.c:_Py_XNewRef
Unexecuted instantiation: specialize.c:_Py_XNewRef
Unexecuted instantiation: slots.c:_Py_XNewRef
Unexecuted instantiation: slots_generated.c:_Py_XNewRef
structmember.c:_Py_XNewRef
Line
Count
Source
541
3.69k
{
542
3.69k
    Py_XINCREF(obj);
543
3.69k
    return obj;
544
3.69k
}
Unexecuted instantiation: symtable.c:_Py_XNewRef
sysmodule.c:_Py_XNewRef
Line
Count
Source
541
21
{
542
21
    Py_XINCREF(obj);
543
21
    return obj;
544
21
}
Unexecuted instantiation: thread.c:_Py_XNewRef
traceback.c:_Py_XNewRef
Line
Count
Source
541
6.88M
{
542
6.88M
    Py_XINCREF(obj);
543
6.88M
    return obj;
544
6.88M
}
Unexecuted instantiation: tracemalloc.c:_Py_XNewRef
Unexecuted instantiation: typecache.c:_Py_XNewRef
Unexecuted instantiation: getopt.c:_Py_XNewRef
Unexecuted instantiation: pystrcmp.c:_Py_XNewRef
Unexecuted instantiation: pystrtod.c:_Py_XNewRef
Unexecuted instantiation: dtoa.c:_Py_XNewRef
Unexecuted instantiation: fileutils.c:_Py_XNewRef
Unexecuted instantiation: suggestions.c:_Py_XNewRef
Unexecuted instantiation: perf_trampoline.c:_Py_XNewRef
Unexecuted instantiation: perf_jit_trampoline.c:_Py_XNewRef
Unexecuted instantiation: jit_unwind.c:_Py_XNewRef
Unexecuted instantiation: remote_debugging.c:_Py_XNewRef
Unexecuted instantiation: dynload_shlib.c:_Py_XNewRef
Unexecuted instantiation: config.c:_Py_XNewRef
Unexecuted instantiation: gcmodule.c:_Py_XNewRef
Unexecuted instantiation: _asynciomodule.c:_Py_XNewRef
Unexecuted instantiation: atexitmodule.c:_Py_XNewRef
Unexecuted instantiation: faulthandler.c:_Py_XNewRef
Unexecuted instantiation: posixmodule.c:_Py_XNewRef
Unexecuted instantiation: signalmodule.c:_Py_XNewRef
Unexecuted instantiation: _tracemalloc.c:_Py_XNewRef
Unexecuted instantiation: _suggestions.c:_Py_XNewRef
_datetimemodule.c:_Py_XNewRef
Line
Count
Source
541
42
{
542
42
    Py_XINCREF(obj);
543
42
    return obj;
544
42
}
Unexecuted instantiation: _codecsmodule.c:_Py_XNewRef
_collectionsmodule.c:_Py_XNewRef
Line
Count
Source
541
4
{
542
4
    Py_XINCREF(obj);
543
4
    return obj;
544
4
}
Unexecuted instantiation: errnomodule.c:_Py_XNewRef
Unexecuted instantiation: _iomodule.c:_Py_XNewRef
Unexecuted instantiation: iobase.c:_Py_XNewRef
Unexecuted instantiation: fileio.c:_Py_XNewRef
Unexecuted instantiation: bytesio.c:_Py_XNewRef
Unexecuted instantiation: bufferedio.c:_Py_XNewRef
Unexecuted instantiation: textio.c:_Py_XNewRef
Unexecuted instantiation: stringio.c:_Py_XNewRef
Unexecuted instantiation: itertoolsmodule.c:_Py_XNewRef
Unexecuted instantiation: sre.c:_Py_XNewRef
Unexecuted instantiation: _sysconfig.c:_Py_XNewRef
Unexecuted instantiation: _threadmodule.c:_Py_XNewRef
Unexecuted instantiation: timemodule.c:_Py_XNewRef
Unexecuted instantiation: _typesmodule.c:_Py_XNewRef
Unexecuted instantiation: _typingmodule.c:_Py_XNewRef
Unexecuted instantiation: _weakref.c:_Py_XNewRef
_abc.c:_Py_XNewRef
Line
Count
Source
541
804
{
542
804
    Py_XINCREF(obj);
543
804
    return obj;
544
804
}
Unexecuted instantiation: _functoolsmodule.c:_Py_XNewRef
Unexecuted instantiation: _localemodule.c:_Py_XNewRef
Unexecuted instantiation: _opcode.c:_Py_XNewRef
Unexecuted instantiation: _operator.c:_Py_XNewRef
Unexecuted instantiation: _stat.c:_Py_XNewRef
Unexecuted instantiation: symtablemodule.c:_Py_XNewRef
Unexecuted instantiation: pwdmodule.c:_Py_XNewRef
getpath.c:_Py_XNewRef
Line
Count
Source
541
84
{
542
84
    Py_XINCREF(obj);
543
84
    return obj;
544
84
}
Unexecuted instantiation: frozen.c:_Py_XNewRef
Unexecuted instantiation: getbuildinfo.c:_Py_XNewRef
Unexecuted instantiation: peg_api.c:_Py_XNewRef
Unexecuted instantiation: file_tokenizer.c:_Py_XNewRef
Unexecuted instantiation: helpers.c:_Py_XNewRef
Unexecuted instantiation: myreadline.c:_Py_XNewRef
abstract.c:_Py_XNewRef
Line
Count
Source
541
1.07M
{
542
1.07M
    Py_XINCREF(obj);
543
1.07M
    return obj;
544
1.07M
}
Unexecuted instantiation: boolobject.c:_Py_XNewRef
Unexecuted instantiation: bytes_methods.c:_Py_XNewRef
Unexecuted instantiation: bytearrayobject.c:_Py_XNewRef
Unexecuted instantiation: bytesobject.c:_Py_XNewRef
Unexecuted instantiation: call.c:_Py_XNewRef
Unexecuted instantiation: capsule.c:_Py_XNewRef
cellobject.c:_Py_XNewRef
Line
Count
Source
541
3.45M
{
542
3.45M
    Py_XINCREF(obj);
543
3.45M
    return obj;
544
3.45M
}
Unexecuted instantiation: classobject.c:_Py_XNewRef
Unexecuted instantiation: codeobject.c:_Py_XNewRef
Unexecuted instantiation: complexobject.c:_Py_XNewRef
descrobject.c:_Py_XNewRef
Line
Count
Source
541
52.9k
{
542
52.9k
    Py_XINCREF(obj);
543
52.9k
    return obj;
544
52.9k
}
Unexecuted instantiation: enumobject.c:_Py_XNewRef
Unexecuted instantiation: genobject.c:_Py_XNewRef
Unexecuted instantiation: fileobject.c:_Py_XNewRef
Unexecuted instantiation: floatobject.c:_Py_XNewRef
frameobject.c:_Py_XNewRef
Line
Count
Source
541
180M
{
542
180M
    Py_XINCREF(obj);
543
180M
    return obj;
544
180M
}
funcobject.c:_Py_XNewRef
Line
Count
Source
541
2.19k
{
542
2.19k
    Py_XINCREF(obj);
543
2.19k
    return obj;
544
2.19k
}
Unexecuted instantiation: interpolationobject.c:_Py_XNewRef
Unexecuted instantiation: iterobject.c:_Py_XNewRef
lazyimportobject.c:_Py_XNewRef
Line
Count
Source
541
224
{
542
224
    Py_XINCREF(obj);
543
224
    return obj;
544
224
}
Unexecuted instantiation: odictobject.c:_Py_XNewRef
memoryobject.c:_Py_XNewRef
Line
Count
Source
541
414
{
542
414
    Py_XINCREF(obj);
543
414
    return obj;
544
414
}
methodobject.c:_Py_XNewRef
Line
Count
Source
541
18.7M
{
542
18.7M
    Py_XINCREF(obj);
543
18.7M
    return obj;
544
18.7M
}
Unexecuted instantiation: namespaceobject.c:_Py_XNewRef
Unexecuted instantiation: unicode_format.c:_Py_XNewRef
Unexecuted instantiation: _contextvars.c:_Py_XNewRef
Unexecuted instantiation: Python-ast.c:_Py_XNewRef
Unexecuted instantiation: Python-tokenize.c:_Py_XNewRef
Unexecuted instantiation: asdl.c:_Py_XNewRef
Unexecuted instantiation: assemble.c:_Py_XNewRef
Unexecuted instantiation: ast.c:_Py_XNewRef
Unexecuted instantiation: ast_preprocess.c:_Py_XNewRef
Unexecuted instantiation: ast_unparse.c:_Py_XNewRef
Unexecuted instantiation: critical_section.c:_Py_XNewRef
Unexecuted instantiation: crossinterp.c:_Py_XNewRef
Unexecuted instantiation: getcopyright.c:_Py_XNewRef
Unexecuted instantiation: getplatform.c:_Py_XNewRef
Unexecuted instantiation: getversion.c:_Py_XNewRef
Unexecuted instantiation: optimizer.c:_Py_XNewRef
Unexecuted instantiation: pathconfig.c:_Py_XNewRef
Unexecuted instantiation: pymath.c:_Py_XNewRef
Unexecuted instantiation: pystrhex.c:_Py_XNewRef
pegen.c:_Py_XNewRef
Line
Count
Source
541
22.6k
{
542
22.6k
    Py_XINCREF(obj);
543
22.6k
    return obj;
544
22.6k
}
Unexecuted instantiation: pegen_errors.c:_Py_XNewRef
Unexecuted instantiation: parser.c:_Py_XNewRef
Unexecuted instantiation: buffer.c:_Py_XNewRef
Unexecuted instantiation: lexer.c:_Py_XNewRef
Unexecuted instantiation: number.c:_Py_XNewRef
Unexecuted instantiation: state.c:_Py_XNewRef
Unexecuted instantiation: string.c:_Py_XNewRef
Unexecuted instantiation: readline_tokenizer.c:_Py_XNewRef
Unexecuted instantiation: string_tokenizer.c:_Py_XNewRef
Unexecuted instantiation: utf8_tokenizer.c:_Py_XNewRef
Unexecuted instantiation: getcompiler.c:_Py_XNewRef
Unexecuted instantiation: mystrtoul.c:_Py_XNewRef
Unexecuted instantiation: token.c:_Py_XNewRef
Unexecuted instantiation: action_helpers.c:_Py_XNewRef
Unexecuted instantiation: string_parser.c:_Py_XNewRef
545
546
// Py_NewRef() and Py_XNewRef() are exported as functions for the stable ABI.
547
// Names overridden with macros by static inline functions for best
548
// performances.
549
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
550
1.53G
#  define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj))
551
240M
#  define Py_XNewRef(obj) _Py_XNewRef(_PyObject_CAST(obj))
552
#else
553
#  define Py_NewRef(obj) _Py_NewRef(obj)
554
#  define Py_XNewRef(obj) _Py_XNewRef(obj)
555
#endif
556
557
558
#ifdef __cplusplus
559
}
560
#endif
561
#endif   // !_Py_REFCOUNT_H