Coverage Report

Created: 2026-12-01 06:09

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/cpython/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
16.4G
#define _Py_IMMORTAL_INITIAL_REFCNT (3ULL << 30)
48
558
#define _Py_IMMORTAL_MINIMUM_REFCNT (1ULL << 31)
49
244M
#define _Py_STATIC_FLAG_BITS ((Py_ssize_t)(_Py_STATICALLY_ALLOCATED_FLAG | _Py_IMMORTAL_FLAGS))
50
244M
#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 >= _Py_PACK_VERSION(3, 14)
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
1.36G
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
1.36G
    #if !defined(Py_GIL_DISABLED)
107
1.36G
        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.36G
    }
bytesobject.c:_Py_REFCNT
Line
Count
Source
105
8.18M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
8.18M
    #if !defined(Py_GIL_DISABLED)
107
8.18M
        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.18M
    }
Unexecuted instantiation: call.c:_Py_REFCNT
Unexecuted instantiation: exceptions.c:_Py_REFCNT
Unexecuted instantiation: genericaliasobject.c:_Py_REFCNT
Unexecuted instantiation: floatobject.c:_Py_REFCNT
listobject.c:_Py_REFCNT
Line
Count
Source
105
558
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
558
    #if !defined(Py_GIL_DISABLED)
107
558
        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
558
    }
longobject.c:_Py_REFCNT
Line
Count
Source
105
21.9k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
21.9k
    #if !defined(Py_GIL_DISABLED)
107
21.9k
        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.9k
    }
dictobject.c:_Py_REFCNT
Line
Count
Source
105
310M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
310M
    #if !defined(Py_GIL_DISABLED)
107
310M
        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
310M
    }
Unexecuted instantiation: memoryobject.c:_Py_REFCNT
Unexecuted instantiation: moduleobject.c:_Py_REFCNT
object.c:_Py_REFCNT
Line
Count
Source
105
140M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
140M
    #if !defined(Py_GIL_DISABLED)
107
140M
        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
140M
    }
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
4.47k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
4.47k
    #if !defined(Py_GIL_DISABLED)
107
4.47k
        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.47k
    }
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
151k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
151k
    #if !defined(Py_GIL_DISABLED)
107
151k
        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
151k
    }
typeobject.c:_Py_REFCNT
Line
Count
Source
105
634
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
634
    #if !defined(Py_GIL_DISABLED)
107
634
        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
634
    }
Unexecuted instantiation: typevarobject.c:_Py_REFCNT
unicode_format.c:_Py_REFCNT
Line
Count
Source
105
4.87M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
4.87M
    #if !defined(Py_GIL_DISABLED)
107
4.87M
        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.87M
    }
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
69.8M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
69.8M
    #if !defined(Py_GIL_DISABLED)
107
69.8M
        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
69.8M
    }
Unexecuted instantiation: unionobject.c:_Py_REFCNT
weakrefobject.c:_Py_REFCNT
Line
Count
Source
105
56.7M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
56.7M
    #if !defined(Py_GIL_DISABLED)
107
56.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
56.7M
    }
Unexecuted instantiation: _warnings.c:_Py_REFCNT
bltinmodule.c:_Py_REFCNT
Line
Count
Source
105
2.37M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
2.37M
    #if !defined(Py_GIL_DISABLED)
107
2.37M
        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
2.37M
    }
Unexecuted instantiation: ceval.c:_Py_REFCNT
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
56.1M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
56.1M
    #if !defined(Py_GIL_DISABLED)
107
56.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
56.1M
    }
Unexecuted instantiation: future.c:_Py_REFCNT
gc.c:_Py_REFCNT
Line
Count
Source
105
612M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
612M
    #if !defined(Py_GIL_DISABLED)
107
612M
        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
612M
    }
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
37
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
37
    #if !defined(Py_GIL_DISABLED)
107
37
        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
37
    }
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
Unexecuted instantiation: intrinsics.c:_Py_REFCNT
Unexecuted instantiation: legacy_tracing.c:_Py_REFCNT
Unexecuted instantiation: lock.c:_Py_REFCNT
marshal.c:_Py_REFCNT
Line
Count
Source
105
52.7k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
52.7k
    #if !defined(Py_GIL_DISABLED)
107
52.7k
        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
52.7k
    }
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: pymath.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
sysmodule.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
    }
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: pystrhex.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
92.6k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
92.6k
    #if !defined(Py_GIL_DISABLED)
107
92.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
92.6k
    }
Unexecuted instantiation: fileio.c:_Py_REFCNT
bytesio.c:_Py_REFCNT
Line
Count
Source
105
14.0k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
14.0k
    #if !defined(Py_GIL_DISABLED)
107
14.0k
        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.0k
    }
Unexecuted instantiation: bufferedio.c:_Py_REFCNT
Unexecuted instantiation: textio.c:_Py_REFCNT
Unexecuted instantiation: stringio.c:_Py_REFCNT
itertoolsmodule.c:_Py_REFCNT
Line
Count
Source
105
830
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
830
    #if !defined(Py_GIL_DISABLED)
107
830
        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
830
    }
Unexecuted instantiation: sre.c:_Py_REFCNT
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
173k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
173k
    #if !defined(Py_GIL_DISABLED)
107
173k
        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
173k
    }
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: reader.c:_Py_REFCNT
Unexecuted instantiation: source.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
Unexecuted instantiation: capsule.c:_Py_REFCNT
Unexecuted instantiation: cellobject.c:_Py_REFCNT
Unexecuted instantiation: classobject.c:_Py_REFCNT
codeobject.c:_Py_REFCNT
Line
Count
Source
105
35.9k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
35.9k
    #if !defined(Py_GIL_DISABLED)
107
35.9k
        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
35.9k
    }
Unexecuted instantiation: complexobject.c:_Py_REFCNT
Unexecuted instantiation: descrobject.c:_Py_REFCNT
enumobject.c:_Py_REFCNT
Line
Count
Source
105
69.0M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
69.0M
    #if !defined(Py_GIL_DISABLED)
107
69.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
69.0M
    }
Unexecuted instantiation: genobject.c:_Py_REFCNT
Unexecuted instantiation: fileobject.c:_Py_REFCNT
Unexecuted instantiation: frameobject.c:_Py_REFCNT
funcobject.c:_Py_REFCNT
Line
Count
Source
105
30.8M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
30.8M
    #if !defined(Py_GIL_DISABLED)
107
30.8M
        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
30.8M
    }
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: methodobject.c:_Py_REFCNT
Unexecuted instantiation: namespaceobject.c:_Py_REFCNT
Unexecuted instantiation: _contextvars.c:_Py_REFCNT
Unexecuted instantiation: _strptime.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: pegen.c:_Py_REFCNT
Unexecuted instantiation: pegen_errors.c:_Py_REFCNT
Unexecuted instantiation: parser.c:_Py_REFCNT
Unexecuted instantiation: parser_invalid.c:_Py_REFCNT
Unexecuted instantiation: lexer.c:_Py_REFCNT
Unexecuted instantiation: layout.c:_Py_REFCNT
Unexecuted instantiation: number.c:_Py_REFCNT
Unexecuted instantiation: state.c:_Py_REFCNT
Unexecuted instantiation: string.c:_Py_REFCNT
Unexecuted instantiation: decoder.c:_Py_REFCNT
Unexecuted instantiation: api.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 < _Py_PACK_VERSION(3, 11)
119
1.14G
    #  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
29.4G
{
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.4G
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
29.4G
}
bytesobject.c:_Py_IsImmortal
Line
Count
Source
127
26.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
26.6M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
26.6M
}
call.c:_Py_IsImmortal
Line
Count
Source
127
202M
{
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
202M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
202M
}
exceptions.c:_Py_IsImmortal
Line
Count
Source
127
226M
{
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
226M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
226M
}
genericaliasobject.c:_Py_IsImmortal
Line
Count
Source
127
296
{
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
296
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
296
}
floatobject.c:_Py_IsImmortal
Line
Count
Source
127
478k
{
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
478k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
478k
}
listobject.c:_Py_IsImmortal
Line
Count
Source
127
2.30G
{
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.30G
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
2.30G
}
longobject.c:_Py_IsImmortal
Line
Count
Source
127
72.1M
{
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
72.1M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
72.1M
}
dictobject.c:_Py_IsImmortal
Line
Count
Source
127
1.16G
{
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.16G
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.16G
}
memoryobject.c:_Py_IsImmortal
Line
Count
Source
127
6.30M
{
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.30M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
6.30M
}
moduleobject.c:_Py_IsImmortal
Line
Count
Source
127
3.05M
{
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.05M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
3.05M
}
object.c:_Py_IsImmortal
Line
Count
Source
127
1.07G
{
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.07G
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.07G
}
Unexecuted instantiation: obmalloc.c:_Py_IsImmortal
Unexecuted instantiation: picklebufobject.c:_Py_IsImmortal
rangeobject.c:_Py_IsImmortal
Line
Count
Source
127
40.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
40.7M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
40.7M
}
sentinelobject.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
}
setobject.c:_Py_IsImmortal
Line
Count
Source
127
51.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
51.0M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
51.0M
}
sliceobject.c:_Py_IsImmortal
Line
Count
Source
127
168M
{
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
168M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
168M
}
structseq.c:_Py_IsImmortal
Line
Count
Source
127
4.80M
{
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.80M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
4.80M
}
templateobject.c:_Py_IsImmortal
Line
Count
Source
127
22
{
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
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
22
}
tupleobject.c:_Py_IsImmortal
Line
Count
Source
127
6.02G
{
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.02G
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
6.02G
}
typeobject.c:_Py_IsImmortal
Line
Count
Source
127
479M
{
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
479M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
479M
}
typevarobject.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
}
unicode_format.c:_Py_IsImmortal
Line
Count
Source
127
16.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
16.7M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
16.7M
}
unicode_formatter.c:_Py_IsImmortal
Line
Count
Source
127
45.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
45.3M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
45.3M
}
unicode_writer.c:_Py_IsImmortal
Line
Count
Source
127
38.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
38.5M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
38.5M
}
Unexecuted instantiation: unicodectype.c:_Py_IsImmortal
unicodeobject.c:_Py_IsImmortal
Line
Count
Source
127
165M
{
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
165M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
165M
}
unionobject.c:_Py_IsImmortal
Line
Count
Source
127
4.43k
{
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.43k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
4.43k
}
weakrefobject.c:_Py_IsImmortal
Line
Count
Source
127
312k
{
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
312k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
312k
}
_warnings.c:_Py_IsImmortal
Line
Count
Source
127
59.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
59.0M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
59.0M
}
bltinmodule.c:_Py_IsImmortal
Line
Count
Source
127
1.82G
{
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.82G
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.82G
}
ceval.c:_Py_IsImmortal
Line
Count
Source
127
11.8G
{
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
11.8G
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
11.8G
}
codecs.c:_Py_IsImmortal
Line
Count
Source
127
31.1M
{
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.1M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
31.1M
}
codegen.c:_Py_IsImmortal
Line
Count
Source
127
55.1k
{
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.1k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
55.1k
}
compile.c:_Py_IsImmortal
Line
Count
Source
127
314k
{
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
314k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
314k
}
context.c:_Py_IsImmortal
Line
Count
Source
127
74
{
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
74
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
74
}
errors.c:_Py_IsImmortal
Line
Count
Source
127
49.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
49.5M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
49.5M
}
flowgraph.c:_Py_IsImmortal
Line
Count
Source
127
56.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
56.0k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
56.0k
}
frame.c:_Py_IsImmortal
Line
Count
Source
127
123M
{
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
123M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
123M
}
future.c:_Py_IsImmortal
Line
Count
Source
127
165
{
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
165
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
165
}
gc.c:_Py_IsImmortal
Line
Count
Source
127
614M
{
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
614M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
614M
}
Unexecuted instantiation: gc_gil.c:_Py_IsImmortal
getargs.c:_Py_IsImmortal
Line
Count
Source
127
14.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
14.2M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
14.2M
}
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
19.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
19.7M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
19.7M
}
importdl.c:_Py_IsImmortal
Line
Count
Source
127
4.32k
{
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.32k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
4.32k
}
initconfig.c:_Py_IsImmortal
Line
Count
Source
127
5.32k
{
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.32k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
5.32k
}
instrumentation.c:_Py_IsImmortal
Line
Count
Source
127
888
{
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
888
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
888
}
Unexecuted instantiation: instruction_sequence.c:_Py_IsImmortal
intrinsics.c:_Py_IsImmortal
Line
Count
Source
127
83.2k
{
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
83.2k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
83.2k
}
Unexecuted instantiation: legacy_tracing.c:_Py_IsImmortal
Unexecuted instantiation: lock.c:_Py_IsImmortal
marshal.c:_Py_IsImmortal
Line
Count
Source
127
1.01M
{
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.01M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.01M
}
modsupport.c:_Py_IsImmortal
Line
Count
Source
127
57.1k
{
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.1k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
57.1k
}
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
1.08M
{
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.08M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.08M
}
Unexecuted instantiation: pyctype.c:_Py_IsImmortal
Unexecuted instantiation: pyhash.c:_Py_IsImmortal
pylifecycle.c:_Py_IsImmortal
Line
Count
Source
127
1.33k
{
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.33k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.33k
}
Unexecuted instantiation: pymath.c:_Py_IsImmortal
Unexecuted instantiation: pystate.c:_Py_IsImmortal
pythonrun.c:_Py_IsImmortal
Line
Count
Source
127
1.82k
{
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.82k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.82k
}
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
3.37M
{
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.37M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
3.37M
}
Unexecuted instantiation: slots.c:_Py_IsImmortal
Unexecuted instantiation: slots_generated.c:_Py_IsImmortal
structmember.c:_Py_IsImmortal
Line
Count
Source
127
1.87k
{
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.87k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.87k
}
symtable.c:_Py_IsImmortal
Line
Count
Source
127
333k
{
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
333k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
333k
}
sysmodule.c:_Py_IsImmortal
Line
Count
Source
127
2.42M
{
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.42M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
2.42M
}
Unexecuted instantiation: thread.c:_Py_IsImmortal
traceback.c:_Py_IsImmortal
Line
Count
Source
127
177M
{
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
177M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
177M
}
Unexecuted instantiation: tracemalloc.c:_Py_IsImmortal
typecache.c:_Py_IsImmortal
Line
Count
Source
127
771M
{
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
771M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
771M
}
Unexecuted instantiation: getopt.c:_Py_IsImmortal
Unexecuted instantiation: pystrcmp.c:_Py_IsImmortal
Unexecuted instantiation: pystrtod.c:_Py_IsImmortal
Unexecuted instantiation: pystrhex.c:_Py_IsImmortal
Unexecuted instantiation: dtoa.c:_Py_IsImmortal
fileutils.c:_Py_IsImmortal
Line
Count
Source
127
54.2k
{
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.2k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
54.2k
}
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
atexitmodule.c:_Py_IsImmortal
Line
Count
Source
127
20
{
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
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
20
}
Unexecuted instantiation: faulthandler.c:_Py_IsImmortal
posixmodule.c:_Py_IsImmortal
Line
Count
Source
127
2.79M
{
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.79M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
2.79M
}
signalmodule.c:_Py_IsImmortal
Line
Count
Source
127
74
{
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
74
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
74
}
Unexecuted instantiation: _tracemalloc.c:_Py_IsImmortal
Unexecuted instantiation: _suggestions.c:_Py_IsImmortal
_datetimemodule.c:_Py_IsImmortal
Line
Count
Source
127
15.8k
{
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
15.8k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
15.8k
}
Unexecuted instantiation: _codecsmodule.c:_Py_IsImmortal
_collectionsmodule.c:_Py_IsImmortal
Line
Count
Source
127
611k
{
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
611k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
611k
}
Unexecuted instantiation: errnomodule.c:_Py_IsImmortal
_iomodule.c:_Py_IsImmortal
Line
Count
Source
127
1.56M
{
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.56M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.56M
}
iobase.c:_Py_IsImmortal
Line
Count
Source
127
1.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
1.76M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.76M
}
fileio.c:_Py_IsImmortal
Line
Count
Source
127
44.2k
{
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.2k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
44.2k
}
bytesio.c:_Py_IsImmortal
Line
Count
Source
127
333k
{
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
333k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
333k
}
bufferedio.c:_Py_IsImmortal
Line
Count
Source
127
7.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
7.76M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
7.76M
}
textio.c:_Py_IsImmortal
Line
Count
Source
127
1.13M
{
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.13M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.13M
}
stringio.c:_Py_IsImmortal
Line
Count
Source
127
329k
{
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
329k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
329k
}
itertoolsmodule.c:_Py_IsImmortal
Line
Count
Source
127
106k
{
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
106k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
106k
}
sre.c:_Py_IsImmortal
Line
Count
Source
127
258M
{
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
258M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
258M
}
Unexecuted instantiation: _sysconfig.c:_Py_IsImmortal
_threadmodule.c:_Py_IsImmortal
Line
Count
Source
127
7.61M
{
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.61M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
7.61M
}
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
74.8k
{
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
74.8k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
74.8k
}
_functoolsmodule.c:_Py_IsImmortal
Line
Count
Source
127
907k
{
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
907k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
907k
}
Unexecuted instantiation: _localemodule.c:_Py_IsImmortal
Unexecuted instantiation: _opcode.c:_Py_IsImmortal
_operator.c:_Py_IsImmortal
Line
Count
Source
127
693k
{
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
693k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
693k
}
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
1.51k
{
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.51k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.51k
}
Unexecuted instantiation: frozen.c:_Py_IsImmortal
Unexecuted instantiation: getbuildinfo.c:_Py_IsImmortal
Unexecuted instantiation: peg_api.c:_Py_IsImmortal
reader.c:_Py_IsImmortal
Line
Count
Source
127
16
{
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
16
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
16
}
Unexecuted instantiation: source.c:_Py_IsImmortal
helpers.c:_Py_IsImmortal
Line
Count
Source
127
33.1k
{
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
33.1k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
33.1k
}
Unexecuted instantiation: myreadline.c:_Py_IsImmortal
abstract.c:_Py_IsImmortal
Line
Count
Source
127
526M
{
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
526M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
526M
}
Unexecuted instantiation: boolobject.c:_Py_IsImmortal
Unexecuted instantiation: bytes_methods.c:_Py_IsImmortal
bytearrayobject.c:_Py_IsImmortal
Line
Count
Source
127
29.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
29.0M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
29.0M
}
capsule.c:_Py_IsImmortal
Line
Count
Source
127
20
{
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
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
20
}
cellobject.c:_Py_IsImmortal
Line
Count
Source
127
8.89M
{
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.89M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
8.89M
}
classobject.c:_Py_IsImmortal
Line
Count
Source
127
96.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
96.3M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
96.3M
}
codeobject.c:_Py_IsImmortal
Line
Count
Source
127
222k
{
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
222k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
222k
}
Unexecuted instantiation: complexobject.c:_Py_IsImmortal
descrobject.c:_Py_IsImmortal
Line
Count
Source
127
51.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
51.9M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
51.9M
}
enumobject.c:_Py_IsImmortal
Line
Count
Source
127
208M
{
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
208M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
208M
}
genobject.c:_Py_IsImmortal
Line
Count
Source
127
178M
{
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
178M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
178M
}
fileobject.c:_Py_IsImmortal
Line
Count
Source
127
264k
{
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
264k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
264k
}
frameobject.c:_Py_IsImmortal
Line
Count
Source
127
40.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
40.2M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
40.2M
}
funcobject.c:_Py_IsImmortal
Line
Count
Source
127
172M
{
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
172M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
172M
}
interpolationobject.c:_Py_IsImmortal
Line
Count
Source
127
53
{
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
53
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
53
}
iterobject.c:_Py_IsImmortal
Line
Count
Source
127
11.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
11.9M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
11.9M
}
lazyimportobject.c:_Py_IsImmortal
Line
Count
Source
127
332
{
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
332
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
332
}
odictobject.c:_Py_IsImmortal
Line
Count
Source
127
19.3k
{
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.3k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
19.3k
}
methodobject.c:_Py_IsImmortal
Line
Count
Source
127
195M
{
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
195M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
195M
}
namespaceobject.c:_Py_IsImmortal
Line
Count
Source
127
49
{
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
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
49
}
Unexecuted instantiation: _contextvars.c:_Py_IsImmortal
Unexecuted instantiation: _strptime.c:_Py_IsImmortal
Python-ast.c:_Py_IsImmortal
Line
Count
Source
127
3.16M
{
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.16M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
3.16M
}
Python-tokenize.c:_Py_IsImmortal
Line
Count
Source
127
492
{
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
492
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
492
}
Unexecuted instantiation: asdl.c:_Py_IsImmortal
assemble.c:_Py_IsImmortal
Line
Count
Source
127
26.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
26.9k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
26.9k
}
Unexecuted instantiation: ast.c:_Py_IsImmortal
Unexecuted instantiation: ast_preprocess.c:_Py_IsImmortal
Unexecuted instantiation: ast_unparse.c:_Py_IsImmortal
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
pegen.c:_Py_IsImmortal
Line
Count
Source
127
113k
{
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
113k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
113k
}
pegen_errors.c:_Py_IsImmortal
Line
Count
Source
127
214k
{
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
214k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
214k
}
Unexecuted instantiation: parser.c:_Py_IsImmortal
Unexecuted instantiation: parser_invalid.c:_Py_IsImmortal
lexer.c:_Py_IsImmortal
Line
Count
Source
127
15.2k
{
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
15.2k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
15.2k
}
Unexecuted instantiation: layout.c:_Py_IsImmortal
Unexecuted instantiation: number.c:_Py_IsImmortal
state.c:_Py_IsImmortal
Line
Count
Source
127
65.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
65.5k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
65.5k
}
Unexecuted instantiation: string.c:_Py_IsImmortal
decoder.c:_Py_IsImmortal
Line
Count
Source
127
3.91k
{
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.91k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
3.91k
}
Unexecuted instantiation: api.c:_Py_IsImmortal
Unexecuted instantiation: getcompiler.c:_Py_IsImmortal
Unexecuted instantiation: mystrtoul.c:_Py_IsImmortal
Unexecuted instantiation: token.c:_Py_IsImmortal
action_helpers.c:_Py_IsImmortal
Line
Count
Source
127
511
{
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
511
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
511
}
string_parser.c:_Py_IsImmortal
Line
Count
Source
127
8.62k
{
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.62k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
8.62k
}
137
31.5G
#define _Py_IsImmortal(op) _Py_IsImmortal(_PyObject_CAST(op))
138
139
140
static inline Py_ALWAYS_INLINE int _Py_IsStaticImmortal(PyObject *op)
141
0
{
142
0
#if defined(Py_GIL_DISABLED) || SIZEOF_VOID_P > 4
143
0
    return (op->ob_flags & _Py_STATICALLY_ALLOCATED_FLAG) != 0;
144
#else
145
    return op->ob_refcnt >= _Py_STATIC_IMMORTAL_MINIMUM_REFCNT;
146
#endif
147
0
}
Unexecuted instantiation: bytesobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: call.c:_Py_IsStaticImmortal
Unexecuted instantiation: exceptions.c:_Py_IsStaticImmortal
Unexecuted instantiation: genericaliasobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: floatobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: listobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: longobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: dictobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: memoryobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: moduleobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: object.c:_Py_IsStaticImmortal
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
Unexecuted instantiation: typeobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: typevarobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: unicode_format.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
Unexecuted instantiation: ceval.c:_Py_IsStaticImmortal
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
Unexecuted instantiation: frame.c:_Py_IsStaticImmortal
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: pymath.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
Unexecuted instantiation: typecache.c:_Py_IsStaticImmortal
Unexecuted instantiation: getopt.c:_Py_IsStaticImmortal
Unexecuted instantiation: pystrcmp.c:_Py_IsStaticImmortal
Unexecuted instantiation: pystrtod.c:_Py_IsStaticImmortal
Unexecuted instantiation: pystrhex.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: reader.c:_Py_IsStaticImmortal
Unexecuted instantiation: source.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: 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
Unexecuted instantiation: genobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: fileobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: frameobject.c:_Py_IsStaticImmortal
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: methodobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: namespaceobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: _contextvars.c:_Py_IsStaticImmortal
Unexecuted instantiation: _strptime.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: pegen.c:_Py_IsStaticImmortal
Unexecuted instantiation: pegen_errors.c:_Py_IsStaticImmortal
Unexecuted instantiation: parser.c:_Py_IsStaticImmortal
Unexecuted instantiation: parser_invalid.c:_Py_IsStaticImmortal
Unexecuted instantiation: lexer.c:_Py_IsStaticImmortal
Unexecuted instantiation: layout.c:_Py_IsStaticImmortal
Unexecuted instantiation: number.c:_Py_IsStaticImmortal
Unexecuted instantiation: state.c:_Py_IsStaticImmortal
Unexecuted instantiation: string.c:_Py_IsStaticImmortal
Unexecuted instantiation: decoder.c:_Py_IsStaticImmortal
Unexecuted instantiation: api.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
432M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
432M
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 13)) \
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
432M
    if (_Py_IsImmortal(ob)) {
167
1.11k
        return;
168
1.11k
    }
169
432M
#ifndef Py_GIL_DISABLED
170
432M
#if SIZEOF_VOID_P > 4
171
432M
    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
432M
#endif  // Py_LIMITED_API
199
432M
}
Unexecuted instantiation: bytesobject.c:Py_SET_REFCNT
Unexecuted instantiation: call.c:Py_SET_REFCNT
Unexecuted instantiation: exceptions.c:Py_SET_REFCNT
Unexecuted instantiation: genericaliasobject.c:Py_SET_REFCNT
Unexecuted instantiation: floatobject.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
307M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
307M
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 13)) \
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
307M
    if (_Py_IsImmortal(ob)) {
167
0
        return;
168
0
    }
169
307M
#ifndef Py_GIL_DISABLED
170
307M
#if SIZEOF_VOID_P > 4
171
307M
    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
307M
#endif  // Py_LIMITED_API
199
307M
}
Unexecuted instantiation: memoryobject.c:Py_SET_REFCNT
moduleobject.c:Py_SET_REFCNT
Line
Count
Source
154
1.11k
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
1.11k
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 13)) \
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
1.11k
    if (_Py_IsImmortal(ob)) {
167
1.11k
        return;
168
1.11k
    }
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
93.9M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
93.9M
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 13)) \
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
93.9M
    if (_Py_IsImmortal(ob)) {
167
0
        return;
168
0
    }
169
93.9M
#ifndef Py_GIL_DISABLED
170
93.9M
#if SIZEOF_VOID_P > 4
171
93.9M
    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
93.9M
#endif  // Py_LIMITED_API
199
93.9M
}
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_format.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
310k
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
310k
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 13)) \
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
310k
    if (_Py_IsImmortal(ob)) {
167
0
        return;
168
0
    }
169
310k
#ifndef Py_GIL_DISABLED
170
310k
#if SIZEOF_VOID_P > 4
171
310k
    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
310k
#endif  // Py_LIMITED_API
199
310k
}
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: pymath.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: pystrhex.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: reader.c:Py_SET_REFCNT
Unexecuted instantiation: source.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: 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
35.9k
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
35.9k
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 13)) \
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
35.9k
    if (_Py_IsImmortal(ob)) {
167
0
        return;
168
0
    }
169
35.9k
#ifndef Py_GIL_DISABLED
170
35.9k
#if SIZEOF_VOID_P > 4
171
35.9k
    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
35.9k
#endif  // Py_LIMITED_API
199
35.9k
}
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: frameobject.c:Py_SET_REFCNT
funcobject.c:Py_SET_REFCNT
Line
Count
Source
154
30.8M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
30.8M
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 13)) \
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
30.8M
    if (_Py_IsImmortal(ob)) {
167
0
        return;
168
0
    }
169
30.8M
#ifndef Py_GIL_DISABLED
170
30.8M
#if SIZEOF_VOID_P > 4
171
30.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
30.8M
#endif  // Py_LIMITED_API
199
30.8M
}
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: methodobject.c:Py_SET_REFCNT
Unexecuted instantiation: namespaceobject.c:Py_SET_REFCNT
Unexecuted instantiation: _contextvars.c:Py_SET_REFCNT
Unexecuted instantiation: _strptime.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: pegen.c:Py_SET_REFCNT
Unexecuted instantiation: pegen_errors.c:Py_SET_REFCNT
Unexecuted instantiation: parser.c:Py_SET_REFCNT
Unexecuted instantiation: parser_invalid.c:Py_SET_REFCNT
Unexecuted instantiation: lexer.c:Py_SET_REFCNT
Unexecuted instantiation: layout.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: decoder.c:Py_SET_REFCNT
Unexecuted instantiation: api.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 < _Py_PACK_VERSION(3, 11)
201
432M
#  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
16.2G
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
16.2G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
8.37G
        _Py_INCREF_IMMORTAL_STAT_INC();
289
8.37G
        return;
290
8.37G
    }
291
7.86G
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
7.86G
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
7.86G
#endif
307
7.86G
}
bytesobject.c:Py_INCREF
Line
Count
Source
256
191M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
191M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
188M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
188M
        return;
290
188M
    }
291
2.23M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
2.23M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
2.23M
#endif
307
2.23M
}
call.c:Py_INCREF
Line
Count
Source
256
29.4M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
29.4M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
15.9M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
15.9M
        return;
290
15.9M
    }
291
13.5M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
13.5M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
13.5M
#endif
307
13.5M
}
exceptions.c:Py_INCREF
Line
Count
Source
256
204M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
204M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
49.6M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
49.6M
        return;
290
49.6M
    }
291
154M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
154M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
154M
#endif
307
154M
}
genericaliasobject.c:Py_INCREF
Line
Count
Source
256
2.19k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
2.19k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
1.64k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
1.64k
        return;
290
1.64k
    }
291
550
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
550
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
550
#endif
307
550
}
floatobject.c:Py_INCREF
Line
Count
Source
256
816k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
816k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
816k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
816k
        return;
290
816k
    }
291
0
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
0
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
0
#endif
307
0
}
listobject.c:Py_INCREF
Line
Count
Source
256
1.70G
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
1.70G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
364M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
364M
        return;
290
364M
    }
291
1.33G
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
1.33G
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
1.33G
#endif
307
1.33G
}
longobject.c:Py_INCREF
Line
Count
Source
256
117M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
117M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
117M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
117M
        return;
290
117M
    }
291
1.03k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
1.03k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
1.03k
#endif
307
1.03k
}
dictobject.c:Py_INCREF
Line
Count
Source
256
2.45G
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
2.45G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
393M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
393M
        return;
290
393M
    }
291
2.06G
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
2.06G
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
2.06G
#endif
307
2.06G
}
memoryobject.c:Py_INCREF
Line
Count
Source
256
6.16M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
6.16M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
114
        _Py_INCREF_IMMORTAL_STAT_INC();
289
114
        return;
290
114
    }
291
6.16M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
6.16M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
6.16M
#endif
307
6.16M
}
moduleobject.c:Py_INCREF
Line
Count
Source
256
3.90k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
3.90k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
2.36k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
2.36k
        return;
290
2.36k
    }
291
1.54k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
1.54k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
1.54k
#endif
307
1.54k
}
object.c:Py_INCREF
Line
Count
Source
256
1.05G
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
1.05G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
682M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
682M
        return;
290
682M
    }
291
369M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
369M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
369M
#endif
307
369M
}
Unexecuted instantiation: obmalloc.c:Py_INCREF
Unexecuted instantiation: picklebufobject.c:Py_INCREF
rangeobject.c:Py_INCREF
Line
Count
Source
256
2.40M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
2.40M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
2.38M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
2.38M
        return;
290
2.38M
    }
291
16.8k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
16.8k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
16.8k
#endif
307
16.8k
}
sentinelobject.c:Py_INCREF
Line
Count
Source
256
516
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
516
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
382
        _Py_INCREF_IMMORTAL_STAT_INC();
289
382
        return;
290
382
    }
291
134
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
134
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
134
#endif
307
134
}
setobject.c:Py_INCREF
Line
Count
Source
256
40.0M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
40.0M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
6.04M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
6.04M
        return;
290
6.04M
    }
291
33.9M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
33.9M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
33.9M
#endif
307
33.9M
}
sliceobject.c:Py_INCREF
Line
Count
Source
256
167M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
167M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
96.4M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
96.4M
        return;
290
96.4M
    }
291
70.9M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
70.9M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
70.9M
#endif
307
70.9M
}
structseq.c:Py_INCREF
Line
Count
Source
256
6.72k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
6.72k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
6.11k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
6.11k
        return;
290
6.11k
    }
291
611
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
611
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
611
#endif
307
611
}
templateobject.c:Py_INCREF
Line
Count
Source
256
22
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
22
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
7
        _Py_INCREF_IMMORTAL_STAT_INC();
289
7
        return;
290
7
    }
291
15
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
15
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
15
#endif
307
15
}
tupleobject.c:Py_INCREF
Line
Count
Source
256
5.53G
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
5.53G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
3.74G
        _Py_INCREF_IMMORTAL_STAT_INC();
289
3.74G
        return;
290
3.74G
    }
291
1.79G
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
1.79G
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
1.79G
#endif
307
1.79G
}
typeobject.c:Py_INCREF
Line
Count
Source
256
309M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
309M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
154M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
154M
        return;
290
154M
    }
291
154M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
154M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
154M
#endif
307
154M
}
typevarobject.c:Py_INCREF
Line
Count
Source
256
2.20k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
2.20k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
782
        _Py_INCREF_IMMORTAL_STAT_INC();
289
782
        return;
290
782
    }
291
1.42k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
1.42k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
1.42k
#endif
307
1.42k
}
unicode_format.c:Py_INCREF
Line
Count
Source
256
6.93M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
6.93M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
1.07M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
1.07M
        return;
290
1.07M
    }
291
5.86M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
5.86M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
5.86M
#endif
307
5.86M
}
Unexecuted instantiation: unicode_formatter.c:Py_INCREF
unicode_writer.c:Py_INCREF
Line
Count
Source
256
8.77M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
8.77M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
8.66M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
8.66M
        return;
290
8.66M
    }
291
116k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
116k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
116k
#endif
307
116k
}
Unexecuted instantiation: unicodectype.c:Py_INCREF
unicodeobject.c:Py_INCREF
Line
Count
Source
256
837M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
837M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
754M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
754M
        return;
290
754M
    }
291
83.5M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
83.5M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
83.5M
#endif
307
83.5M
}
unionobject.c:Py_INCREF
Line
Count
Source
256
924
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
924
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
580
        _Py_INCREF_IMMORTAL_STAT_INC();
289
580
        return;
290
580
    }
291
344
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
344
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
344
#endif
307
344
}
weakrefobject.c:Py_INCREF
Line
Count
Source
256
652k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
652k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
829
        _Py_INCREF_IMMORTAL_STAT_INC();
289
829
        return;
290
829
    }
291
651k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
651k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
651k
#endif
307
651k
}
_warnings.c:Py_INCREF
Line
Count
Source
256
3.69M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
3.69M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
1.92M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
1.92M
        return;
290
1.92M
    }
291
1.77M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
1.77M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
1.77M
#endif
307
1.77M
}
bltinmodule.c:Py_INCREF
Line
Count
Source
256
78.2M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
78.2M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
40.9M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
40.9M
        return;
290
40.9M
    }
291
37.2M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
37.2M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
37.2M
#endif
307
37.2M
}
ceval.c:Py_INCREF
Line
Count
Source
256
1.28G
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
1.28G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
687M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
687M
        return;
290
687M
    }
291
598M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
598M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
598M
#endif
307
598M
}
codecs.c:Py_INCREF
Line
Count
Source
256
15.0M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
15.0M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
853k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
853k
        return;
290
853k
    }
291
14.1M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
14.1M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
14.1M
#endif
307
14.1M
}
codegen.c:Py_INCREF
Line
Count
Source
256
2.21k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
2.21k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
2.21k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
2.21k
        return;
290
2.21k
    }
291
0
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
0
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
0
#endif
307
0
}
compile.c:Py_INCREF
Line
Count
Source
256
73.2k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
73.2k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
35.8k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
35.8k
        return;
290
35.8k
    }
291
37.4k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
37.4k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
37.4k
#endif
307
37.4k
}
context.c:Py_INCREF
Line
Count
Source
256
66
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
66
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
29
        _Py_INCREF_IMMORTAL_STAT_INC();
289
29
        return;
290
29
    }
291
37
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
37
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
37
#endif
307
37
}
errors.c:Py_INCREF
Line
Count
Source
256
48.8M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
48.8M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
2.42M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
2.42M
        return;
290
2.42M
    }
291
46.3M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
46.3M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
46.3M
#endif
307
46.3M
}
flowgraph.c:Py_INCREF
Line
Count
Source
256
59.3k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
59.3k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
33.1k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
33.1k
        return;
290
33.1k
    }
291
26.1k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
26.1k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
26.1k
#endif
307
26.1k
}
frame.c:Py_INCREF
Line
Count
Source
256
59.0M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
59.0M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
0
        _Py_INCREF_IMMORTAL_STAT_INC();
289
0
        return;
290
0
    }
291
59.0M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
59.0M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
59.0M
#endif
307
59.0M
}
Unexecuted instantiation: future.c:Py_INCREF
gc.c:Py_INCREF
Line
Count
Source
256
535M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
535M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
449M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
449M
        return;
290
449M
    }
291
85.6M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
85.6M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
85.6M
#endif
307
85.6M
}
Unexecuted instantiation: gc_gil.c:Py_INCREF
getargs.c:Py_INCREF
Line
Count
Source
256
2.65M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
2.65M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
1.86M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
1.86M
        return;
290
1.86M
    }
291
794k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
794k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
794k
#endif
307
794k
}
Unexecuted instantiation: ceval_gil.c:Py_INCREF
Unexecuted instantiation: hamt.c:Py_INCREF
Unexecuted instantiation: hashtable.c:Py_INCREF
import.c:Py_INCREF
Line
Count
Source
256
12.0M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
12.0M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
2.62M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
2.62M
        return;
290
2.62M
    }
291
9.39M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
9.39M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
9.39M
#endif
307
9.39M
}
importdl.c:Py_INCREF
Line
Count
Source
256
1.00k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
1.00k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
878
        _Py_INCREF_IMMORTAL_STAT_INC();
289
878
        return;
290
878
    }
291
127
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
127
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
127
#endif
307
127
}
initconfig.c:Py_INCREF
Line
Count
Source
256
629
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
629
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
629
        _Py_INCREF_IMMORTAL_STAT_INC();
289
629
        return;
290
629
    }
291
0
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
0
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
0
#endif
307
0
}
Unexecuted instantiation: instrumentation.c:Py_INCREF
Unexecuted instantiation: instruction_sequence.c:Py_INCREF
intrinsics.c:Py_INCREF
Line
Count
Source
256
42.2k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
42.2k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
0
        _Py_INCREF_IMMORTAL_STAT_INC();
289
0
        return;
290
0
    }
291
42.2k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
42.2k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
42.2k
#endif
307
42.2k
}
Unexecuted instantiation: legacy_tracing.c:Py_INCREF
Unexecuted instantiation: lock.c:Py_INCREF
marshal.c:Py_INCREF
Line
Count
Source
256
1.09M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
1.09M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
964k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
964k
        return;
290
964k
    }
291
126k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
126k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
126k
#endif
307
126k
}
modsupport.c:Py_INCREF
Line
Count
Source
256
4.74M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
4.74M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
629k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
629k
        return;
290
629k
    }
291
4.11M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
4.11M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
4.11M
#endif
307
4.11M
}
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
37
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
37
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
0
        _Py_INCREF_IMMORTAL_STAT_INC();
289
0
        return;
290
0
    }
291
37
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
37
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
37
#endif
307
37
}
Unexecuted instantiation: pymath.c:Py_INCREF
pystate.c:Py_INCREF
Line
Count
Source
256
854k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
854k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
0
        _Py_INCREF_IMMORTAL_STAT_INC();
289
0
        return;
290
0
    }
291
854k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
854k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
854k
#endif
307
854k
}
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
2.99M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
2.99M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
838k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
838k
        return;
290
838k
    }
291
2.15M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
2.15M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
2.15M
#endif
307
2.15M
}
symtable.c:Py_INCREF
Line
Count
Source
256
103k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
103k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
102k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
102k
        return;
290
102k
    }
291
170
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
170
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
170
#endif
307
170
}
sysmodule.c:Py_INCREF
Line
Count
Source
256
24.9k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
24.9k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
2.28k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
2.28k
        return;
290
2.28k
    }
291
22.6k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
22.6k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
22.6k
#endif
307
22.6k
}
Unexecuted instantiation: thread.c:Py_INCREF
traceback.c:Py_INCREF
Line
Count
Source
256
88.5M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
88.5M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
0
        _Py_INCREF_IMMORTAL_STAT_INC();
289
0
        return;
290
0
    }
291
88.5M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
88.5M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
88.5M
#endif
307
88.5M
}
Unexecuted instantiation: tracemalloc.c:Py_INCREF
typecache.c:Py_INCREF
Line
Count
Source
256
3.48M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
3.48M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
3.42M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
3.42M
        return;
290
3.42M
    }
291
52.7k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
52.7k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
52.7k
#endif
307
52.7k
}
Unexecuted instantiation: getopt.c:Py_INCREF
Unexecuted instantiation: pystrcmp.c:Py_INCREF
Unexecuted instantiation: pystrtod.c:Py_INCREF
Unexecuted instantiation: pystrhex.c:Py_INCREF
Unexecuted instantiation: dtoa.c:Py_INCREF
Unexecuted instantiation: fileutils.c:Py_INCREF
suggestions.c:Py_INCREF
Line
Count
Source
256
40
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
40
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
0
        _Py_INCREF_IMMORTAL_STAT_INC();
289
0
        return;
290
0
    }
291
40
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
40
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
40
#endif
307
40
}
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
atexitmodule.c:Py_INCREF
Line
Count
Source
256
10
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
10
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
0
        _Py_INCREF_IMMORTAL_STAT_INC();
289
0
        return;
290
0
    }
291
10
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
10
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
10
#endif
307
10
}
Unexecuted instantiation: faulthandler.c:Py_INCREF
posixmodule.c:Py_INCREF
Line
Count
Source
256
2.14M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
2.14M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
454k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
454k
        return;
290
454k
    }
291
1.69M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
1.69M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
1.69M
#endif
307
1.69M
}
signalmodule.c:Py_INCREF
Line
Count
Source
256
2.36k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
2.36k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
2.36k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
2.36k
        return;
290
2.36k
    }
291
0
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
0
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
0
#endif
307
0
}
Unexecuted instantiation: _tracemalloc.c:Py_INCREF
Unexecuted instantiation: _suggestions.c:Py_INCREF
_datetimemodule.c:Py_INCREF
Line
Count
Source
256
48.2k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
48.2k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
43.4k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
43.4k
        return;
290
43.4k
    }
291
4.76k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
4.76k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
4.76k
#endif
307
4.76k
}
Unexecuted instantiation: _codecsmodule.c:Py_INCREF
_collectionsmodule.c:Py_INCREF
Line
Count
Source
256
26.9M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
26.9M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
22.5M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
22.5M
        return;
290
22.5M
    }
291
4.43M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
4.43M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
4.43M
#endif
307
4.43M
}
Unexecuted instantiation: errnomodule.c:Py_INCREF
_iomodule.c:Py_INCREF
Line
Count
Source
256
273
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
273
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
247
        _Py_INCREF_IMMORTAL_STAT_INC();
289
247
        return;
290
247
    }
291
26
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
26
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
26
#endif
307
26
}
iobase.c:Py_INCREF
Line
Count
Source
256
89.3k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
89.3k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
0
        _Py_INCREF_IMMORTAL_STAT_INC();
289
0
        return;
290
0
    }
291
89.3k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
89.3k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
89.3k
#endif
307
89.3k
}
Unexecuted instantiation: fileio.c:Py_INCREF
bytesio.c:Py_INCREF
Line
Count
Source
256
86.2k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
86.2k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
1.87k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
1.87k
        return;
290
1.87k
    }
291
84.3k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
84.3k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
84.3k
#endif
307
84.3k
}
bufferedio.c:Py_INCREF
Line
Count
Source
256
30.2k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
30.2k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
0
        _Py_INCREF_IMMORTAL_STAT_INC();
289
0
        return;
290
0
    }
291
30.2k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
30.2k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
30.2k
#endif
307
30.2k
}
textio.c:Py_INCREF
Line
Count
Source
256
812k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
812k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
20.5k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
20.5k
        return;
290
20.5k
    }
291
791k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
791k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
791k
#endif
307
791k
}
stringio.c:Py_INCREF
Line
Count
Source
256
23.3k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
23.3k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
103
        _Py_INCREF_IMMORTAL_STAT_INC();
289
103
        return;
290
103
    }
291
23.2k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
23.2k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
23.2k
#endif
307
23.2k
}
itertoolsmodule.c:Py_INCREF
Line
Count
Source
256
43.0k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
43.0k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
41.7k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
41.7k
        return;
290
41.7k
    }
291
1.32k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
1.32k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
1.32k
#endif
307
1.32k
}
sre.c:Py_INCREF
Line
Count
Source
256
188M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
188M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
79.2M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
79.2M
        return;
290
79.2M
    }
291
109M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
109M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
109M
#endif
307
109M
}
Unexecuted instantiation: _sysconfig.c:Py_INCREF
_threadmodule.c:Py_INCREF
Line
Count
Source
256
168
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
168
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
84
        _Py_INCREF_IMMORTAL_STAT_INC();
289
84
        return;
290
84
    }
291
84
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
84
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
84
#endif
307
84
}
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
26.7k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
26.7k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
26.2k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
26.2k
        return;
290
26.2k
    }
291
450
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
450
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
450
#endif
307
450
}
_functoolsmodule.c:Py_INCREF
Line
Count
Source
256
564k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
564k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
6.36k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
6.36k
        return;
290
6.36k
    }
291
558k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
558k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
558k
#endif
307
558k
}
Unexecuted instantiation: _localemodule.c:Py_INCREF
Unexecuted instantiation: _opcode.c:Py_INCREF
_operator.c:Py_INCREF
Line
Count
Source
256
1.44M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
1.44M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
1.41M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
1.41M
        return;
290
1.41M
    }
291
25.5k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
25.5k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
25.5k
#endif
307
25.5k
}
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
296
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
296
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
296
        _Py_INCREF_IMMORTAL_STAT_INC();
289
296
        return;
290
296
    }
291
0
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
0
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
0
#endif
307
0
}
Unexecuted instantiation: frozen.c:Py_INCREF
Unexecuted instantiation: getbuildinfo.c:Py_INCREF
Unexecuted instantiation: peg_api.c:Py_INCREF
reader.c:Py_INCREF
Line
Count
Source
256
16
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
16
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
0
        _Py_INCREF_IMMORTAL_STAT_INC();
289
0
        return;
290
0
    }
291
16
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
16
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
16
#endif
307
16
}
Unexecuted instantiation: source.c:Py_INCREF
Unexecuted instantiation: helpers.c:Py_INCREF
Unexecuted instantiation: myreadline.c:Py_INCREF
abstract.c:Py_INCREF
Line
Count
Source
256
569M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
569M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
323M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
323M
        return;
290
323M
    }
291
246M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
246M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
246M
#endif
307
246M
}
Unexecuted instantiation: boolobject.c:Py_INCREF
Unexecuted instantiation: bytes_methods.c:Py_INCREF
bytearrayobject.c:Py_INCREF
Line
Count
Source
256
20.4M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
20.4M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
0
        _Py_INCREF_IMMORTAL_STAT_INC();
289
0
        return;
290
0
    }
291
20.4M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
20.4M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
20.4M
#endif
307
20.4M
}
Unexecuted instantiation: capsule.c:Py_INCREF
cellobject.c:Py_INCREF
Line
Count
Source
256
3.51M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
3.51M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
278k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
278k
        return;
290
278k
    }
291
3.23M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
3.23M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
3.23M
#endif
307
3.23M
}
classobject.c:Py_INCREF
Line
Count
Source
256
96.3M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
96.3M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
133
        _Py_INCREF_IMMORTAL_STAT_INC();
289
133
        return;
290
133
    }
291
96.3M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
96.3M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
96.3M
#endif
307
96.3M
}
codeobject.c:Py_INCREF
Line
Count
Source
256
1.15M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
1.15M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
508k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
508k
        return;
290
508k
    }
291
647k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
647k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
647k
#endif
307
647k
}
complexobject.c:Py_INCREF
Line
Count
Source
256
2.11k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
2.11k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
2.11k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
2.11k
        return;
290
2.11k
    }
291
0
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
0
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
0
#endif
307
0
}
descrobject.c:Py_INCREF
Line
Count
Source
256
22.4M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
22.4M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
72.8k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
72.8k
        return;
290
72.8k
    }
291
22.4M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
22.4M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
22.4M
#endif
307
22.4M
}
enumobject.c:Py_INCREF
Line
Count
Source
256
69.0M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
69.0M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
12
        _Py_INCREF_IMMORTAL_STAT_INC();
289
12
        return;
290
12
    }
291
69.0M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
69.0M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
69.0M
#endif
307
69.0M
}
genobject.c:Py_INCREF
Line
Count
Source
256
93.5M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
93.5M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
93.3M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
93.3M
        return;
290
93.3M
    }
291
122k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
122k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
122k
#endif
307
122k
}
Unexecuted instantiation: fileobject.c:Py_INCREF
frameobject.c:Py_INCREF
Line
Count
Source
256
46.6M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
46.6M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
168
        _Py_INCREF_IMMORTAL_STAT_INC();
289
168
        return;
290
168
    }
291
46.6M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
46.6M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
46.6M
#endif
307
46.6M
}
funcobject.c:Py_INCREF
Line
Count
Source
256
77.8M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
77.8M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
46.5M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
46.5M
        return;
290
46.5M
    }
291
31.3M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
31.3M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
31.3M
#endif
307
31.3M
}
interpolationobject.c:Py_INCREF
Line
Count
Source
256
12
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
12
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
12
        _Py_INCREF_IMMORTAL_STAT_INC();
289
12
        return;
290
12
    }
291
0
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
0
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
0
#endif
307
0
}
iterobject.c:Py_INCREF
Line
Count
Source
256
11.5M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
11.5M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
4.81M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
4.81M
        return;
290
4.81M
    }
291
6.75M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
6.75M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
6.75M
#endif
307
6.75M
}
lazyimportobject.c:Py_INCREF
Line
Count
Source
256
1.94k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
1.94k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
581
        _Py_INCREF_IMMORTAL_STAT_INC();
289
581
        return;
290
581
    }
291
1.36k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
1.36k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
1.36k
#endif
307
1.36k
}
odictobject.c:Py_INCREF
Line
Count
Source
256
14.0k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
14.0k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
10.1k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
10.1k
        return;
290
10.1k
    }
291
3.83k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
3.83k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
3.83k
#endif
307
3.83k
}
methodobject.c:Py_INCREF
Line
Count
Source
256
195M
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
195M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
28.6M
        _Py_INCREF_IMMORTAL_STAT_INC();
289
28.6M
        return;
290
28.6M
    }
291
167M
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
167M
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
167M
#endif
307
167M
}
Unexecuted instantiation: namespaceobject.c:Py_INCREF
Unexecuted instantiation: _contextvars.c:Py_INCREF
Unexecuted instantiation: _strptime.c:Py_INCREF
Python-ast.c:Py_INCREF
Line
Count
Source
256
518k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
518k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
245k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
245k
        return;
290
245k
    }
291
273k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
273k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
273k
#endif
307
273k
}
Unexecuted instantiation: Python-tokenize.c:Py_INCREF
Unexecuted instantiation: asdl.c:Py_INCREF
assemble.c:Py_INCREF
Line
Count
Source
256
18.7k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
18.7k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
18.7k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
18.7k
        return;
290
18.7k
    }
291
6
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
6
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
6
#endif
307
6
}
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
pegen.c:Py_INCREF
Line
Count
Source
256
626
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
626
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
626
        _Py_INCREF_IMMORTAL_STAT_INC();
289
626
        return;
290
626
    }
291
0
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
0
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
0
#endif
307
0
}
pegen_errors.c:Py_INCREF
Line
Count
Source
256
51.3k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
51.3k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
2
        _Py_INCREF_IMMORTAL_STAT_INC();
289
2
        return;
290
2
    }
291
51.3k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
51.3k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
51.3k
#endif
307
51.3k
}
Unexecuted instantiation: parser.c:Py_INCREF
Unexecuted instantiation: parser_invalid.c:Py_INCREF
Unexecuted instantiation: lexer.c:Py_INCREF
Unexecuted instantiation: layout.c:Py_INCREF
Unexecuted instantiation: number.c:Py_INCREF
Unexecuted instantiation: state.c:Py_INCREF
Unexecuted instantiation: string.c:Py_INCREF
Unexecuted instantiation: decoder.c:Py_INCREF
api.c:Py_INCREF
Line
Count
Source
256
65.5k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
65.5k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
760
        _Py_INCREF_IMMORTAL_STAT_INC();
289
760
        return;
290
760
    }
291
64.7k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
64.7k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
64.7k
#endif
307
64.7k
}
Unexecuted instantiation: getcompiler.c:Py_INCREF
Unexecuted instantiation: mystrtoul.c:Py_INCREF
Unexecuted instantiation: token.c:Py_INCREF
action_helpers.c:Py_INCREF
Line
Count
Source
256
4.71k
{
257
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
258
    // gh-158401: The stable ABI now implements Py_INCREF() as a function
259
    // call on all limited C API versions. _Py_IncRef() was added to Python
260
    // 3.10.0a7, use Py_IncRef() on older versions. Py_IncRef() accepts NULL,
261
    // whereas _Py_IncRef() doesn't.
262
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
263
    _Py_IncRef(op);
264
#  else
265
    Py_IncRef(op);
266
#  endif
267
#else
268
    // Non-limited C API and limited C API for Python 3.9 and older access
269
    // directly PyObject.ob_refcnt.
270
#if defined(Py_GIL_DISABLED)
271
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
272
    uint32_t new_local = local + 1;
273
    if (new_local == 0) {
274
        _Py_INCREF_IMMORTAL_STAT_INC();
275
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
276
        return;
277
    }
278
    if (_Py_IsOwnedByCurrentThread(op)) {
279
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
280
    }
281
    else {
282
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
283
    }
284
#elif SIZEOF_VOID_P > 4
285
    uint32_t cur_refcnt = op->ob_refcnt;
286
4.71k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
287
        // the object is immortal
288
3.58k
        _Py_INCREF_IMMORTAL_STAT_INC();
289
3.58k
        return;
290
3.58k
    }
291
1.12k
    op->ob_refcnt = cur_refcnt + 1;
292
#else
293
    if (_Py_IsImmortal(op)) {
294
        _Py_INCREF_IMMORTAL_STAT_INC();
295
        return;
296
    }
297
    op->ob_refcnt++;
298
#endif
299
1.12k
    _Py_INCREF_STAT_INC();
300
#ifdef Py_REF_DEBUG
301
    // Don't count the incref if the object is immortal.
302
    if (!_Py_IsImmortal(op)) {
303
        _Py_INCREF_IncRefTotal();
304
    }
305
#endif
306
1.12k
#endif
307
1.12k
}
Unexecuted instantiation: string_parser.c:Py_INCREF
308
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < _Py_PACK_VERSION(3, 11)
309
16.2G
#  define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op))
310
#endif
311
312
#if !defined(Py_LIMITED_API)
313
#if defined(Py_GIL_DISABLED)
314
// Implements Py_DECREF on objects not owned by the current thread.
315
PyAPI_FUNC(void) _Py_DecRefShared(PyObject *);
316
PyAPI_FUNC(void) _Py_DecRefSharedDebug(PyObject *, const char *, int);
317
318
// Called from Py_DECREF by the owning thread when the local refcount reaches
319
// zero. The call will deallocate the object if the shared refcount is also
320
// zero. Otherwise, the thread gives up ownership and merges the reference
321
// count fields.
322
PyAPI_FUNC(void) _Py_MergeZeroLocalRefcount(PyObject *);
323
#endif  // Py_GIL_DISABLED
324
#endif  // Py_LIMITED_API
325
326
#if defined(Py_LIMITED_API) || defined(_Py_OPAQUE_PYOBJECT)
327
// gh-158401: The stable ABI now implements Py_DECREF() as a function call
328
// on all limited C API versions. _Py_DecRef() was added to Python 3.10.0a7,
329
// use Py_DecRef() on older versions. Py_DecRef() accepts NULL, whereas
330
// _Py_DecRef() doesn't.
331
10.1k
static inline void Py_DECREF(PyObject *op) {
332
10.1k
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
333
10.1k
    _Py_DecRef(op);
334
#  else
335
    Py_DecRef(op);
336
#  endif
337
10.1k
}
errnomodule.c:Py_DECREF
Line
Count
Source
331
10.1k
static inline void Py_DECREF(PyObject *op) {
332
10.1k
#  if Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 10)
333
10.1k
    _Py_DecRef(op);
334
#  else
335
    Py_DecRef(op);
336
#  endif
337
10.1k
}
Unexecuted instantiation: _stat.c:Py_DECREF
338
10.1k
#define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op))
339
340
#elif defined(Py_GIL_DISABLED) && defined(Py_REF_DEBUG)
341
static inline void Py_DECREF(const char *filename, int lineno, PyObject *op)
342
{
343
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
344
    if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
345
        _Py_DECREF_IMMORTAL_STAT_INC();
346
        return;
347
    }
348
    _Py_DECREF_STAT_INC();
349
    _Py_DECREF_DecRefTotal();
350
    if (_Py_IsOwnedByCurrentThread(op)) {
351
        if (local == 0) {
352
            _Py_NegativeRefcount(filename, lineno, op);
353
        }
354
        local--;
355
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, local);
356
        if (local == 0) {
357
            _Py_MergeZeroLocalRefcount(op);
358
        }
359
    }
360
    else {
361
        _Py_DecRefSharedDebug(op, filename, lineno);
362
    }
363
}
364
#define Py_DECREF(op) Py_DECREF(__FILE__, __LINE__, _PyObject_CAST(op))
365
366
#elif defined(Py_GIL_DISABLED)
367
static inline void Py_DECREF(PyObject *op)
368
{
369
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
370
    if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
371
        _Py_DECREF_IMMORTAL_STAT_INC();
372
        return;
373
    }
374
    _Py_DECREF_STAT_INC();
375
    if (_Py_IsOwnedByCurrentThread(op)) {
376
        local--;
377
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, local);
378
        if (local == 0) {
379
            _Py_MergeZeroLocalRefcount(op);
380
        }
381
    }
382
    else {
383
        _Py_DecRefShared(op);
384
    }
385
}
386
#define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op))
387
388
#elif defined(Py_REF_DEBUG)
389
390
static inline void Py_DECREF(const char *filename, int lineno, PyObject *op)
391
{
392
#if SIZEOF_VOID_P > 4
393
    /* If an object has been freed, it will have a negative full refcnt
394
     * If it has not it been freed, will have a very large refcnt */
395
    if (op->ob_refcnt_full <= 0 || op->ob_refcnt > (((uint32_t)-1) - (1<<20))) {
396
#else
397
    if (op->ob_refcnt <= 0) {
398
#endif
399
        _Py_NegativeRefcount(filename, lineno, op);
400
    }
401
    if (_Py_IsImmortal(op)) {
402
        _Py_DECREF_IMMORTAL_STAT_INC();
403
        return;
404
    }
405
    _Py_DECREF_STAT_INC();
406
    _Py_DECREF_DecRefTotal();
407
    if (--op->ob_refcnt == 0) {
408
        _Py_Dealloc(op);
409
    }
410
}
411
#define Py_DECREF(op) Py_DECREF(__FILE__, __LINE__, _PyObject_CAST(op))
412
413
#else
414
415
static inline Py_ALWAYS_INLINE void Py_DECREF(PyObject *op)
416
15.5G
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
15.5G
    if (_Py_IsImmortal(op)) {
420
8.66G
        _Py_DECREF_IMMORTAL_STAT_INC();
421
8.66G
        return;
422
8.66G
    }
423
6.84G
    _Py_DECREF_STAT_INC();
424
6.84G
    if (--op->ob_refcnt == 0) {
425
1.31G
        _Py_Dealloc(op);
426
1.31G
    }
427
6.84G
}
bytesobject.c:Py_DECREF
Line
Count
Source
416
26.6M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
26.6M
    if (_Py_IsImmortal(op)) {
420
26.4M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
26.4M
        return;
422
26.4M
    }
423
237k
    _Py_DECREF_STAT_INC();
424
237k
    if (--op->ob_refcnt == 0) {
425
172k
        _Py_Dealloc(op);
426
172k
    }
427
237k
}
call.c:Py_DECREF
Line
Count
Source
416
202M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
202M
    if (_Py_IsImmortal(op)) {
420
85.5M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
85.5M
        return;
422
85.5M
    }
423
117M
    _Py_DECREF_STAT_INC();
424
117M
    if (--op->ob_refcnt == 0) {
425
76.0M
        _Py_Dealloc(op);
426
76.0M
    }
427
117M
}
exceptions.c:Py_DECREF
Line
Count
Source
416
226M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
226M
    if (_Py_IsImmortal(op)) {
420
50.3M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
50.3M
        return;
422
50.3M
    }
423
176M
    _Py_DECREF_STAT_INC();
424
176M
    if (--op->ob_refcnt == 0) {
425
109M
        _Py_Dealloc(op);
426
109M
    }
427
176M
}
genericaliasobject.c:Py_DECREF
Line
Count
Source
416
296
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
296
    if (_Py_IsImmortal(op)) {
420
168
        _Py_DECREF_IMMORTAL_STAT_INC();
421
168
        return;
422
168
    }
423
128
    _Py_DECREF_STAT_INC();
424
128
    if (--op->ob_refcnt == 0) {
425
128
        _Py_Dealloc(op);
426
128
    }
427
128
}
floatobject.c:Py_DECREF
Line
Count
Source
416
478k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
478k
    if (_Py_IsImmortal(op)) {
420
32.9k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
32.9k
        return;
422
32.9k
    }
423
446k
    _Py_DECREF_STAT_INC();
424
446k
    if (--op->ob_refcnt == 0) {
425
388
        _Py_Dealloc(op);
426
388
    }
427
446k
}
listobject.c:Py_DECREF
Line
Count
Source
416
2.30G
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
2.30G
    if (_Py_IsImmortal(op)) {
420
742M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
742M
        return;
422
742M
    }
423
1.56G
    _Py_DECREF_STAT_INC();
424
1.56G
    if (--op->ob_refcnt == 0) {
425
316M
        _Py_Dealloc(op);
426
316M
    }
427
1.56G
}
longobject.c:Py_DECREF
Line
Count
Source
416
35.6M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
35.6M
    if (_Py_IsImmortal(op)) {
420
26.4M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
26.4M
        return;
422
26.4M
    }
423
9.15M
    _Py_DECREF_STAT_INC();
424
9.15M
    if (--op->ob_refcnt == 0) {
425
3.08M
        _Py_Dealloc(op);
426
3.08M
    }
427
9.15M
}
dictobject.c:Py_DECREF
Line
Count
Source
416
831M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
831M
    if (_Py_IsImmortal(op)) {
420
401M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
401M
        return;
422
401M
    }
423
429M
    _Py_DECREF_STAT_INC();
424
429M
    if (--op->ob_refcnt == 0) {
425
129M
        _Py_Dealloc(op);
426
129M
    }
427
429M
}
memoryobject.c:Py_DECREF
Line
Count
Source
416
6.30M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
6.30M
    if (_Py_IsImmortal(op)) {
420
114k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
114k
        return;
422
114k
    }
423
6.19M
    _Py_DECREF_STAT_INC();
424
6.19M
    if (--op->ob_refcnt == 0) {
425
3.01M
        _Py_Dealloc(op);
426
3.01M
    }
427
6.19M
}
moduleobject.c:Py_DECREF
Line
Count
Source
416
3.05M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
3.05M
    if (_Py_IsImmortal(op)) {
420
3.01M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
3.01M
        return;
422
3.01M
    }
423
34.6k
    _Py_DECREF_STAT_INC();
424
34.6k
    if (--op->ob_refcnt == 0) {
425
12
        _Py_Dealloc(op);
426
12
    }
427
34.6k
}
object.c:Py_DECREF
Line
Count
Source
416
984M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
984M
    if (_Py_IsImmortal(op)) {
420
663M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
663M
        return;
422
663M
    }
423
321M
    _Py_DECREF_STAT_INC();
424
321M
    if (--op->ob_refcnt == 0) {
425
579k
        _Py_Dealloc(op);
426
579k
    }
427
321M
}
Unexecuted instantiation: obmalloc.c:Py_DECREF
Unexecuted instantiation: picklebufobject.c:Py_DECREF
rangeobject.c:Py_DECREF
Line
Count
Source
416
40.7M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
40.7M
    if (_Py_IsImmortal(op)) {
420
40.3M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
40.3M
        return;
422
40.3M
    }
423
321k
    _Py_DECREF_STAT_INC();
424
321k
    if (--op->ob_refcnt == 0) {
425
109k
        _Py_Dealloc(op);
426
109k
    }
427
321k
}
sentinelobject.c:Py_DECREF
Line
Count
Source
416
264
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
264
    if (_Py_IsImmortal(op)) {
420
171
        _Py_DECREF_IMMORTAL_STAT_INC();
421
171
        return;
422
171
    }
423
93
    _Py_DECREF_STAT_INC();
424
93
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
93
}
setobject.c:Py_DECREF
Line
Count
Source
416
51.0M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
51.0M
    if (_Py_IsImmortal(op)) {
420
23.4M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
23.4M
        return;
422
23.4M
    }
423
27.5M
    _Py_DECREF_STAT_INC();
424
27.5M
    if (--op->ob_refcnt == 0) {
425
8.17M
        _Py_Dealloc(op);
426
8.17M
    }
427
27.5M
}
sliceobject.c:Py_DECREF
Line
Count
Source
416
168M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
168M
    if (_Py_IsImmortal(op)) {
420
97.1M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
97.1M
        return;
422
97.1M
    }
423
70.9M
    _Py_DECREF_STAT_INC();
424
70.9M
    if (--op->ob_refcnt == 0) {
425
22.9k
        _Py_Dealloc(op);
426
22.9k
    }
427
70.9M
}
structseq.c:Py_DECREF
Line
Count
Source
416
4.80M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
4.80M
    if (_Py_IsImmortal(op)) {
420
1.43M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
1.43M
        return;
422
1.43M
    }
423
3.36M
    _Py_DECREF_STAT_INC();
424
3.36M
    if (--op->ob_refcnt == 0) {
425
3.11M
        _Py_Dealloc(op);
426
3.11M
    }
427
3.36M
}
templateobject.c:Py_DECREF
Line
Count
Source
416
22
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
22
    if (_Py_IsImmortal(op)) {
420
7
        _Py_DECREF_IMMORTAL_STAT_INC();
421
7
        return;
422
7
    }
423
15
    _Py_DECREF_STAT_INC();
424
15
    if (--op->ob_refcnt == 0) {
425
4
        _Py_Dealloc(op);
426
4
    }
427
15
}
tupleobject.c:Py_DECREF
Line
Count
Source
416
6.02G
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
6.02G
    if (_Py_IsImmortal(op)) {
420
3.86G
        _Py_DECREF_IMMORTAL_STAT_INC();
421
3.86G
        return;
422
3.86G
    }
423
2.16G
    _Py_DECREF_STAT_INC();
424
2.16G
    if (--op->ob_refcnt == 0) {
425
148M
        _Py_Dealloc(op);
426
148M
    }
427
2.16G
}
typeobject.c:Py_DECREF
Line
Count
Source
416
375M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
375M
    if (_Py_IsImmortal(op)) {
420
119M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
119M
        return;
422
119M
    }
423
256M
    _Py_DECREF_STAT_INC();
424
256M
    if (--op->ob_refcnt == 0) {
425
42.4M
        _Py_Dealloc(op);
426
42.4M
    }
427
256M
}
typevarobject.c:Py_DECREF
Line
Count
Source
416
122k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
122k
    if (_Py_IsImmortal(op)) {
420
364
        _Py_DECREF_IMMORTAL_STAT_INC();
421
364
        return;
422
364
    }
423
122k
    _Py_DECREF_STAT_INC();
424
122k
    if (--op->ob_refcnt == 0) {
425
804
        _Py_Dealloc(op);
426
804
    }
427
122k
}
unicode_format.c:Py_DECREF
Line
Count
Source
416
16.7M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
16.7M
    if (_Py_IsImmortal(op)) {
420
1.11M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
1.11M
        return;
422
1.11M
    }
423
15.6M
    _Py_DECREF_STAT_INC();
424
15.6M
    if (--op->ob_refcnt == 0) {
425
9.77M
        _Py_Dealloc(op);
426
9.77M
    }
427
15.6M
}
unicode_formatter.c:Py_DECREF
Line
Count
Source
416
45.3M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
45.3M
    if (_Py_IsImmortal(op)) {
420
34.0M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
34.0M
        return;
422
34.0M
    }
423
11.3M
    _Py_DECREF_STAT_INC();
424
11.3M
    if (--op->ob_refcnt == 0) {
425
11.3M
        _Py_Dealloc(op);
426
11.3M
    }
427
11.3M
}
unicode_writer.c:Py_DECREF
Line
Count
Source
416
38.5M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
38.5M
    if (_Py_IsImmortal(op)) {
420
12.6M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
12.6M
        return;
422
12.6M
    }
423
25.8M
    _Py_DECREF_STAT_INC();
424
25.8M
    if (--op->ob_refcnt == 0) {
425
20.9M
        _Py_Dealloc(op);
426
20.9M
    }
427
25.8M
}
Unexecuted instantiation: unicodectype.c:Py_DECREF
unicodeobject.c:Py_DECREF
Line
Count
Source
416
157M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
157M
    if (_Py_IsImmortal(op)) {
420
70.0M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
70.0M
        return;
422
70.0M
    }
423
87.8M
    _Py_DECREF_STAT_INC();
424
87.8M
    if (--op->ob_refcnt == 0) {
425
18.8M
        _Py_Dealloc(op);
426
18.8M
    }
427
87.8M
}
unionobject.c:Py_DECREF
Line
Count
Source
416
4.43k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
4.43k
    if (_Py_IsImmortal(op)) {
420
556
        _Py_DECREF_IMMORTAL_STAT_INC();
421
556
        return;
422
556
    }
423
3.88k
    _Py_DECREF_STAT_INC();
424
3.88k
    if (--op->ob_refcnt == 0) {
425
3.28k
        _Py_Dealloc(op);
426
3.28k
    }
427
3.88k
}
weakrefobject.c:Py_DECREF
Line
Count
Source
416
312k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
312k
    if (_Py_IsImmortal(op)) {
420
12.6k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
12.6k
        return;
422
12.6k
    }
423
299k
    _Py_DECREF_STAT_INC();
424
299k
    if (--op->ob_refcnt == 0) {
425
12.6k
        _Py_Dealloc(op);
426
12.6k
    }
427
299k
}
_warnings.c:Py_DECREF
Line
Count
Source
416
59.0M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
59.0M
    if (_Py_IsImmortal(op)) {
420
4.84M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
4.84M
        return;
422
4.84M
    }
423
54.2M
    _Py_DECREF_STAT_INC();
424
54.2M
    if (--op->ob_refcnt == 0) {
425
1.74M
        _Py_Dealloc(op);
426
1.74M
    }
427
54.2M
}
bltinmodule.c:Py_DECREF
Line
Count
Source
416
1.82G
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
1.82G
    if (_Py_IsImmortal(op)) {
420
1.64G
        _Py_DECREF_IMMORTAL_STAT_INC();
421
1.64G
        return;
422
1.64G
    }
423
184M
    _Py_DECREF_STAT_INC();
424
184M
    if (--op->ob_refcnt == 0) {
425
120M
        _Py_Dealloc(op);
426
120M
    }
427
184M
}
ceval.c:Py_DECREF
Line
Count
Source
416
117k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
117k
    if (_Py_IsImmortal(op)) {
420
19.9k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
19.9k
        return;
422
19.9k
    }
423
97.2k
    _Py_DECREF_STAT_INC();
424
97.2k
    if (--op->ob_refcnt == 0) {
425
25.5k
        _Py_Dealloc(op);
426
25.5k
    }
427
97.2k
}
codecs.c:Py_DECREF
Line
Count
Source
416
31.1M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
31.1M
    if (_Py_IsImmortal(op)) {
420
10.5M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
10.5M
        return;
422
10.5M
    }
423
20.5M
    _Py_DECREF_STAT_INC();
424
20.5M
    if (--op->ob_refcnt == 0) {
425
10.0M
        _Py_Dealloc(op);
426
10.0M
    }
427
20.5M
}
codegen.c:Py_DECREF
Line
Count
Source
416
55.1k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
55.1k
    if (_Py_IsImmortal(op)) {
420
48.2k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
48.2k
        return;
422
48.2k
    }
423
6.86k
    _Py_DECREF_STAT_INC();
424
6.86k
    if (--op->ob_refcnt == 0) {
425
185
        _Py_Dealloc(op);
426
185
    }
427
6.86k
}
compile.c:Py_DECREF
Line
Count
Source
416
314k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
314k
    if (_Py_IsImmortal(op)) {
420
161k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
161k
        return;
422
161k
    }
423
152k
    _Py_DECREF_STAT_INC();
424
152k
    if (--op->ob_refcnt == 0) {
425
53.6k
        _Py_Dealloc(op);
426
53.6k
    }
427
152k
}
context.c:Py_DECREF
Line
Count
Source
416
74
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
74
    if (_Py_IsImmortal(op)) {
420
37
        _Py_DECREF_IMMORTAL_STAT_INC();
421
37
        return;
422
37
    }
423
37
    _Py_DECREF_STAT_INC();
424
37
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
37
}
errors.c:Py_DECREF
Line
Count
Source
416
49.5M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
49.5M
    if (_Py_IsImmortal(op)) {
420
2.42M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
2.42M
        return;
422
2.42M
    }
423
47.0M
    _Py_DECREF_STAT_INC();
424
47.0M
    if (--op->ob_refcnt == 0) {
425
18.9M
        _Py_Dealloc(op);
426
18.9M
    }
427
47.0M
}
flowgraph.c:Py_DECREF
Line
Count
Source
416
56.0k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
56.0k
    if (_Py_IsImmortal(op)) {
420
34.9k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
34.9k
        return;
422
34.9k
    }
423
21.0k
    _Py_DECREF_STAT_INC();
424
21.0k
    if (--op->ob_refcnt == 0) {
425
124
        _Py_Dealloc(op);
426
124
    }
427
21.0k
}
frame.c:Py_DECREF
Line
Count
Source
416
56.1M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
56.1M
    if (_Py_IsImmortal(op)) {
420
0
        _Py_DECREF_IMMORTAL_STAT_INC();
421
0
        return;
422
0
    }
423
56.1M
    _Py_DECREF_STAT_INC();
424
56.1M
    if (--op->ob_refcnt == 0) {
425
15.8M
        _Py_Dealloc(op);
426
15.8M
    }
427
56.1M
}
future.c:Py_DECREF
Line
Count
Source
416
165
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
165
    if (_Py_IsImmortal(op)) {
420
0
        _Py_DECREF_IMMORTAL_STAT_INC();
421
0
        return;
422
0
    }
423
165
    _Py_DECREF_STAT_INC();
424
165
    if (--op->ob_refcnt == 0) {
425
125
        _Py_Dealloc(op);
426
125
    }
427
165
}
gc.c:Py_DECREF
Line
Count
Source
416
2.30M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
2.30M
    if (_Py_IsImmortal(op)) {
420
23.3k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
23.3k
        return;
422
23.3k
    }
423
2.28M
    _Py_DECREF_STAT_INC();
424
2.28M
    if (--op->ob_refcnt == 0) {
425
794k
        _Py_Dealloc(op);
426
794k
    }
427
2.28M
}
Unexecuted instantiation: gc_gil.c:Py_DECREF
getargs.c:Py_DECREF
Line
Count
Source
416
14.2M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
14.2M
    if (_Py_IsImmortal(op)) {
420
13.2M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
13.2M
        return;
422
13.2M
    }
423
1.02M
    _Py_DECREF_STAT_INC();
424
1.02M
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
1.02M
}
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
416
19.7M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
19.7M
    if (_Py_IsImmortal(op)) {
420
3.12M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
3.12M
        return;
422
3.12M
    }
423
16.5M
    _Py_DECREF_STAT_INC();
424
16.5M
    if (--op->ob_refcnt == 0) {
425
206k
        _Py_Dealloc(op);
426
206k
    }
427
16.5M
}
importdl.c:Py_DECREF
Line
Count
Source
416
4.32k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
4.32k
    if (_Py_IsImmortal(op)) {
420
1.75k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
1.75k
        return;
422
1.75k
    }
423
2.57k
    _Py_DECREF_STAT_INC();
424
2.57k
    if (--op->ob_refcnt == 0) {
425
1.19k
        _Py_Dealloc(op);
426
1.19k
    }
427
2.57k
}
initconfig.c:Py_DECREF
Line
Count
Source
416
5.32k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
5.32k
    if (_Py_IsImmortal(op)) {
420
4.32k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
4.32k
        return;
422
4.32k
    }
423
999
    _Py_DECREF_STAT_INC();
424
999
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
999
}
instrumentation.c:Py_DECREF
Line
Count
Source
416
888
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
888
    if (_Py_IsImmortal(op)) {
420
555
        _Py_DECREF_IMMORTAL_STAT_INC();
421
555
        return;
422
555
    }
423
333
    _Py_DECREF_STAT_INC();
424
333
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
333
}
Unexecuted instantiation: instruction_sequence.c:Py_DECREF
intrinsics.c:Py_DECREF
Line
Count
Source
416
83.2k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
83.2k
    if (_Py_IsImmortal(op)) {
420
45.7k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
45.7k
        return;
422
45.7k
    }
423
37.4k
    _Py_DECREF_STAT_INC();
424
37.4k
    if (--op->ob_refcnt == 0) {
425
346
        _Py_Dealloc(op);
426
346
    }
427
37.4k
}
Unexecuted instantiation: legacy_tracing.c:Py_DECREF
Unexecuted instantiation: lock.c:Py_DECREF
marshal.c:Py_DECREF
Line
Count
Source
416
1.01M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
1.01M
    if (_Py_IsImmortal(op)) {
420
458k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
458k
        return;
422
458k
    }
423
554k
    _Py_DECREF_STAT_INC();
424
554k
    if (--op->ob_refcnt == 0) {
425
98.2k
        _Py_Dealloc(op);
426
98.2k
    }
427
554k
}
modsupport.c:Py_DECREF
Line
Count
Source
416
57.1k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
57.1k
    if (_Py_IsImmortal(op)) {
420
29.2k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
29.2k
        return;
422
29.2k
    }
423
27.8k
    _Py_DECREF_STAT_INC();
424
27.8k
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
27.8k
}
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
416
1.08M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
1.08M
    if (_Py_IsImmortal(op)) {
420
637k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
637k
        return;
422
637k
    }
423
451k
    _Py_DECREF_STAT_INC();
424
451k
    if (--op->ob_refcnt == 0) {
425
67.6k
        _Py_Dealloc(op);
426
67.6k
    }
427
451k
}
Unexecuted instantiation: pyctype.c:Py_DECREF
Unexecuted instantiation: pyhash.c:Py_DECREF
pylifecycle.c:Py_DECREF
Line
Count
Source
416
1.33k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
1.33k
    if (_Py_IsImmortal(op)) {
420
259
        _Py_DECREF_IMMORTAL_STAT_INC();
421
259
        return;
422
259
    }
423
1.07k
    _Py_DECREF_STAT_INC();
424
1.07k
    if (--op->ob_refcnt == 0) {
425
111
        _Py_Dealloc(op);
426
111
    }
427
1.07k
}
Unexecuted instantiation: pymath.c:Py_DECREF
Unexecuted instantiation: pystate.c:Py_DECREF
pythonrun.c:Py_DECREF
Line
Count
Source
416
1.82k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
1.82k
    if (_Py_IsImmortal(op)) {
420
428
        _Py_DECREF_IMMORTAL_STAT_INC();
421
428
        return;
422
428
    }
423
1.40k
    _Py_DECREF_STAT_INC();
424
1.40k
    if (--op->ob_refcnt == 0) {
425
560
        _Py_Dealloc(op);
426
560
    }
427
1.40k
}
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
416
3.37M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
3.37M
    if (_Py_IsImmortal(op)) {
420
1.98M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
1.98M
        return;
422
1.98M
    }
423
1.38M
    _Py_DECREF_STAT_INC();
424
1.38M
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
1.38M
}
Unexecuted instantiation: slots.c:Py_DECREF
Unexecuted instantiation: slots_generated.c:Py_DECREF
structmember.c:Py_DECREF
Line
Count
Source
416
1.87k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
1.87k
    if (_Py_IsImmortal(op)) {
420
1.03k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
1.03k
        return;
422
1.03k
    }
423
836
    _Py_DECREF_STAT_INC();
424
836
    if (--op->ob_refcnt == 0) {
425
631
        _Py_Dealloc(op);
426
631
    }
427
836
}
symtable.c:Py_DECREF
Line
Count
Source
416
333k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
333k
    if (_Py_IsImmortal(op)) {
420
140k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
140k
        return;
422
140k
    }
423
193k
    _Py_DECREF_STAT_INC();
424
193k
    if (--op->ob_refcnt == 0) {
425
104k
        _Py_Dealloc(op);
426
104k
    }
427
193k
}
sysmodule.c:Py_DECREF
Line
Count
Source
416
2.42M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
2.42M
    if (_Py_IsImmortal(op)) {
420
563k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
563k
        return;
422
563k
    }
423
1.86M
    _Py_DECREF_STAT_INC();
424
1.86M
    if (--op->ob_refcnt == 0) {
425
1.38M
        _Py_Dealloc(op);
426
1.38M
    }
427
1.86M
}
Unexecuted instantiation: thread.c:Py_DECREF
traceback.c:Py_DECREF
Line
Count
Source
416
177M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
177M
    if (_Py_IsImmortal(op)) {
420
0
        _Py_DECREF_IMMORTAL_STAT_INC();
421
0
        return;
422
0
    }
423
177M
    _Py_DECREF_STAT_INC();
424
177M
    if (--op->ob_refcnt == 0) {
425
52.9M
        _Py_Dealloc(op);
426
52.9M
    }
427
177M
}
Unexecuted instantiation: tracemalloc.c:Py_DECREF
typecache.c:Py_DECREF
Line
Count
Source
416
3.38M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
3.38M
    if (_Py_IsImmortal(op)) {
420
3.35M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
3.35M
        return;
422
3.35M
    }
423
36.0k
    _Py_DECREF_STAT_INC();
424
36.0k
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
36.0k
}
Unexecuted instantiation: getopt.c:Py_DECREF
Unexecuted instantiation: pystrcmp.c:Py_DECREF
Unexecuted instantiation: pystrtod.c:Py_DECREF
Unexecuted instantiation: pystrhex.c:Py_DECREF
Unexecuted instantiation: dtoa.c:Py_DECREF
fileutils.c:Py_DECREF
Line
Count
Source
416
54.2k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
54.2k
    if (_Py_IsImmortal(op)) {
420
0
        _Py_DECREF_IMMORTAL_STAT_INC();
421
0
        return;
422
0
    }
423
54.2k
    _Py_DECREF_STAT_INC();
424
54.2k
    if (--op->ob_refcnt == 0) {
425
54.2k
        _Py_Dealloc(op);
426
54.2k
    }
427
54.2k
}
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
atexitmodule.c:Py_DECREF
Line
Count
Source
416
20
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
20
    if (_Py_IsImmortal(op)) {
420
10
        _Py_DECREF_IMMORTAL_STAT_INC();
421
10
        return;
422
10
    }
423
10
    _Py_DECREF_STAT_INC();
424
10
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
10
}
Unexecuted instantiation: faulthandler.c:Py_DECREF
posixmodule.c:Py_DECREF
Line
Count
Source
416
2.79M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
2.79M
    if (_Py_IsImmortal(op)) {
420
1.05M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
1.05M
        return;
422
1.05M
    }
423
1.74M
    _Py_DECREF_STAT_INC();
424
1.74M
    if (--op->ob_refcnt == 0) {
425
712k
        _Py_Dealloc(op);
426
712k
    }
427
1.74M
}
signalmodule.c:Py_DECREF
Line
Count
Source
416
74
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
74
    if (_Py_IsImmortal(op)) {
420
37
        _Py_DECREF_IMMORTAL_STAT_INC();
421
37
        return;
422
37
    }
423
37
    _Py_DECREF_STAT_INC();
424
37
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
37
}
Unexecuted instantiation: _tracemalloc.c:Py_DECREF
Unexecuted instantiation: _suggestions.c:Py_DECREF
_datetimemodule.c:Py_DECREF
Line
Count
Source
416
15.8k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
15.8k
    if (_Py_IsImmortal(op)) {
420
2.48k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
2.48k
        return;
422
2.48k
    }
423
13.3k
    _Py_DECREF_STAT_INC();
424
13.3k
    if (--op->ob_refcnt == 0) {
425
4.53k
        _Py_Dealloc(op);
426
4.53k
    }
427
13.3k
}
Unexecuted instantiation: _codecsmodule.c:Py_DECREF
_collectionsmodule.c:Py_DECREF
Line
Count
Source
416
611k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
611k
    if (_Py_IsImmortal(op)) {
420
368k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
368k
        return;
422
368k
    }
423
243k
    _Py_DECREF_STAT_INC();
424
243k
    if (--op->ob_refcnt == 0) {
425
43.1k
        _Py_Dealloc(op);
426
43.1k
    }
427
243k
}
_iomodule.c:Py_DECREF
Line
Count
Source
416
1.56M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
1.56M
    if (_Py_IsImmortal(op)) {
420
1.47M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
1.47M
        return;
422
1.47M
    }
423
91.0k
    _Py_DECREF_STAT_INC();
424
91.0k
    if (--op->ob_refcnt == 0) {
425
44.5k
        _Py_Dealloc(op);
426
44.5k
    }
427
91.0k
}
iobase.c:Py_DECREF
Line
Count
Source
416
1.76M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
1.76M
    if (_Py_IsImmortal(op)) {
420
1.67M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
1.67M
        return;
422
1.67M
    }
423
85.0k
    _Py_DECREF_STAT_INC();
424
85.0k
    if (--op->ob_refcnt == 0) {
425
42.7k
        _Py_Dealloc(op);
426
42.7k
    }
427
85.0k
}
fileio.c:Py_DECREF
Line
Count
Source
416
44.2k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
44.2k
    if (_Py_IsImmortal(op)) {
420
0
        _Py_DECREF_IMMORTAL_STAT_INC();
421
0
        return;
422
0
    }
423
44.2k
    _Py_DECREF_STAT_INC();
424
44.2k
    if (--op->ob_refcnt == 0) {
425
22.0k
        _Py_Dealloc(op);
426
22.0k
    }
427
44.2k
}
bytesio.c:Py_DECREF
Line
Count
Source
416
333k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
333k
    if (_Py_IsImmortal(op)) {
420
127k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
127k
        return;
422
127k
    }
423
205k
    _Py_DECREF_STAT_INC();
424
205k
    if (--op->ob_refcnt == 0) {
425
11.0k
        _Py_Dealloc(op);
426
11.0k
    }
427
205k
}
bufferedio.c:Py_DECREF
Line
Count
Source
416
7.76M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
7.76M
    if (_Py_IsImmortal(op)) {
420
7.39M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
7.39M
        return;
422
7.39M
    }
423
368k
    _Py_DECREF_STAT_INC();
424
368k
    if (--op->ob_refcnt == 0) {
425
305k
        _Py_Dealloc(op);
426
305k
    }
427
368k
}
textio.c:Py_DECREF
Line
Count
Source
416
1.13M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
1.13M
    if (_Py_IsImmortal(op)) {
420
209k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
209k
        return;
422
209k
    }
423
921k
    _Py_DECREF_STAT_INC();
424
921k
    if (--op->ob_refcnt == 0) {
425
176k
        _Py_Dealloc(op);
426
176k
    }
427
921k
}
stringio.c:Py_DECREF
Line
Count
Source
416
329k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
329k
    if (_Py_IsImmortal(op)) {
420
168k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
168k
        return;
422
168k
    }
423
160k
    _Py_DECREF_STAT_INC();
424
160k
    if (--op->ob_refcnt == 0) {
425
25.4k
        _Py_Dealloc(op);
426
25.4k
    }
427
160k
}
itertoolsmodule.c:Py_DECREF
Line
Count
Source
416
106k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
106k
    if (_Py_IsImmortal(op)) {
420
5.66k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
5.66k
        return;
422
5.66k
    }
423
101k
    _Py_DECREF_STAT_INC();
424
101k
    if (--op->ob_refcnt == 0) {
425
34.5k
        _Py_Dealloc(op);
426
34.5k
    }
427
101k
}
sre.c:Py_DECREF
Line
Count
Source
416
258M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
258M
    if (_Py_IsImmortal(op)) {
420
86.6M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
86.6M
        return;
422
86.6M
    }
423
171M
    _Py_DECREF_STAT_INC();
424
171M
    if (--op->ob_refcnt == 0) {
425
15.1M
        _Py_Dealloc(op);
426
15.1M
    }
427
171M
}
Unexecuted instantiation: _sysconfig.c:Py_DECREF
_threadmodule.c:Py_DECREF
Line
Count
Source
416
7.61M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
7.61M
    if (_Py_IsImmortal(op)) {
420
4
        _Py_DECREF_IMMORTAL_STAT_INC();
421
4
        return;
422
4
    }
423
7.61M
    _Py_DECREF_STAT_INC();
424
7.61M
    if (--op->ob_refcnt == 0) {
425
8
        _Py_Dealloc(op);
426
8
    }
427
7.61M
}
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
416
74.8k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
74.8k
    if (_Py_IsImmortal(op)) {
420
29.0k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
29.0k
        return;
422
29.0k
    }
423
45.8k
    _Py_DECREF_STAT_INC();
424
45.8k
    if (--op->ob_refcnt == 0) {
425
8.54k
        _Py_Dealloc(op);
426
8.54k
    }
427
45.8k
}
_functoolsmodule.c:Py_DECREF
Line
Count
Source
416
907k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
907k
    if (_Py_IsImmortal(op)) {
420
177k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
177k
        return;
422
177k
    }
423
729k
    _Py_DECREF_STAT_INC();
424
729k
    if (--op->ob_refcnt == 0) {
425
347k
        _Py_Dealloc(op);
426
347k
    }
427
729k
}
Unexecuted instantiation: _localemodule.c:Py_DECREF
Unexecuted instantiation: _opcode.c:Py_DECREF
_operator.c:Py_DECREF
Line
Count
Source
416
693k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
693k
    if (_Py_IsImmortal(op)) {
420
346k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
346k
        return;
422
346k
    }
423
346k
    _Py_DECREF_STAT_INC();
424
346k
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
346k
}
Unexecuted instantiation: symtablemodule.c:Py_DECREF
Unexecuted instantiation: pwdmodule.c:Py_DECREF
getpath.c:Py_DECREF
Line
Count
Source
416
1.51k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
1.51k
    if (_Py_IsImmortal(op)) {
420
444
        _Py_DECREF_IMMORTAL_STAT_INC();
421
444
        return;
422
444
    }
423
1.07k
    _Py_DECREF_STAT_INC();
424
1.07k
    if (--op->ob_refcnt == 0) {
425
333
        _Py_Dealloc(op);
426
333
    }
427
1.07k
}
Unexecuted instantiation: frozen.c:Py_DECREF
Unexecuted instantiation: getbuildinfo.c:Py_DECREF
Unexecuted instantiation: peg_api.c:Py_DECREF
reader.c:Py_DECREF
Line
Count
Source
416
16
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
16
    if (_Py_IsImmortal(op)) {
420
0
        _Py_DECREF_IMMORTAL_STAT_INC();
421
0
        return;
422
0
    }
423
16
    _Py_DECREF_STAT_INC();
424
16
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
16
}
Unexecuted instantiation: source.c:Py_DECREF
helpers.c:Py_DECREF
Line
Count
Source
416
33.1k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
33.1k
    if (_Py_IsImmortal(op)) {
420
2.80k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
2.80k
        return;
422
2.80k
    }
423
30.3k
    _Py_DECREF_STAT_INC();
424
30.3k
    if (--op->ob_refcnt == 0) {
425
17.2k
        _Py_Dealloc(op);
426
17.2k
    }
427
30.3k
}
Unexecuted instantiation: myreadline.c:Py_DECREF
abstract.c:Py_DECREF
Line
Count
Source
416
526M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
526M
    if (_Py_IsImmortal(op)) {
420
335M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
335M
        return;
422
335M
    }
423
190M
    _Py_DECREF_STAT_INC();
424
190M
    if (--op->ob_refcnt == 0) {
425
5.73M
        _Py_Dealloc(op);
426
5.73M
    }
427
190M
}
Unexecuted instantiation: boolobject.c:Py_DECREF
Unexecuted instantiation: bytes_methods.c:Py_DECREF
bytearrayobject.c:Py_DECREF
Line
Count
Source
416
29.0M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
29.0M
    if (_Py_IsImmortal(op)) {
420
6.33M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
6.33M
        return;
422
6.33M
    }
423
22.6M
    _Py_DECREF_STAT_INC();
424
22.6M
    if (--op->ob_refcnt == 0) {
425
22.6M
        _Py_Dealloc(op);
426
22.6M
    }
427
22.6M
}
capsule.c:Py_DECREF
Line
Count
Source
416
20
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
20
    if (_Py_IsImmortal(op)) {
420
0
        _Py_DECREF_IMMORTAL_STAT_INC();
421
0
        return;
422
0
    }
423
20
    _Py_DECREF_STAT_INC();
424
20
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
20
}
cellobject.c:Py_DECREF
Line
Count
Source
416
8.89M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
8.89M
    if (_Py_IsImmortal(op)) {
420
597k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
597k
        return;
422
597k
    }
423
8.30M
    _Py_DECREF_STAT_INC();
424
8.30M
    if (--op->ob_refcnt == 0) {
425
4.99M
        _Py_Dealloc(op);
426
4.99M
    }
427
8.30M
}
classobject.c:Py_DECREF
Line
Count
Source
416
96.3M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
96.3M
    if (_Py_IsImmortal(op)) {
420
133
        _Py_DECREF_IMMORTAL_STAT_INC();
421
133
        return;
422
133
    }
423
96.3M
    _Py_DECREF_STAT_INC();
424
96.3M
    if (--op->ob_refcnt == 0) {
425
6.63k
        _Py_Dealloc(op);
426
6.63k
    }
427
96.3M
}
codeobject.c:Py_DECREF
Line
Count
Source
416
186k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
186k
    if (_Py_IsImmortal(op)) {
420
94.7k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
94.7k
        return;
422
94.7k
    }
423
91.9k
    _Py_DECREF_STAT_INC();
424
91.9k
    if (--op->ob_refcnt == 0) {
425
59.8k
        _Py_Dealloc(op);
426
59.8k
    }
427
91.9k
}
Unexecuted instantiation: complexobject.c:Py_DECREF
descrobject.c:Py_DECREF
Line
Count
Source
416
51.9M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
51.9M
    if (_Py_IsImmortal(op)) {
420
8.16M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
8.16M
        return;
422
8.16M
    }
423
43.8M
    _Py_DECREF_STAT_INC();
424
43.8M
    if (--op->ob_refcnt == 0) {
425
9.55M
        _Py_Dealloc(op);
426
9.55M
    }
427
43.8M
}
enumobject.c:Py_DECREF
Line
Count
Source
416
208M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
208M
    if (_Py_IsImmortal(op)) {
420
43.4M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
43.4M
        return;
422
43.4M
    }
423
165M
    _Py_DECREF_STAT_INC();
424
165M
    if (--op->ob_refcnt == 0) {
425
70.5M
        _Py_Dealloc(op);
426
70.5M
    }
427
165M
}
genobject.c:Py_DECREF
Line
Count
Source
416
105M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
105M
    if (_Py_IsImmortal(op)) {
420
105M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
105M
        return;
422
105M
    }
423
82.1k
    _Py_DECREF_STAT_INC();
424
82.1k
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
82.1k
}
fileobject.c:Py_DECREF
Line
Count
Source
416
264k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
264k
    if (_Py_IsImmortal(op)) {
420
262k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
262k
        return;
422
262k
    }
423
2.07k
    _Py_DECREF_STAT_INC();
424
2.07k
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
2.07k
}
frameobject.c:Py_DECREF
Line
Count
Source
416
40.2M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
40.2M
    if (_Py_IsImmortal(op)) {
420
84
        _Py_DECREF_IMMORTAL_STAT_INC();
421
84
        return;
422
84
    }
423
40.2M
    _Py_DECREF_STAT_INC();
424
40.2M
    if (--op->ob_refcnt == 0) {
425
9.79M
        _Py_Dealloc(op);
426
9.79M
    }
427
40.2M
}
funcobject.c:Py_DECREF
Line
Count
Source
416
141M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
141M
    if (_Py_IsImmortal(op)) {
420
78.6M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
78.6M
        return;
422
78.6M
    }
423
63.0M
    _Py_DECREF_STAT_INC();
424
63.0M
    if (--op->ob_refcnt == 0) {
425
2.81M
        _Py_Dealloc(op);
426
2.81M
    }
427
63.0M
}
interpolationobject.c:Py_DECREF
Line
Count
Source
416
53
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
53
    if (_Py_IsImmortal(op)) {
420
16
        _Py_DECREF_IMMORTAL_STAT_INC();
421
16
        return;
422
16
    }
423
37
    _Py_DECREF_STAT_INC();
424
37
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
37
}
iterobject.c:Py_DECREF
Line
Count
Source
416
11.9M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
11.9M
    if (_Py_IsImmortal(op)) {
420
5.24M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
5.24M
        return;
422
5.24M
    }
423
6.75M
    _Py_DECREF_STAT_INC();
424
6.75M
    if (--op->ob_refcnt == 0) {
425
427k
        _Py_Dealloc(op);
426
427k
    }
427
6.75M
}
lazyimportobject.c:Py_DECREF
Line
Count
Source
416
332
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
332
    if (_Py_IsImmortal(op)) {
420
59
        _Py_DECREF_IMMORTAL_STAT_INC();
421
59
        return;
422
59
    }
423
273
    _Py_DECREF_STAT_INC();
424
273
    if (--op->ob_refcnt == 0) {
425
20
        _Py_Dealloc(op);
426
20
    }
427
273
}
odictobject.c:Py_DECREF
Line
Count
Source
416
19.3k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
19.3k
    if (_Py_IsImmortal(op)) {
420
10.9k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
10.9k
        return;
422
10.9k
    }
423
8.43k
    _Py_DECREF_STAT_INC();
424
8.43k
    if (--op->ob_refcnt == 0) {
425
2.72k
        _Py_Dealloc(op);
426
2.72k
    }
427
8.43k
}
methodobject.c:Py_DECREF
Line
Count
Source
416
195M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
195M
    if (_Py_IsImmortal(op)) {
420
28.6M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
28.6M
        return;
422
28.6M
    }
423
166M
    _Py_DECREF_STAT_INC();
424
166M
    if (--op->ob_refcnt == 0) {
425
47.9M
        _Py_Dealloc(op);
426
47.9M
    }
427
166M
}
namespaceobject.c:Py_DECREF
Line
Count
Source
416
49
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
49
    if (_Py_IsImmortal(op)) {
420
0
        _Py_DECREF_IMMORTAL_STAT_INC();
421
0
        return;
422
0
    }
423
49
    _Py_DECREF_STAT_INC();
424
49
    if (--op->ob_refcnt == 0) {
425
49
        _Py_Dealloc(op);
426
49
    }
427
49
}
Unexecuted instantiation: _contextvars.c:Py_DECREF
Unexecuted instantiation: _strptime.c:Py_DECREF
Python-ast.c:Py_DECREF
Line
Count
Source
416
3.16M
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
3.16M
    if (_Py_IsImmortal(op)) {
420
1.91M
        _Py_DECREF_IMMORTAL_STAT_INC();
421
1.91M
        return;
422
1.91M
    }
423
1.25M
    _Py_DECREF_STAT_INC();
424
1.25M
    if (--op->ob_refcnt == 0) {
425
245
        _Py_Dealloc(op);
426
245
    }
427
1.25M
}
Python-tokenize.c:Py_DECREF
Line
Count
Source
416
492
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
492
    if (_Py_IsImmortal(op)) {
420
192
        _Py_DECREF_IMMORTAL_STAT_INC();
421
192
        return;
422
192
    }
423
300
    _Py_DECREF_STAT_INC();
424
300
    if (--op->ob_refcnt == 0) {
425
16
        _Py_Dealloc(op);
426
16
    }
427
300
}
Unexecuted instantiation: asdl.c:Py_DECREF
assemble.c:Py_DECREF
Line
Count
Source
416
26.9k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
26.9k
    if (_Py_IsImmortal(op)) {
420
6.45k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
6.45k
        return;
422
6.45k
    }
423
20.4k
    _Py_DECREF_STAT_INC();
424
20.4k
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
20.4k
}
Unexecuted instantiation: ast.c:Py_DECREF
Unexecuted instantiation: ast_preprocess.c:Py_DECREF
Unexecuted instantiation: ast_unparse.c:Py_DECREF
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
pegen.c:Py_DECREF
Line
Count
Source
416
113k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
113k
    if (_Py_IsImmortal(op)) {
420
4.57k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
4.57k
        return;
422
4.57k
    }
423
109k
    _Py_DECREF_STAT_INC();
424
109k
    if (--op->ob_refcnt == 0) {
425
106k
        _Py_Dealloc(op);
426
106k
    }
427
109k
}
pegen_errors.c:Py_DECREF
Line
Count
Source
416
214k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
214k
    if (_Py_IsImmortal(op)) {
420
673
        _Py_DECREF_IMMORTAL_STAT_INC();
421
673
        return;
422
673
    }
423
213k
    _Py_DECREF_STAT_INC();
424
213k
    if (--op->ob_refcnt == 0) {
425
789
        _Py_Dealloc(op);
426
789
    }
427
213k
}
Unexecuted instantiation: parser.c:Py_DECREF
Unexecuted instantiation: parser_invalid.c:Py_DECREF
lexer.c:Py_DECREF
Line
Count
Source
416
15.2k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
15.2k
    if (_Py_IsImmortal(op)) {
420
1.88k
        _Py_DECREF_IMMORTAL_STAT_INC();
421
1.88k
        return;
422
1.88k
    }
423
13.3k
    _Py_DECREF_STAT_INC();
424
13.3k
    if (--op->ob_refcnt == 0) {
425
13.3k
        _Py_Dealloc(op);
426
13.3k
    }
427
13.3k
}
Unexecuted instantiation: layout.c:Py_DECREF
Unexecuted instantiation: number.c:Py_DECREF
state.c:Py_DECREF
Line
Count
Source
416
65.5k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
65.5k
    if (_Py_IsImmortal(op)) {
420
760
        _Py_DECREF_IMMORTAL_STAT_INC();
421
760
        return;
422
760
    }
423
64.7k
    _Py_DECREF_STAT_INC();
424
64.7k
    if (--op->ob_refcnt == 0) {
425
0
        _Py_Dealloc(op);
426
0
    }
427
64.7k
}
Unexecuted instantiation: string.c:Py_DECREF
decoder.c:Py_DECREF
Line
Count
Source
416
3.91k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
3.91k
    if (_Py_IsImmortal(op)) {
420
44
        _Py_DECREF_IMMORTAL_STAT_INC();
421
44
        return;
422
44
    }
423
3.87k
    _Py_DECREF_STAT_INC();
424
3.87k
    if (--op->ob_refcnt == 0) {
425
3.57k
        _Py_Dealloc(op);
426
3.57k
    }
427
3.87k
}
Unexecuted instantiation: api.c:Py_DECREF
Unexecuted instantiation: getcompiler.c:Py_DECREF
Unexecuted instantiation: mystrtoul.c:Py_DECREF
Unexecuted instantiation: token.c:Py_DECREF
action_helpers.c:Py_DECREF
Line
Count
Source
416
511
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
511
    if (_Py_IsImmortal(op)) {
420
0
        _Py_DECREF_IMMORTAL_STAT_INC();
421
0
        return;
422
0
    }
423
511
    _Py_DECREF_STAT_INC();
424
511
    if (--op->ob_refcnt == 0) {
425
511
        _Py_Dealloc(op);
426
511
    }
427
511
}
string_parser.c:Py_DECREF
Line
Count
Source
416
8.62k
{
417
    // Non-limited C API and limited C API for Python 3.9 and older access
418
    // directly PyObject.ob_refcnt.
419
8.62k
    if (_Py_IsImmortal(op)) {
420
325
        _Py_DECREF_IMMORTAL_STAT_INC();
421
325
        return;
422
325
    }
423
8.29k
    _Py_DECREF_STAT_INC();
424
8.29k
    if (--op->ob_refcnt == 0) {
425
8.29k
        _Py_Dealloc(op);
426
8.29k
    }
427
8.29k
}
428
15.5G
#define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op))
429
#endif
430
431
432
/* Safely decref `op` and set `op` to NULL, especially useful in tp_clear
433
 * and tp_dealloc implementations.
434
 *
435
 * Note that "the obvious" code can be deadly:
436
 *
437
 *     Py_XDECREF(op);
438
 *     op = NULL;
439
 *
440
 * Typically, `op` is something like self->containee, and `self` is done
441
 * using its `containee` member.  In the code sequence above, suppose
442
 * `containee` is non-NULL with a refcount of 1.  Its refcount falls to
443
 * 0 on the first line, which can trigger an arbitrary amount of code,
444
 * possibly including finalizers (like __del__ methods or weakref callbacks)
445
 * coded in Python, which in turn can release the GIL and allow other threads
446
 * to run, etc.  Such code may even invoke methods of `self` again, or cause
447
 * cyclic gc to trigger, but-- oops! --self->containee still points to the
448
 * object being torn down, and it may be in an insane state while being torn
449
 * down.  This has in fact been a rich historic source of miserable (rare &
450
 * hard-to-diagnose) segfaulting (and other) bugs.
451
 *
452
 * The safe way is:
453
 *
454
 *      Py_CLEAR(op);
455
 *
456
 * That arranges to set `op` to NULL _before_ decref'ing, so that any code
457
 * triggered as a side-effect of `op` getting torn down no longer believes
458
 * `op` points to a valid object.
459
 *
460
 * There are cases where it's safe to use the naive code, but they're brittle.
461
 * For example, if `op` points to a Python integer, you know that destroying
462
 * one of those can't cause problems -- but in part that relies on that
463
 * Python integers aren't currently weakly referencable.  Best practice is
464
 * to use Py_CLEAR() even if you can't think of a reason for why you need to.
465
 *
466
 * gh-98724: Use a temporary variable to only evaluate the macro argument once,
467
 * to avoid the duplication of side effects if the argument has side effects.
468
 *
469
 * gh-99701: If the PyObject* type is used with casting arguments to PyObject*,
470
 * the code can be miscompiled with strict aliasing because of type punning.
471
 * With strict aliasing, a compiler considers that two pointers of different
472
 * types cannot read or write the same memory which enables optimization
473
 * opportunities.
474
 *
475
 * If available, use _Py_TYPEOF() to use the 'op' type for temporary variables,
476
 * and so avoid type punning. Otherwise, use memcpy() which causes type erasure
477
 * and so prevents the compiler to reuse an old cached 'op' value after
478
 * Py_CLEAR().
479
 *
480
 * On C++11 and newer, use "auto". On MSVC, check also _MSVC_LANG since
481
 * __cplusplus is 199711L unless the /Zc:__cplusplus flag is used.
482
 */
483
#ifdef _Py_TYPEOF
484
#define Py_CLEAR(op) \
485
2.59G
    do { \
486
2.59G
        _Py_TYPEOF(&(op)) _tmp_op_ptr = &(op); \
487
2.59G
        _Py_TYPEOF(op) _tmp_old_op = (*_tmp_op_ptr); \
488
2.59G
        if (_tmp_old_op != _Py_NULL) { \
489
465M
            *_tmp_op_ptr = _Py_NULL; \
490
465M
            Py_DECREF(_PyObject_CAST(_tmp_old_op)); \
491
465M
        } \
492
2.59G
    } while (0)
493
#elif defined(__cplusplus) && (__cplusplus >= 201103L ||  _MSVC_LANG >= 201103L)
494
#define Py_CLEAR(op) \
495
    do { \
496
        auto _tmp_op_ptr = &(op); \
497
        auto _tmp_old_op = (*_tmp_op_ptr); \
498
        if (_tmp_old_op != _Py_NULL) { \
499
            *_tmp_op_ptr = _Py_NULL; \
500
            Py_DECREF(_PyObject_CAST(_tmp_old_op)); \
501
        } \
502
    } while (0)
503
#else
504
#define Py_CLEAR(op) \
505
    do { \
506
        PyObject **_tmp_op_ptr = _Py_CAST(PyObject**, &(op)); \
507
        PyObject *_tmp_old_op; \
508
        memcpy(&_tmp_old_op, _tmp_op_ptr, sizeof(PyObject*)); \
509
        if (_tmp_old_op != _Py_NULL) { \
510
            PyObject *_null_ptr = _Py_NULL; \
511
            memcpy(_tmp_op_ptr, &_null_ptr, sizeof(PyObject*)); \
512
            Py_DECREF(_tmp_old_op); \
513
        } \
514
    } while (0)
515
#endif
516
517
518
/* Safely decref `dst` and set `dst` to `src`.
519
 *
520
 * As in case of Py_CLEAR "the obvious" code can be deadly:
521
 *
522
 *     Py_DECREF(dst);
523
 *     dst = src;
524
 *
525
 * The safe way is:
526
 *
527
 *      Py_SETREF(dst, src);
528
 *
529
 * That arranges to set `dst` to `src` _before_ decref'ing, so that any code
530
 * triggered as a side-effect of `dst` getting torn down no longer believes
531
 * `dst` points to a valid object.
532
 *
533
 * Temporary variables are used to only evaluate macro arguments once and so
534
 * avoid the duplication of side effects. _Py_TYPEOF(), C++ auto, or memcpy()
535
 * is used to avoid a miscompilation caused by type punning. See Py_CLEAR()
536
 * comment for implementation details about type punning.
537
 *
538
 * The memcpy() implementation does not emit a compiler warning if 'src' has
539
 * not the same type than 'src': any pointer type is accepted for 'src'.
540
 */
541
#ifdef _Py_TYPEOF
542
#define Py_SETREF(dst, src) \
543
169M
    do { \
544
169M
        _Py_TYPEOF(&(dst)) _tmp_dst_ptr = &(dst); \
545
169M
        _Py_TYPEOF(dst) _tmp_old_dst = (*_tmp_dst_ptr); \
546
169M
        *_tmp_dst_ptr = (src); \
547
169M
        Py_DECREF(_PyObject_CAST(_tmp_old_dst)); \
548
169M
    } while (0)
549
#elif defined(__cplusplus) && (__cplusplus >= 201103L ||  _MSVC_LANG >= 201103L)
550
#define Py_SETREF(dst, src) \
551
    do { \
552
        auto _tmp_dst_ptr = &(dst); \
553
        auto _tmp_old_dst = (*_tmp_dst_ptr); \
554
        *_tmp_dst_ptr = (src); \
555
        Py_DECREF(_PyObject_CAST(_tmp_old_dst)); \
556
    } while (0)
557
#else
558
#define Py_SETREF(dst, src) \
559
    do { \
560
        PyObject **_tmp_dst_ptr = _Py_CAST(PyObject**, &(dst)); \
561
        PyObject *_tmp_old_dst; \
562
        PyObject *_tmp_src = _PyObject_CAST(src); \
563
        memcpy(&_tmp_old_dst, _tmp_dst_ptr, sizeof(PyObject*)); \
564
        memcpy(_tmp_dst_ptr, &_tmp_src, sizeof(PyObject*)); \
565
        Py_DECREF(_tmp_old_dst); \
566
    } while (0)
567
#endif
568
569
/* Py_XSETREF() is a variant of Py_SETREF() that uses Py_XDECREF() instead of
570
 * Py_DECREF().
571
 */
572
#ifdef _Py_TYPEOF
573
#define Py_XSETREF(dst, src) \
574
258M
    do { \
575
258M
        _Py_TYPEOF(&(dst)) _tmp_dst_ptr = &(dst); \
576
258M
        _Py_TYPEOF(dst) _tmp_old_dst = (*_tmp_dst_ptr); \
577
258M
        *_tmp_dst_ptr = (src); \
578
258M
        Py_XDECREF(_PyObject_CAST(_tmp_old_dst)); \
579
258M
    } while (0)
580
#elif defined(__cplusplus) && (__cplusplus >= 201103L ||  _MSVC_LANG >= 201103L)
581
#define Py_XSETREF(dst, src) \
582
    do { \
583
        auto _tmp_dst_ptr = &(dst); \
584
        auto _tmp_old_dst = (*_tmp_dst_ptr); \
585
        *_tmp_dst_ptr = (src); \
586
        Py_XDECREF(_PyObject_CAST(_tmp_old_dst)); \
587
    } while (0)
588
#else
589
#define Py_XSETREF(dst, src) \
590
    do { \
591
        PyObject **_tmp_dst_ptr = _Py_CAST(PyObject**, &(dst)); \
592
        PyObject *_tmp_old_dst; \
593
        PyObject *_tmp_src = _PyObject_CAST(src); \
594
        memcpy(&_tmp_old_dst, _tmp_dst_ptr, sizeof(PyObject*)); \
595
        memcpy(_tmp_dst_ptr, &_tmp_src, sizeof(PyObject*)); \
596
        Py_XDECREF(_tmp_old_dst); \
597
    } while (0)
598
#endif
599
600
601
/* Function to use in case the object pointer can be NULL: */
602
static inline void Py_XINCREF(PyObject *op)
603
3.03G
{
604
3.03G
    if (op != _Py_NULL) {
605
2.31G
        Py_INCREF(op);
606
2.31G
    }
607
3.03G
}
Unexecuted instantiation: bytesobject.c:Py_XINCREF
Unexecuted instantiation: call.c:Py_XINCREF
exceptions.c:Py_XINCREF
Line
Count
Source
603
74.4M
{
604
74.4M
    if (op != _Py_NULL) {
605
23.8M
        Py_INCREF(op);
606
23.8M
    }
607
74.4M
}
Unexecuted instantiation: genericaliasobject.c:Py_XINCREF
Unexecuted instantiation: floatobject.c:Py_XINCREF
listobject.c:Py_XINCREF
Line
Count
Source
603
204M
{
604
204M
    if (op != _Py_NULL) {
605
204M
        Py_INCREF(op);
606
204M
    }
607
204M
}
Unexecuted instantiation: longobject.c:Py_XINCREF
dictobject.c:Py_XINCREF
Line
Count
Source
603
1.70G
{
604
1.70G
    if (op != _Py_NULL) {
605
1.50G
        Py_INCREF(op);
606
1.50G
    }
607
1.70G
}
memoryobject.c:Py_XINCREF
Line
Count
Source
603
114
{
604
114
    if (op != _Py_NULL) {
605
114
        Py_INCREF(op);
606
114
    }
607
114
}
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
603
180
{
604
180
    if (op != _Py_NULL) {
605
4
        Py_INCREF(op);
606
4
    }
607
180
}
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
603
580k
{
604
580k
    if (op != _Py_NULL) {
605
286k
        Py_INCREF(op);
606
286k
    }
607
580k
}
typevarobject.c:Py_XINCREF
Line
Count
Source
603
1.24k
{
604
1.24k
    if (op != _Py_NULL) {
605
249
        Py_INCREF(op);
606
249
    }
607
1.24k
}
Unexecuted instantiation: unicode_format.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
603
439k
{
604
439k
    if (op != _Py_NULL) {
605
82.0k
        Py_INCREF(op);
606
82.0k
    }
607
439k
}
_warnings.c:Py_XINCREF
Line
Count
Source
603
222
{
604
222
    if (op != _Py_NULL) {
605
222
        Py_INCREF(op);
606
222
    }
607
222
}
bltinmodule.c:Py_XINCREF
Line
Count
Source
603
1.12k
{
604
1.12k
    if (op != _Py_NULL) {
605
1.12k
        Py_INCREF(op);
606
1.12k
    }
607
1.12k
}
ceval.c:Py_XINCREF
Line
Count
Source
603
389M
{
604
389M
    if (op != _Py_NULL) {
605
165M
        Py_INCREF(op);
606
165M
    }
607
389M
}
Unexecuted instantiation: codecs.c:Py_XINCREF
Unexecuted instantiation: codegen.c:Py_XINCREF
compile.c:Py_XINCREF
Line
Count
Source
603
6.85k
{
604
6.85k
    if (op != _Py_NULL) {
605
2.33k
        Py_INCREF(op);
606
2.33k
    }
607
6.85k
}
context.c:Py_XINCREF
Line
Count
Source
603
195k
{
604
195k
    if (op != _Py_NULL) {
605
0
        Py_INCREF(op);
606
0
    }
607
195k
}
errors.c:Py_XINCREF
Line
Count
Source
603
44.4M
{
604
44.4M
    if (op != _Py_NULL) {
605
44.4M
        Py_INCREF(op);
606
44.4M
    }
607
44.4M
}
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
603
4.29k
{
604
4.29k
    if (op != _Py_NULL) {
605
1.96k
        Py_INCREF(op);
606
1.96k
    }
607
4.29k
}
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
Unexecuted instantiation: pymath.c:Py_XINCREF
pystate.c:Py_XINCREF
Line
Count
Source
603
854k
{
604
854k
    if (op != _Py_NULL) {
605
854k
        Py_INCREF(op);
606
854k
    }
607
854k
}
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
603
3.47M
{
604
3.47M
    if (op != _Py_NULL) {
605
2.98M
        Py_INCREF(op);
606
2.98M
    }
607
3.47M
}
Unexecuted instantiation: symtable.c:Py_XINCREF
sysmodule.c:Py_XINCREF
Line
Count
Source
603
21.4k
{
604
21.4k
    if (op != _Py_NULL) {
605
21.4k
        Py_INCREF(op);
606
21.4k
    }
607
21.4k
}
Unexecuted instantiation: thread.c:Py_XINCREF
traceback.c:Py_XINCREF
Line
Count
Source
603
66.0M
{
604
66.0M
    if (op != _Py_NULL) {
605
22.5M
        Py_INCREF(op);
606
22.5M
    }
607
66.0M
}
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: pystrhex.c:Py_XINCREF
Unexecuted instantiation: dtoa.c:Py_XINCREF
Unexecuted instantiation: fileutils.c:Py_XINCREF
suggestions.c:Py_XINCREF
Line
Count
Source
603
125
{
604
125
    if (op != _Py_NULL) {
605
40
        Py_INCREF(op);
606
40
    }
607
125
}
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
posixmodule.c:Py_XINCREF
Line
Count
Source
603
97.0k
{
604
97.0k
    if (op != _Py_NULL) {
605
97.0k
        Py_INCREF(op);
606
97.0k
    }
607
97.0k
}
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
603
6.01k
{
604
6.01k
    if (op != _Py_NULL) {
605
964
        Py_INCREF(op);
606
964
    }
607
6.01k
}
Unexecuted instantiation: _codecsmodule.c:Py_XINCREF
_collectionsmodule.c:Py_XINCREF
Line
Count
Source
603
164k
{
604
164k
    if (op != _Py_NULL) {
605
164k
        Py_INCREF(op);
606
164k
    }
607
164k
}
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
603
2.08k
{
604
2.08k
    if (op != _Py_NULL) {
605
2.08k
        Py_INCREF(op);
606
2.08k
    }
607
2.08k
}
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
_threadmodule.c:Py_XINCREF
Line
Count
Source
603
168
{
604
168
    if (op != _Py_NULL) {
605
84
        Py_INCREF(op);
606
84
    }
607
168
}
Unexecuted instantiation: timemodule.c:Py_XINCREF
Unexecuted instantiation: _typesmodule.c:Py_XINCREF
Unexecuted instantiation: _typingmodule.c:Py_XINCREF
Unexecuted instantiation: _weakref.c:Py_XINCREF
Unexecuted instantiation: _abc.c:Py_XINCREF
_functoolsmodule.c:Py_XINCREF
Line
Count
Source
603
44
{
604
44
    if (op != _Py_NULL) {
605
0
        Py_INCREF(op);
606
0
    }
607
44
}
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
Unexecuted instantiation: getpath.c:Py_XINCREF
Unexecuted instantiation: frozen.c:Py_XINCREF
Unexecuted instantiation: getbuildinfo.c:Py_XINCREF
Unexecuted instantiation: peg_api.c:Py_XINCREF
Unexecuted instantiation: reader.c:Py_XINCREF
Unexecuted instantiation: source.c:Py_XINCREF
Unexecuted instantiation: helpers.c:Py_XINCREF
Unexecuted instantiation: myreadline.c:Py_XINCREF
abstract.c:Py_XINCREF
Line
Count
Source
603
126M
{
604
126M
    if (op != _Py_NULL) {
605
123M
        Py_INCREF(op);
606
123M
    }
607
126M
}
Unexecuted instantiation: boolobject.c:Py_XINCREF
Unexecuted instantiation: bytes_methods.c:Py_XINCREF
Unexecuted instantiation: bytearrayobject.c:Py_XINCREF
Unexecuted instantiation: capsule.c:Py_XINCREF
cellobject.c:Py_XINCREF
Line
Count
Source
603
16.8M
{
604
16.8M
    if (op != _Py_NULL) {
605
3.51M
        Py_INCREF(op);
606
3.51M
    }
607
16.8M
}
Unexecuted instantiation: classobject.c:Py_XINCREF
codeobject.c:Py_XINCREF
Line
Count
Source
603
3.09k
{
604
3.09k
    if (op != _Py_NULL) {
605
3.09k
        Py_INCREF(op);
606
3.09k
    }
607
3.09k
}
Unexecuted instantiation: complexobject.c:Py_XINCREF
descrobject.c:Py_XINCREF
Line
Count
Source
603
111k
{
604
111k
    if (op != _Py_NULL) {
605
106k
        Py_INCREF(op);
606
106k
    }
607
111k
}
Unexecuted instantiation: enumobject.c:Py_XINCREF
genobject.c:Py_XINCREF
Line
Count
Source
603
41.3k
{
604
41.3k
    if (op != _Py_NULL) {
605
0
        Py_INCREF(op);
606
0
    }
607
41.3k
}
Unexecuted instantiation: fileobject.c:Py_XINCREF
frameobject.c:Py_XINCREF
Line
Count
Source
603
22.8M
{
604
22.8M
    if (op != _Py_NULL) {
605
22.8M
        Py_INCREF(op);
606
22.8M
    }
607
22.8M
}
funcobject.c:Py_XINCREF
Line
Count
Source
603
17.5k
{
604
17.5k
    if (op != _Py_NULL) {
605
4.95k
        Py_INCREF(op);
606
4.95k
    }
607
17.5k
}
Unexecuted instantiation: interpolationobject.c:Py_XINCREF
iterobject.c:Py_XINCREF
Line
Count
Source
603
8.34M
{
604
8.34M
    if (op != _Py_NULL) {
605
8.34M
        Py_INCREF(op);
606
8.34M
    }
607
8.34M
}
lazyimportobject.c:Py_XINCREF
Line
Count
Source
603
1.23k
{
604
1.23k
    if (op != _Py_NULL) {
605
782
        Py_INCREF(op);
606
782
    }
607
1.23k
}
Unexecuted instantiation: odictobject.c:Py_XINCREF
methodobject.c:Py_XINCREF
Line
Count
Source
603
368M
{
604
368M
    if (op != _Py_NULL) {
605
184M
        Py_INCREF(op);
606
184M
    }
607
368M
}
Unexecuted instantiation: namespaceobject.c:Py_XINCREF
Unexecuted instantiation: _contextvars.c:Py_XINCREF
Unexecuted instantiation: _strptime.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: pegen.c:Py_XINCREF
Unexecuted instantiation: pegen_errors.c:Py_XINCREF
Unexecuted instantiation: parser.c:Py_XINCREF
Unexecuted instantiation: parser_invalid.c:Py_XINCREF
Unexecuted instantiation: lexer.c:Py_XINCREF
Unexecuted instantiation: layout.c:Py_XINCREF
Unexecuted instantiation: number.c:Py_XINCREF
Unexecuted instantiation: state.c:Py_XINCREF
Unexecuted instantiation: string.c:Py_XINCREF
Unexecuted instantiation: decoder.c:Py_XINCREF
api.c:Py_XINCREF
Line
Count
Source
603
129k
{
604
129k
    if (op != _Py_NULL) {
605
65.5k
        Py_INCREF(op);
606
65.5k
    }
607
129k
}
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
608
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < _Py_PACK_VERSION(3, 11)
609
3.03G
#  define Py_XINCREF(op) Py_XINCREF(_PyObject_CAST(op))
610
#endif
611
612
static inline void Py_XDECREF(PyObject *op)
613
10.7G
{
614
10.7G
    if (op != _Py_NULL) {
615
9.58G
        Py_DECREF(op);
616
9.58G
    }
617
10.7G
}
bytesobject.c:Py_XDECREF
Line
Count
Source
613
41
{
614
41
    if (op != _Py_NULL) {
615
37
        Py_DECREF(op);
616
37
    }
617
41
}
Unexecuted instantiation: call.c:Py_XDECREF
exceptions.c:Py_XDECREF
Line
Count
Source
613
138M
{
614
138M
    if (op != _Py_NULL) {
615
70.4M
        Py_DECREF(op);
616
70.4M
    }
617
138M
}
genericaliasobject.c:Py_XDECREF
Line
Count
Source
613
556
{
614
556
    if (op != _Py_NULL) {
615
296
        Py_DECREF(op);
616
296
    }
617
556
}
floatobject.c:Py_XDECREF
Line
Count
Source
613
729k
{
614
729k
    if (op != _Py_NULL) {
615
478k
        Py_DECREF(op);
616
478k
    }
617
729k
}
listobject.c:Py_XDECREF
Line
Count
Source
613
2.26G
{
614
2.26G
    if (op != _Py_NULL) {
615
2.22G
        Py_DECREF(op);
616
2.22G
    }
617
2.26G
}
longobject.c:Py_XDECREF
Line
Count
Source
613
23.6M
{
614
23.6M
    if (op != _Py_NULL) {
615
11.3M
        Py_DECREF(op);
616
11.3M
    }
617
23.6M
}
dictobject.c:Py_XDECREF
Line
Count
Source
613
539M
{
614
539M
    if (op != _Py_NULL) {
615
471M
        Py_DECREF(op);
616
471M
    }
617
539M
}
Unexecuted instantiation: memoryobject.c:Py_XDECREF
moduleobject.c:Py_XDECREF
Line
Count
Source
613
6.69k
{
614
6.69k
    if (op != _Py_NULL) {
615
2.37k
        Py_DECREF(op);
616
2.37k
    }
617
6.69k
}
object.c:Py_XDECREF
Line
Count
Source
613
9.06M
{
614
9.06M
    if (op != _Py_NULL) {
615
41.1k
        Py_DECREF(op);
616
41.1k
    }
617
9.06M
}
Unexecuted instantiation: obmalloc.c:Py_XDECREF
Unexecuted instantiation: picklebufobject.c:Py_XDECREF
rangeobject.c:Py_XDECREF
Line
Count
Source
613
111
{
614
111
    if (op != _Py_NULL) {
615
111
        Py_DECREF(op);
616
111
    }
617
111
}
sentinelobject.c:Py_XDECREF
Line
Count
Source
613
28
{
614
28
    if (op != _Py_NULL) {
615
0
        Py_DECREF(op);
616
0
    }
617
28
}
setobject.c:Py_XDECREF
Line
Count
Source
613
377k
{
614
377k
    if (op != _Py_NULL) {
615
342
        Py_DECREF(op);
616
342
    }
617
377k
}
Unexecuted instantiation: sliceobject.c:Py_XDECREF
structseq.c:Py_XDECREF
Line
Count
Source
613
4.55M
{
614
4.55M
    if (op != _Py_NULL) {
615
4.55M
        Py_DECREF(op);
616
4.55M
    }
617
4.55M
}
Unexecuted instantiation: templateobject.c:Py_XDECREF
tupleobject.c:Py_XDECREF
Line
Count
Source
613
6.03G
{
614
6.03G
    if (op != _Py_NULL) {
615
6.02G
        Py_DECREF(op);
616
6.02G
    }
617
6.03G
}
typeobject.c:Py_XDECREF
Line
Count
Source
613
29.9M
{
614
29.9M
    if (op != _Py_NULL) {
615
3.86M
        Py_DECREF(op);
616
3.86M
    }
617
29.9M
}
typevarobject.c:Py_XDECREF
Line
Count
Source
613
600
{
614
600
    if (op != _Py_NULL) {
615
428
        Py_DECREF(op);
616
428
    }
617
600
}
unicode_format.c:Py_XDECREF
Line
Count
Source
613
22.4M
{
614
22.4M
    if (op != _Py_NULL) {
615
50.2k
        Py_DECREF(op);
616
50.2k
    }
617
22.4M
}
unicode_formatter.c:Py_XDECREF
Line
Count
Source
613
56.7M
{
614
56.7M
    if (op != _Py_NULL) {
615
45.3M
        Py_DECREF(op);
616
45.3M
    }
617
56.7M
}
unicode_writer.c:Py_XDECREF
Line
Count
Source
613
80.7M
{
614
80.7M
    if (op != _Py_NULL) {
615
23.4M
        Py_DECREF(op);
616
23.4M
    }
617
80.7M
}
Unexecuted instantiation: unicodectype.c:Py_XDECREF
unicodeobject.c:Py_XDECREF
Line
Count
Source
613
118M
{
614
118M
    if (op != _Py_NULL) {
615
63.5M
        Py_DECREF(op);
616
63.5M
    }
617
118M
}
unionobject.c:Py_XDECREF
Line
Count
Source
613
2.09k
{
614
2.09k
    if (op != _Py_NULL) {
615
332
        Py_DECREF(op);
616
332
    }
617
2.09k
}
weakrefobject.c:Py_XDECREF
Line
Count
Source
613
427k
{
614
427k
    if (op != _Py_NULL) {
615
69.1k
        Py_DECREF(op);
616
69.1k
    }
617
427k
}
_warnings.c:Py_XDECREF
Line
Count
Source
613
8.17M
{
614
8.17M
    if (op != _Py_NULL) {
615
5.07M
        Py_DECREF(op);
616
5.07M
    }
617
8.17M
}
bltinmodule.c:Py_XDECREF
Line
Count
Source
613
14.7M
{
614
14.7M
    if (op != _Py_NULL) {
615
540k
        Py_DECREF(op);
616
540k
    }
617
14.7M
}
ceval.c:Py_XDECREF
Line
Count
Source
613
5.51M
{
614
5.51M
    if (op != _Py_NULL) {
615
117k
        Py_DECREF(op);
616
117k
    }
617
5.51M
}
codecs.c:Py_XDECREF
Line
Count
Source
613
161k
{
614
161k
    if (op != _Py_NULL) {
615
107k
        Py_DECREF(op);
616
107k
    }
617
161k
}
Unexecuted instantiation: codegen.c:Py_XDECREF
compile.c:Py_XDECREF
Line
Count
Source
613
10.4k
{
614
10.4k
    if (op != _Py_NULL) {
615
6.64k
        Py_DECREF(op);
616
6.64k
    }
617
10.4k
}
Unexecuted instantiation: context.c:Py_XDECREF
errors.c:Py_XDECREF
Line
Count
Source
613
279M
{
614
279M
    if (op != _Py_NULL) {
615
32.4M
        Py_DECREF(op);
616
32.4M
    }
617
279M
}
Unexecuted instantiation: flowgraph.c:Py_XDECREF
Unexecuted instantiation: frame.c:Py_XDECREF
future.c:Py_XDECREF
Line
Count
Source
613
125
{
614
125
    if (op != _Py_NULL) {
615
125
        Py_DECREF(op);
616
125
    }
617
125
}
gc.c:Py_XDECREF
Line
Count
Source
613
273k
{
614
273k
    if (op != _Py_NULL) {
615
2.58k
        Py_DECREF(op);
616
2.58k
    }
617
273k
}
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
613
7.05M
{
614
7.05M
    if (op != _Py_NULL) {
615
6.03M
        Py_DECREF(op);
616
6.03M
    }
617
7.05M
}
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
613
7.69k
{
614
7.69k
    if (op != _Py_NULL) {
615
0
        Py_DECREF(op);
616
0
    }
617
7.69k
}
intrinsics.c:Py_XDECREF
Line
Count
Source
613
39.7k
{
614
39.7k
    if (op != _Py_NULL) {
615
39.7k
        Py_DECREF(op);
616
39.7k
    }
617
39.7k
}
Unexecuted instantiation: legacy_tracing.c:Py_XDECREF
Unexecuted instantiation: lock.c:Py_XDECREF
marshal.c:Py_XDECREF
Line
Count
Source
613
980k
{
614
980k
    if (op != _Py_NULL) {
615
980k
        Py_DECREF(op);
616
980k
    }
617
980k
}
modsupport.c:Py_XDECREF
Line
Count
Source
613
15.1k
{
614
15.1k
    if (op != _Py_NULL) {
615
15.1k
        Py_DECREF(op);
616
15.1k
    }
617
15.1k
}
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
613
222
{
614
222
    if (op != _Py_NULL) {
615
222
        Py_DECREF(op);
616
222
    }
617
222
}
Unexecuted instantiation: pymath.c:Py_XDECREF
Unexecuted instantiation: pystate.c:Py_XDECREF
pythonrun.c:Py_XDECREF
Line
Count
Source
613
60.5k
{
614
60.5k
    if (op != _Py_NULL) {
615
1.12k
        Py_DECREF(op);
616
1.12k
    }
617
60.5k
}
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
613
5.17M
{
614
5.17M
    if (op != _Py_NULL) {
615
3.37M
        Py_DECREF(op);
616
3.37M
    }
617
5.17M
}
Unexecuted instantiation: slots.c:Py_XDECREF
Unexecuted instantiation: slots_generated.c:Py_XDECREF
structmember.c:Py_XDECREF
Line
Count
Source
613
2.85M
{
614
2.85M
    if (op != _Py_NULL) {
615
1.87k
        Py_DECREF(op);
616
1.87k
    }
617
2.85M
}
symtable.c:Py_XDECREF
Line
Count
Source
613
96.3k
{
614
96.3k
    if (op != _Py_NULL) {
615
71.8k
        Py_DECREF(op);
616
71.8k
    }
617
96.3k
}
sysmodule.c:Py_XDECREF
Line
Count
Source
613
1.86M
{
614
1.86M
    if (op != _Py_NULL) {
615
1.39M
        Py_DECREF(op);
616
1.39M
    }
617
1.86M
}
Unexecuted instantiation: thread.c:Py_XDECREF
traceback.c:Py_XDECREF
Line
Count
Source
613
264M
{
614
264M
    if (op != _Py_NULL) {
615
177M
        Py_DECREF(op);
616
177M
    }
617
264M
}
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: pystrhex.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
atexitmodule.c:Py_XDECREF
Line
Count
Source
613
10
{
614
10
    if (op != _Py_NULL) {
615
10
        Py_DECREF(op);
616
10
    }
617
10
}
Unexecuted instantiation: faulthandler.c:Py_XDECREF
posixmodule.c:Py_XDECREF
Line
Count
Source
613
907k
{
614
907k
    if (op != _Py_NULL) {
615
770k
        Py_DECREF(op);
616
770k
    }
617
907k
}
signalmodule.c:Py_XDECREF
Line
Count
Source
613
2.36k
{
614
2.36k
    if (op != _Py_NULL) {
615
0
        Py_DECREF(op);
616
0
    }
617
2.36k
}
Unexecuted instantiation: _tracemalloc.c:Py_XDECREF
Unexecuted instantiation: _suggestions.c:Py_XDECREF
_datetimemodule.c:Py_XDECREF
Line
Count
Source
613
10.7k
{
614
10.7k
    if (op != _Py_NULL) {
615
5.85k
        Py_DECREF(op);
616
5.85k
    }
617
10.7k
}
Unexecuted instantiation: _codecsmodule.c:Py_XDECREF
_collectionsmodule.c:Py_XDECREF
Line
Count
Source
613
164k
{
614
164k
    if (op != _Py_NULL) {
615
0
        Py_DECREF(op);
616
0
    }
617
164k
}
Unexecuted instantiation: errnomodule.c:Py_XDECREF
_iomodule.c:Py_XDECREF
Line
Count
Source
613
22
{
614
22
    if (op != _Py_NULL) {
615
11
        Py_DECREF(op);
616
11
    }
617
22
}
iobase.c:Py_XDECREF
Line
Count
Source
613
42.7k
{
614
42.7k
    if (op != _Py_NULL) {
615
42.7k
        Py_DECREF(op);
616
42.7k
    }
617
42.7k
}
Unexecuted instantiation: fileio.c:Py_XDECREF
bytesio.c:Py_XDECREF
Line
Count
Source
613
54.7k
{
614
54.7k
    if (op != _Py_NULL) {
615
54.7k
        Py_DECREF(op);
616
54.7k
    }
617
54.7k
}
bufferedio.c:Py_XDECREF
Line
Count
Source
613
34.4k
{
614
34.4k
    if (op != _Py_NULL) {
615
2.08k
        Py_DECREF(op);
616
2.08k
    }
617
34.4k
}
textio.c:Py_XDECREF
Line
Count
Source
613
33.9k
{
614
33.9k
    if (op != _Py_NULL) {
615
223
        Py_DECREF(op);
616
223
    }
617
33.9k
}
stringio.c:Py_XDECREF
Line
Count
Source
613
418
{
614
418
    if (op != _Py_NULL) {
615
0
        Py_DECREF(op);
616
0
    }
617
418
}
itertoolsmodule.c:Py_XDECREF
Line
Count
Source
613
36.9k
{
614
36.9k
    if (op != _Py_NULL) {
615
5.39k
        Py_DECREF(op);
616
5.39k
    }
617
36.9k
}
sre.c:Py_XDECREF
Line
Count
Source
613
80.8M
{
614
80.8M
    if (op != _Py_NULL) {
615
80.4M
        Py_DECREF(op);
616
80.4M
    }
617
80.8M
}
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
613
98.3k
{
614
98.3k
    if (op != _Py_NULL) {
615
6.59k
        Py_DECREF(op);
616
6.59k
    }
617
98.3k
}
_functoolsmodule.c:Py_XDECREF
Line
Count
Source
613
517
{
614
517
    if (op != _Py_NULL) {
615
0
        Py_DECREF(op);
616
0
    }
617
517
}
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
getpath.c:Py_XDECREF
Line
Count
Source
613
296
{
614
296
    if (op != _Py_NULL) {
615
296
        Py_DECREF(op);
616
296
    }
617
296
}
Unexecuted instantiation: frozen.c:Py_XDECREF
Unexecuted instantiation: getbuildinfo.c:Py_XDECREF
Unexecuted instantiation: peg_api.c:Py_XDECREF
reader.c:Py_XDECREF
Line
Count
Source
613
135k
{
614
135k
    if (op != _Py_NULL) {
615
16
        Py_DECREF(op);
616
16
    }
617
135k
}
Unexecuted instantiation: source.c:Py_XDECREF
helpers.c:Py_XDECREF
Line
Count
Source
613
14.3k
{
614
14.3k
    if (op != _Py_NULL) {
615
13.4k
        Py_DECREF(op);
616
13.4k
    }
617
14.3k
}
Unexecuted instantiation: myreadline.c:Py_XDECREF
abstract.c:Py_XDECREF
Line
Count
Source
613
11.7M
{
614
11.7M
    if (op != _Py_NULL) {
615
176k
        Py_DECREF(op);
616
176k
    }
617
11.7M
}
Unexecuted instantiation: boolobject.c:Py_XDECREF
Unexecuted instantiation: bytes_methods.c:Py_XDECREF
bytearrayobject.c:Py_XDECREF
Line
Count
Source
613
28.9M
{
614
28.9M
    if (op != _Py_NULL) {
615
28.9M
        Py_DECREF(op);
616
28.9M
    }
617
28.9M
}
capsule.c:Py_XDECREF
Line
Count
Source
613
10
{
614
10
    if (op != _Py_NULL) {
615
10
        Py_DECREF(op);
616
10
    }
617
10
}
cellobject.c:Py_XDECREF
Line
Count
Source
613
16.8M
{
614
16.8M
    if (op != _Py_NULL) {
615
7.62M
        Py_DECREF(op);
616
7.62M
    }
617
16.8M
}
classobject.c:Py_XDECREF
Line
Count
Source
613
48.1M
{
614
48.1M
    if (op != _Py_NULL) {
615
48.1M
        Py_DECREF(op);
616
48.1M
    }
617
48.1M
}
codeobject.c:Py_XDECREF
Line
Count
Source
613
273k
{
614
273k
    if (op != _Py_NULL) {
615
170k
        Py_DECREF(op);
616
170k
    }
617
273k
}
Unexecuted instantiation: complexobject.c:Py_XDECREF
descrobject.c:Py_XDECREF
Line
Count
Source
613
31.7M
{
614
31.7M
    if (op != _Py_NULL) {
615
22.2M
        Py_DECREF(op);
616
22.2M
    }
617
31.7M
}
enumobject.c:Py_XDECREF
Line
Count
Source
613
40.2M
{
614
40.2M
    if (op != _Py_NULL) {
615
26.8M
        Py_DECREF(op);
616
26.8M
    }
617
40.2M
}
genobject.c:Py_XDECREF
Line
Count
Source
613
20.6k
{
614
20.6k
    if (op != _Py_NULL) {
615
0
        Py_DECREF(op);
616
0
    }
617
20.6k
}
Unexecuted instantiation: fileobject.c:Py_XDECREF
Unexecuted instantiation: frameobject.c:Py_XDECREF
funcobject.c:Py_XDECREF
Line
Count
Source
613
15.1k
{
614
15.1k
    if (op != _Py_NULL) {
615
8.77k
        Py_DECREF(op);
616
8.77k
    }
617
15.1k
}
Unexecuted instantiation: interpolationobject.c:Py_XDECREF
iterobject.c:Py_XDECREF
Line
Count
Source
613
4.93M
{
614
4.93M
    if (op != _Py_NULL) {
615
1.71M
        Py_DECREF(op);
616
1.71M
    }
617
4.93M
}
lazyimportobject.c:Py_XDECREF
Line
Count
Source
613
499
{
614
499
    if (op != _Py_NULL) {
615
82
        Py_DECREF(op);
616
82
    }
617
499
}
odictobject.c:Py_XDECREF
Line
Count
Source
613
11.3k
{
614
11.3k
    if (op != _Py_NULL) {
615
4.55k
        Py_DECREF(op);
616
4.55k
    }
617
11.3k
}
methodobject.c:Py_XDECREF
Line
Count
Source
613
551M
{
614
551M
    if (op != _Py_NULL) {
615
195M
        Py_DECREF(op);
616
195M
    }
617
551M
}
Unexecuted instantiation: namespaceobject.c:Py_XDECREF
Unexecuted instantiation: _contextvars.c:Py_XDECREF
Unexecuted instantiation: _strptime.c:Py_XDECREF
Python-ast.c:Py_XDECREF
Line
Count
Source
613
735
{
614
735
    if (op != _Py_NULL) {
615
490
        Py_DECREF(op);
616
490
    }
617
735
}
Python-tokenize.c:Py_XDECREF
Line
Count
Source
613
332
{
614
332
    if (op != _Py_NULL) {
615
316
        Py_DECREF(op);
616
316
    }
617
332
}
Unexecuted instantiation: asdl.c:Py_XDECREF
assemble.c:Py_XDECREF
Line
Count
Source
613
26.9k
{
614
26.9k
    if (op != _Py_NULL) {
615
26.9k
        Py_DECREF(op);
616
26.9k
    }
617
26.9k
}
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
pegen.c:Py_XDECREF
Line
Count
Source
613
120k
{
614
120k
    if (op != _Py_NULL) {
615
1.58k
        Py_DECREF(op);
616
1.58k
    }
617
120k
}
pegen_errors.c:Py_XDECREF
Line
Count
Source
613
1.96k
{
614
1.96k
    if (op != _Py_NULL) {
615
1.31k
        Py_DECREF(op);
616
1.31k
    }
617
1.96k
}
Unexecuted instantiation: parser.c:Py_XDECREF
Unexecuted instantiation: parser_invalid.c:Py_XDECREF
Unexecuted instantiation: lexer.c:Py_XDECREF
Unexecuted instantiation: layout.c:Py_XDECREF
Unexecuted instantiation: number.c:Py_XDECREF
state.c:Py_XDECREF
Line
Count
Source
613
135k
{
614
135k
    if (op != _Py_NULL) {
615
65.5k
        Py_DECREF(op);
616
65.5k
    }
617
135k
}
Unexecuted instantiation: string.c:Py_XDECREF
Unexecuted instantiation: decoder.c:Py_XDECREF
api.c:Py_XDECREF
Line
Count
Source
613
129k
{
614
129k
    if (op != _Py_NULL) {
615
0
        Py_DECREF(op);
616
0
    }
617
129k
}
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
Unexecuted instantiation: string_parser.c:Py_XDECREF
618
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < _Py_PACK_VERSION(3, 11)
619
10.7G
#  define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op))
620
#endif
621
622
// Create a new strong reference to an object:
623
// increment the reference count of the object and return the object.
624
PyAPI_FUNC(PyObject*) Py_NewRef(PyObject *obj);
625
626
// Similar to Py_NewRef(), but the object can be NULL.
627
PyAPI_FUNC(PyObject*) Py_XNewRef(PyObject *obj);
628
629
static inline PyObject* _Py_NewRef(PyObject *obj)
630
10.5G
{
631
10.5G
    Py_INCREF(obj);
632
10.5G
    return obj;
633
10.5G
}
bytesobject.c:_Py_NewRef
Line
Count
Source
630
744k
{
631
744k
    Py_INCREF(obj);
632
744k
    return obj;
633
744k
}
call.c:_Py_NewRef
Line
Count
Source
630
29.4M
{
631
29.4M
    Py_INCREF(obj);
632
29.4M
    return obj;
633
29.4M
}
exceptions.c:_Py_NewRef
Line
Count
Source
630
177M
{
631
177M
    Py_INCREF(obj);
632
177M
    return obj;
633
177M
}
genericaliasobject.c:_Py_NewRef
Line
Count
Source
630
1.92k
{
631
1.92k
    Py_INCREF(obj);
632
1.92k
    return obj;
633
1.92k
}
Unexecuted instantiation: floatobject.c:_Py_NewRef
listobject.c:_Py_NewRef
Line
Count
Source
630
1.48G
{
631
1.48G
    Py_INCREF(obj);
632
1.48G
    return obj;
633
1.48G
}
longobject.c:_Py_NewRef
Line
Count
Source
630
21.9M
{
631
21.9M
    Py_INCREF(obj);
632
21.9M
    return obj;
633
21.9M
}
dictobject.c:_Py_NewRef
Line
Count
Source
630
787M
{
631
787M
    Py_INCREF(obj);
632
787M
    return obj;
633
787M
}
memoryobject.c:_Py_NewRef
Line
Count
Source
630
6.16M
{
631
6.16M
    Py_INCREF(obj);
632
6.16M
    return obj;
633
6.16M
}
moduleobject.c:_Py_NewRef
Line
Count
Source
630
3.90k
{
631
3.90k
    Py_INCREF(obj);
632
3.90k
    return obj;
633
3.90k
}
object.c:_Py_NewRef
Line
Count
Source
630
89.8M
{
631
89.8M
    Py_INCREF(obj);
632
89.8M
    return obj;
633
89.8M
}
Unexecuted instantiation: obmalloc.c:_Py_NewRef
Unexecuted instantiation: picklebufobject.c:_Py_NewRef
rangeobject.c:_Py_NewRef
Line
Count
Source
630
2.40M
{
631
2.40M
    Py_INCREF(obj);
632
2.40M
    return obj;
633
2.40M
}
sentinelobject.c:_Py_NewRef
Line
Count
Source
630
512
{
631
512
    Py_INCREF(obj);
632
512
    return obj;
633
512
}
setobject.c:_Py_NewRef
Line
Count
Source
630
32.5M
{
631
32.5M
    Py_INCREF(obj);
632
32.5M
    return obj;
633
32.5M
}
sliceobject.c:_Py_NewRef
Line
Count
Source
630
167M
{
631
167M
    Py_INCREF(obj);
632
167M
    return obj;
633
167M
}
structseq.c:_Py_NewRef
Line
Count
Source
630
6.72k
{
631
6.72k
    Py_INCREF(obj);
632
6.72k
    return obj;
633
6.72k
}
templateobject.c:_Py_NewRef
Line
Count
Source
630
22
{
631
22
    Py_INCREF(obj);
632
22
    return obj;
633
22
}
tupleobject.c:_Py_NewRef
Line
Count
Source
630
5.53G
{
631
5.53G
    Py_INCREF(obj);
632
5.53G
    return obj;
633
5.53G
}
typeobject.c:_Py_NewRef
Line
Count
Source
630
99.1M
{
631
99.1M
    Py_INCREF(obj);
632
99.1M
    return obj;
633
99.1M
}
typevarobject.c:_Py_NewRef
Line
Count
Source
630
1.95k
{
631
1.95k
    Py_INCREF(obj);
632
1.95k
    return obj;
633
1.95k
}
unicode_format.c:_Py_NewRef
Line
Count
Source
630
6.93M
{
631
6.93M
    Py_INCREF(obj);
632
6.93M
    return obj;
633
6.93M
}
Unexecuted instantiation: unicode_formatter.c:_Py_NewRef
unicode_writer.c:_Py_NewRef
Line
Count
Source
630
8.77M
{
631
8.77M
    Py_INCREF(obj);
632
8.77M
    return obj;
633
8.77M
}
Unexecuted instantiation: unicodectype.c:_Py_NewRef
unicodeobject.c:_Py_NewRef
Line
Count
Source
630
155M
{
631
155M
    Py_INCREF(obj);
632
155M
    return obj;
633
155M
}
unionobject.c:_Py_NewRef
Line
Count
Source
630
924
{
631
924
    Py_INCREF(obj);
632
924
    return obj;
633
924
}
Unexecuted instantiation: weakrefobject.c:_Py_NewRef
_warnings.c:_Py_NewRef
Line
Count
Source
630
1.92M
{
631
1.92M
    Py_INCREF(obj);
632
1.92M
    return obj;
633
1.92M
}
bltinmodule.c:_Py_NewRef
Line
Count
Source
630
38.3M
{
631
38.3M
    Py_INCREF(obj);
632
38.3M
    return obj;
633
38.3M
}
ceval.c:_Py_NewRef
Line
Count
Source
630
881M
{
631
881M
    Py_INCREF(obj);
632
881M
    return obj;
633
881M
}
codecs.c:_Py_NewRef
Line
Count
Source
630
15.0M
{
631
15.0M
    Py_INCREF(obj);
632
15.0M
    return obj;
633
15.0M
}
codegen.c:_Py_NewRef
Line
Count
Source
630
2.20k
{
631
2.20k
    Py_INCREF(obj);
632
2.20k
    return obj;
633
2.20k
}
compile.c:_Py_NewRef
Line
Count
Source
630
62.2k
{
631
62.2k
    Py_INCREF(obj);
632
62.2k
    return obj;
633
62.2k
}
context.c:_Py_NewRef
Line
Count
Source
630
66
{
631
66
    Py_INCREF(obj);
632
66
    return obj;
633
66
}
errors.c:_Py_NewRef
Line
Count
Source
630
54.4k
{
631
54.4k
    Py_INCREF(obj);
632
54.4k
    return obj;
633
54.4k
}
flowgraph.c:_Py_NewRef
Line
Count
Source
630
59.3k
{
631
59.3k
    Py_INCREF(obj);
632
59.3k
    return obj;
633
59.3k
}
frame.c:_Py_NewRef
Line
Count
Source
630
40.2M
{
631
40.2M
    Py_INCREF(obj);
632
40.2M
    return obj;
633
40.2M
}
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
630
2.65M
{
631
2.65M
    Py_INCREF(obj);
632
2.65M
    return obj;
633
2.65M
}
Unexecuted instantiation: ceval_gil.c:_Py_NewRef
Unexecuted instantiation: hamt.c:_Py_NewRef
Unexecuted instantiation: hashtable.c:_Py_NewRef
import.c:_Py_NewRef
Line
Count
Source
630
5.26M
{
631
5.26M
    Py_INCREF(obj);
632
5.26M
    return obj;
633
5.26M
}
importdl.c:_Py_NewRef
Line
Count
Source
630
37
{
631
37
    Py_INCREF(obj);
632
37
    return obj;
633
37
}
initconfig.c:_Py_NewRef
Line
Count
Source
630
629
{
631
629
    Py_INCREF(obj);
632
629
    return obj;
633
629
}
Unexecuted instantiation: instrumentation.c:_Py_NewRef
Unexecuted instantiation: instruction_sequence.c:_Py_NewRef
intrinsics.c:_Py_NewRef
Line
Count
Source
630
42.2k
{
631
42.2k
    Py_INCREF(obj);
632
42.2k
    return obj;
633
42.2k
}
Unexecuted instantiation: legacy_tracing.c:_Py_NewRef
Unexecuted instantiation: lock.c:_Py_NewRef
marshal.c:_Py_NewRef
Line
Count
Source
630
1.09M
{
631
1.09M
    Py_INCREF(obj);
632
1.09M
    return obj;
633
1.09M
}
modsupport.c:_Py_NewRef
Line
Count
Source
630
18
{
631
18
    Py_INCREF(obj);
632
18
    return obj;
633
18
}
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
630
37
{
631
37
    Py_INCREF(obj);
632
37
    return obj;
633
37
}
Unexecuted instantiation: pymath.c:_Py_NewRef
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
630
103k
{
631
103k
    Py_INCREF(obj);
632
103k
    return obj;
633
103k
}
sysmodule.c:_Py_NewRef
Line
Count
Source
630
1.90k
{
631
1.90k
    Py_INCREF(obj);
632
1.90k
    return obj;
633
1.90k
}
Unexecuted instantiation: thread.c:_Py_NewRef
traceback.c:_Py_NewRef
Line
Count
Source
630
66.0M
{
631
66.0M
    Py_INCREF(obj);
632
66.0M
    return obj;
633
66.0M
}
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: pystrhex.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
atexitmodule.c:_Py_NewRef
Line
Count
Source
630
10
{
631
10
    Py_INCREF(obj);
632
10
    return obj;
633
10
}
Unexecuted instantiation: faulthandler.c:_Py_NewRef
posixmodule.c:_Py_NewRef
Line
Count
Source
630
1.22M
{
631
1.22M
    Py_INCREF(obj);
632
1.22M
    return obj;
633
1.22M
}
signalmodule.c:_Py_NewRef
Line
Count
Source
630
2.36k
{
631
2.36k
    Py_INCREF(obj);
632
2.36k
    return obj;
633
2.36k
}
Unexecuted instantiation: _tracemalloc.c:_Py_NewRef
Unexecuted instantiation: _suggestions.c:_Py_NewRef
_datetimemodule.c:_Py_NewRef
Line
Count
Source
630
5.12k
{
631
5.12k
    Py_INCREF(obj);
632
5.12k
    return obj;
633
5.12k
}
Unexecuted instantiation: _codecsmodule.c:_Py_NewRef
_collectionsmodule.c:_Py_NewRef
Line
Count
Source
630
26.8M
{
631
26.8M
    Py_INCREF(obj);
632
26.8M
    return obj;
633
26.8M
}
Unexecuted instantiation: errnomodule.c:_Py_NewRef
_iomodule.c:_Py_NewRef
Line
Count
Source
630
273
{
631
273
    Py_INCREF(obj);
632
273
    return obj;
633
273
}
iobase.c:_Py_NewRef
Line
Count
Source
630
89.3k
{
631
89.3k
    Py_INCREF(obj);
632
89.3k
    return obj;
633
89.3k
}
Unexecuted instantiation: fileio.c:_Py_NewRef
bytesio.c:_Py_NewRef
Line
Count
Source
630
86.2k
{
631
86.2k
    Py_INCREF(obj);
632
86.2k
    return obj;
633
86.2k
}
bufferedio.c:_Py_NewRef
Line
Count
Source
630
7.99k
{
631
7.99k
    Py_INCREF(obj);
632
7.99k
    return obj;
633
7.99k
}
textio.c:_Py_NewRef
Line
Count
Source
630
636k
{
631
636k
    Py_INCREF(obj);
632
636k
    return obj;
633
636k
}
stringio.c:_Py_NewRef
Line
Count
Source
630
23.3k
{
631
23.3k
    Py_INCREF(obj);
632
23.3k
    return obj;
633
23.3k
}
itertoolsmodule.c:_Py_NewRef
Line
Count
Source
630
41.4k
{
631
41.4k
    Py_INCREF(obj);
632
41.4k
    return obj;
633
41.4k
}
sre.c:_Py_NewRef
Line
Count
Source
630
142M
{
631
142M
    Py_INCREF(obj);
632
142M
    return obj;
633
142M
}
Unexecuted instantiation: _sysconfig.c:_Py_NewRef
_threadmodule.c:_Py_NewRef
Line
Count
Source
630
84
{
631
84
    Py_INCREF(obj);
632
84
    return obj;
633
84
}
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
630
1.68k
{
631
1.68k
    Py_INCREF(obj);
632
1.68k
    return obj;
633
1.68k
}
_functoolsmodule.c:_Py_NewRef
Line
Count
Source
630
526k
{
631
526k
    Py_INCREF(obj);
632
526k
    return obj;
633
526k
}
Unexecuted instantiation: _localemodule.c:_Py_NewRef
Unexecuted instantiation: _opcode.c:_Py_NewRef
_operator.c:_Py_NewRef
Line
Count
Source
630
1.44M
{
631
1.44M
    Py_INCREF(obj);
632
1.44M
    return obj;
633
1.44M
}
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
630
296
{
631
296
    Py_INCREF(obj);
632
296
    return obj;
633
296
}
Unexecuted instantiation: frozen.c:_Py_NewRef
Unexecuted instantiation: getbuildinfo.c:_Py_NewRef
Unexecuted instantiation: peg_api.c:_Py_NewRef
reader.c:_Py_NewRef
Line
Count
Source
630
16
{
631
16
    Py_INCREF(obj);
632
16
    return obj;
633
16
}
Unexecuted instantiation: source.c:_Py_NewRef
Unexecuted instantiation: helpers.c:_Py_NewRef
Unexecuted instantiation: myreadline.c:_Py_NewRef
abstract.c:_Py_NewRef
Line
Count
Source
630
445M
{
631
445M
    Py_INCREF(obj);
632
445M
    return obj;
633
445M
}
Unexecuted instantiation: boolobject.c:_Py_NewRef
Unexecuted instantiation: bytes_methods.c:_Py_NewRef
bytearrayobject.c:_Py_NewRef
Line
Count
Source
630
20.4M
{
631
20.4M
    Py_INCREF(obj);
632
20.4M
    return obj;
633
20.4M
}
Unexecuted instantiation: capsule.c:_Py_NewRef
Unexecuted instantiation: cellobject.c:_Py_NewRef
classobject.c:_Py_NewRef
Line
Count
Source
630
96.3M
{
631
96.3M
    Py_INCREF(obj);
632
96.3M
    return obj;
633
96.3M
}
codeobject.c:_Py_NewRef
Line
Count
Source
630
1.15M
{
631
1.15M
    Py_INCREF(obj);
632
1.15M
    return obj;
633
1.15M
}
Unexecuted instantiation: complexobject.c:_Py_NewRef
descrobject.c:_Py_NewRef
Line
Count
Source
630
22.3M
{
631
22.3M
    Py_INCREF(obj);
632
22.3M
    return obj;
633
22.3M
}
enumobject.c:_Py_NewRef
Line
Count
Source
630
28
{
631
28
    Py_INCREF(obj);
632
28
    return obj;
633
28
}
genobject.c:_Py_NewRef
Line
Count
Source
630
93.4M
{
631
93.4M
    Py_INCREF(obj);
632
93.4M
    return obj;
633
93.4M
}
Unexecuted instantiation: fileobject.c:_Py_NewRef
frameobject.c:_Py_NewRef
Line
Count
Source
630
23.7M
{
631
23.7M
    Py_INCREF(obj);
632
23.7M
    return obj;
633
23.7M
}
funcobject.c:_Py_NewRef
Line
Count
Source
630
15.9M
{
631
15.9M
    Py_INCREF(obj);
632
15.9M
    return obj;
633
15.9M
}
interpolationobject.c:_Py_NewRef
Line
Count
Source
630
12
{
631
12
    Py_INCREF(obj);
632
12
    return obj;
633
12
}
iterobject.c:_Py_NewRef
Line
Count
Source
630
3.22M
{
631
3.22M
    Py_INCREF(obj);
632
3.22M
    return obj;
633
3.22M
}
lazyimportobject.c:_Py_NewRef
Line
Count
Source
630
1.16k
{
631
1.16k
    Py_INCREF(obj);
632
1.16k
    return obj;
633
1.16k
}
odictobject.c:_Py_NewRef
Line
Count
Source
630
11.3k
{
631
11.3k
    Py_INCREF(obj);
632
11.3k
    return obj;
633
11.3k
}
methodobject.c:_Py_NewRef
Line
Count
Source
630
11.6M
{
631
11.6M
    Py_INCREF(obj);
632
11.6M
    return obj;
633
11.6M
}
Unexecuted instantiation: namespaceobject.c:_Py_NewRef
Unexecuted instantiation: _contextvars.c:_Py_NewRef
Unexecuted instantiation: _strptime.c:_Py_NewRef
Python-ast.c:_Py_NewRef
Line
Count
Source
630
517k
{
631
517k
    Py_INCREF(obj);
632
517k
    return obj;
633
517k
}
Unexecuted instantiation: Python-tokenize.c:_Py_NewRef
Unexecuted instantiation: asdl.c:_Py_NewRef
assemble.c:_Py_NewRef
Line
Count
Source
630
18.7k
{
631
18.7k
    Py_INCREF(obj);
632
18.7k
    return obj;
633
18.7k
}
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: pegen.c:_Py_NewRef
pegen_errors.c:_Py_NewRef
Line
Count
Source
630
51.3k
{
631
51.3k
    Py_INCREF(obj);
632
51.3k
    return obj;
633
51.3k
}
Unexecuted instantiation: parser.c:_Py_NewRef
Unexecuted instantiation: parser_invalid.c:_Py_NewRef
Unexecuted instantiation: lexer.c:_Py_NewRef
Unexecuted instantiation: layout.c:_Py_NewRef
Unexecuted instantiation: number.c:_Py_NewRef
Unexecuted instantiation: state.c:_Py_NewRef
Unexecuted instantiation: string.c:_Py_NewRef
Unexecuted instantiation: decoder.c:_Py_NewRef
Unexecuted instantiation: api.c:_Py_NewRef
Unexecuted instantiation: getcompiler.c:_Py_NewRef
Unexecuted instantiation: mystrtoul.c:_Py_NewRef
Unexecuted instantiation: token.c:_Py_NewRef
action_helpers.c:_Py_NewRef
Line
Count
Source
630
4.71k
{
631
4.71k
    Py_INCREF(obj);
632
4.71k
    return obj;
633
4.71k
}
Unexecuted instantiation: string_parser.c:_Py_NewRef
634
635
static inline PyObject* _Py_XNewRef(PyObject *obj)
636
2.71G
{
637
2.71G
    Py_XINCREF(obj);
638
2.71G
    return obj;
639
2.71G
}
Unexecuted instantiation: bytesobject.c:_Py_XNewRef
Unexecuted instantiation: call.c:_Py_XNewRef
exceptions.c:_Py_XNewRef
Line
Count
Source
636
74.4M
{
637
74.4M
    Py_XINCREF(obj);
638
74.4M
    return obj;
639
74.4M
}
Unexecuted instantiation: genericaliasobject.c:_Py_XNewRef
Unexecuted instantiation: floatobject.c:_Py_XNewRef
listobject.c:_Py_XNewRef
Line
Count
Source
636
204M
{
637
204M
    Py_XINCREF(obj);
638
204M
    return obj;
639
204M
}
Unexecuted instantiation: longobject.c:_Py_XNewRef
dictobject.c:_Py_XNewRef
Line
Count
Source
636
1.65G
{
637
1.65G
    Py_XINCREF(obj);
638
1.65G
    return obj;
639
1.65G
}
memoryobject.c:_Py_XNewRef
Line
Count
Source
636
114
{
637
114
    Py_XINCREF(obj);
638
114
    return obj;
639
114
}
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
636
180
{
637
180
    Py_XINCREF(obj);
638
180
    return obj;
639
180
}
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
636
298k
{
637
298k
    Py_XINCREF(obj);
638
298k
    return obj;
639
298k
}
typevarobject.c:_Py_XNewRef
Line
Count
Source
636
1.24k
{
637
1.24k
    Py_XINCREF(obj);
638
1.24k
    return obj;
639
1.24k
}
Unexecuted instantiation: unicode_format.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
636
439k
{
637
439k
    Py_XINCREF(obj);
638
439k
    return obj;
639
439k
}
_warnings.c:_Py_XNewRef
Line
Count
Source
636
222
{
637
222
    Py_XINCREF(obj);
638
222
    return obj;
639
222
}
bltinmodule.c:_Py_XNewRef
Line
Count
Source
636
1.12k
{
637
1.12k
    Py_XINCREF(obj);
638
1.12k
    return obj;
639
1.12k
}
ceval.c:_Py_XNewRef
Line
Count
Source
636
165M
{
637
165M
    Py_XINCREF(obj);
638
165M
    return obj;
639
165M
}
Unexecuted instantiation: codecs.c:_Py_XNewRef
Unexecuted instantiation: codegen.c:_Py_XNewRef
compile.c:_Py_XNewRef
Line
Count
Source
636
6.85k
{
637
6.85k
    Py_XINCREF(obj);
638
6.85k
    return obj;
639
6.85k
}
context.c:_Py_XNewRef
Line
Count
Source
636
66
{
637
66
    Py_XINCREF(obj);
638
66
    return obj;
639
66
}
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
636
4.29k
{
637
4.29k
    Py_XINCREF(obj);
638
4.29k
    return obj;
639
4.29k
}
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
Unexecuted instantiation: pymath.c:_Py_XNewRef
pystate.c:_Py_XNewRef
Line
Count
Source
636
854k
{
637
854k
    Py_XINCREF(obj);
638
854k
    return obj;
639
854k
}
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
636
2.85M
{
637
2.85M
    Py_XINCREF(obj);
638
2.85M
    return obj;
639
2.85M
}
Unexecuted instantiation: symtable.c:_Py_XNewRef
sysmodule.c:_Py_XNewRef
Line
Count
Source
636
21.4k
{
637
21.4k
    Py_XINCREF(obj);
638
21.4k
    return obj;
639
21.4k
}
Unexecuted instantiation: thread.c:_Py_XNewRef
traceback.c:_Py_XNewRef
Line
Count
Source
636
66.0M
{
637
66.0M
    Py_XINCREF(obj);
638
66.0M
    return obj;
639
66.0M
}
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: pystrhex.c:_Py_XNewRef
Unexecuted instantiation: dtoa.c:_Py_XNewRef
Unexecuted instantiation: fileutils.c:_Py_XNewRef
suggestions.c:_Py_XNewRef
Line
Count
Source
636
125
{
637
125
    Py_XINCREF(obj);
638
125
    return obj;
639
125
}
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
posixmodule.c:_Py_XNewRef
Line
Count
Source
636
97.0k
{
637
97.0k
    Py_XINCREF(obj);
638
97.0k
    return obj;
639
97.0k
}
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
636
197
{
637
197
    Py_XINCREF(obj);
638
197
    return obj;
639
197
}
Unexecuted instantiation: _codecsmodule.c:_Py_XNewRef
_collectionsmodule.c:_Py_XNewRef
Line
Count
Source
636
164k
{
637
164k
    Py_XINCREF(obj);
638
164k
    return obj;
639
164k
}
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
_threadmodule.c:_Py_XNewRef
Line
Count
Source
636
168
{
637
168
    Py_XINCREF(obj);
638
168
    return obj;
639
168
}
Unexecuted instantiation: timemodule.c:_Py_XNewRef
Unexecuted instantiation: _typesmodule.c:_Py_XNewRef
Unexecuted instantiation: _typingmodule.c:_Py_XNewRef
Unexecuted instantiation: _weakref.c:_Py_XNewRef
Unexecuted instantiation: _abc.c:_Py_XNewRef
_functoolsmodule.c:_Py_XNewRef
Line
Count
Source
636
44
{
637
44
    Py_XINCREF(obj);
638
44
    return obj;
639
44
}
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
Unexecuted instantiation: getpath.c:_Py_XNewRef
Unexecuted instantiation: frozen.c:_Py_XNewRef
Unexecuted instantiation: getbuildinfo.c:_Py_XNewRef
Unexecuted instantiation: peg_api.c:_Py_XNewRef
Unexecuted instantiation: reader.c:_Py_XNewRef
Unexecuted instantiation: source.c:_Py_XNewRef
Unexecuted instantiation: helpers.c:_Py_XNewRef
Unexecuted instantiation: myreadline.c:_Py_XNewRef
abstract.c:_Py_XNewRef
Line
Count
Source
636
126M
{
637
126M
    Py_XINCREF(obj);
638
126M
    return obj;
639
126M
}
Unexecuted instantiation: boolobject.c:_Py_XNewRef
Unexecuted instantiation: bytes_methods.c:_Py_XNewRef
Unexecuted instantiation: bytearrayobject.c:_Py_XNewRef
Unexecuted instantiation: capsule.c:_Py_XNewRef
cellobject.c:_Py_XNewRef
Line
Count
Source
636
16.8M
{
637
16.8M
    Py_XINCREF(obj);
638
16.8M
    return obj;
639
16.8M
}
Unexecuted instantiation: classobject.c:_Py_XNewRef
codeobject.c:_Py_XNewRef
Line
Count
Source
636
3.09k
{
637
3.09k
    Py_XINCREF(obj);
638
3.09k
    return obj;
639
3.09k
}
Unexecuted instantiation: complexobject.c:_Py_XNewRef
descrobject.c:_Py_XNewRef
Line
Count
Source
636
111k
{
637
111k
    Py_XINCREF(obj);
638
111k
    return obj;
639
111k
}
Unexecuted instantiation: enumobject.c:_Py_XNewRef
Unexecuted instantiation: genobject.c:_Py_XNewRef
Unexecuted instantiation: fileobject.c:_Py_XNewRef
frameobject.c:_Py_XNewRef
Line
Count
Source
636
22.8M
{
637
22.8M
    Py_XINCREF(obj);
638
22.8M
    return obj;
639
22.8M
}
funcobject.c:_Py_XNewRef
Line
Count
Source
636
17.5k
{
637
17.5k
    Py_XINCREF(obj);
638
17.5k
    return obj;
639
17.5k
}
Unexecuted instantiation: interpolationobject.c:_Py_XNewRef
iterobject.c:_Py_XNewRef
Line
Count
Source
636
8.34M
{
637
8.34M
    Py_XINCREF(obj);
638
8.34M
    return obj;
639
8.34M
}
lazyimportobject.c:_Py_XNewRef
Line
Count
Source
636
1.23k
{
637
1.23k
    Py_XINCREF(obj);
638
1.23k
    return obj;
639
1.23k
}
Unexecuted instantiation: odictobject.c:_Py_XNewRef
methodobject.c:_Py_XNewRef
Line
Count
Source
636
368M
{
637
368M
    Py_XINCREF(obj);
638
368M
    return obj;
639
368M
}
Unexecuted instantiation: namespaceobject.c:_Py_XNewRef
Unexecuted instantiation: _contextvars.c:_Py_XNewRef
Unexecuted instantiation: _strptime.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: pegen.c:_Py_XNewRef
Unexecuted instantiation: pegen_errors.c:_Py_XNewRef
Unexecuted instantiation: parser.c:_Py_XNewRef
Unexecuted instantiation: parser_invalid.c:_Py_XNewRef
Unexecuted instantiation: lexer.c:_Py_XNewRef
Unexecuted instantiation: layout.c:_Py_XNewRef
Unexecuted instantiation: number.c:_Py_XNewRef
Unexecuted instantiation: state.c:_Py_XNewRef
Unexecuted instantiation: string.c:_Py_XNewRef
Unexecuted instantiation: decoder.c:_Py_XNewRef
Unexecuted instantiation: api.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
640
641
// Py_NewRef() and Py_XNewRef() are exported as functions for the stable ABI.
642
// Names overridden with macros by static inline functions for best
643
// performances.
644
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < _Py_PACK_VERSION(3, 11)
645
10.3G
#  define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj))
646
2.49G
#  define Py_XNewRef(obj) _Py_XNewRef(_PyObject_CAST(obj))
647
#else
648
#  define Py_NewRef(obj) _Py_NewRef(obj)
649
#  define Py_XNewRef(obj) _Py_XNewRef(obj)
650
#endif
651
652
653
#ifdef __cplusplus
654
}
655
#endif
656
#endif   // !_Py_REFCOUNT_H