Coverage Report

Created: 2026-05-30 06:18

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
10.9G
#define _Py_IMMORTAL_INITIAL_REFCNT (3ULL << 30)
48
445
#define _Py_IMMORTAL_MINIMUM_REFCNT (1ULL << 31)
49
260M
#define _Py_STATIC_FLAG_BITS ((Py_ssize_t)(_Py_STATICALLY_ALLOCATED_FLAG | _Py_IMMORTAL_FLAGS))
50
260M
#define _Py_STATIC_IMMORTAL_INITIAL_REFCNT (((Py_ssize_t)_Py_IMMORTAL_INITIAL_REFCNT) | (_Py_STATIC_FLAG_BITS << 48))
51
52
#else
53
/*
54
In 32 bit systems, an object will be treated as immortal if its reference
55
count equals or exceeds _Py_IMMORTAL_MINIMUM_REFCNT (2**30).
56
57
Using the lower 30 bits makes the value backwards compatible by allowing
58
C-Extensions without the updated checks in Py_INCREF and Py_DECREF to safely
59
increase and decrease the objects reference count. The object would lose its
60
immortality, but the execution would still be correct.
61
62
Reference count increases and decreases will first go through an immortality
63
check by comparing the reference count field to the minimum immortality refcount.
64
*/
65
#define _Py_IMMORTAL_INITIAL_REFCNT ((Py_ssize_t)(5L << 28))
66
#define _Py_IMMORTAL_MINIMUM_REFCNT ((Py_ssize_t)(1L << 30))
67
#define _Py_STATIC_IMMORTAL_INITIAL_REFCNT ((Py_ssize_t)(7L << 28))
68
#define _Py_STATIC_IMMORTAL_MINIMUM_REFCNT ((Py_ssize_t)(6L << 28))
69
#endif
70
71
// Py_GIL_DISABLED builds indicate immortal objects using `ob_ref_local`, which is
72
// always 32-bits.
73
#ifdef Py_GIL_DISABLED
74
#define _Py_IMMORTAL_REFCNT_LOCAL UINT32_MAX
75
#endif
76
77
78
#ifdef Py_GIL_DISABLED
79
   // The shared reference count uses the two least-significant bits to store
80
   // flags. The remaining bits are used to store the reference count.
81
#  define _Py_REF_SHARED_SHIFT        2
82
#  define _Py_REF_SHARED_FLAG_MASK    0x3
83
84
   // The shared flags are initialized to zero.
85
#  define _Py_REF_SHARED_INIT         0x0
86
#  define _Py_REF_MAYBE_WEAKREF       0x1
87
#  define _Py_REF_QUEUED              0x2
88
#  define _Py_REF_MERGED              0x3
89
90
   // Create a shared field from a refcnt and desired flags
91
#  define _Py_REF_SHARED(refcnt, flags) \
92
              (((refcnt) << _Py_REF_SHARED_SHIFT) + (flags))
93
#endif  // Py_GIL_DISABLED
94
#endif  // _Py_OPAQUE_PYOBJECT
95
96
// Py_REFCNT() implementation for the stable ABI
97
PyAPI_FUNC(Py_ssize_t) Py_REFCNT(PyObject *ob);
98
99
#if defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030e0000
100
    // Stable ABI implements Py_REFCNT() as a function call
101
    // on limited C API version 3.14 and newer, and on abi3t.
102
#elif defined(_Py_OPAQUE_PYOBJECT)
103
    // Py_REFCNT() is also a function call in abi3t.
104
#else
105
927M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
927M
    #if !defined(Py_GIL_DISABLED)
107
927M
        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
927M
    }
bytesobject.c:_Py_REFCNT
Line
Count
Source
105
3.96M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
3.96M
    #if !defined(Py_GIL_DISABLED)
107
3.96M
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
3.96M
    }
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
445
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
445
    #if !defined(Py_GIL_DISABLED)
107
445
        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
445
    }
longobject.c:_Py_REFCNT
Line
Count
Source
105
24.5k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
24.5k
    #if !defined(Py_GIL_DISABLED)
107
24.5k
        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
24.5k
    }
dictobject.c:_Py_REFCNT
Line
Count
Source
105
236M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
236M
    #if !defined(Py_GIL_DISABLED)
107
236M
        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
236M
    }
Unexecuted instantiation: memoryobject.c:_Py_REFCNT
Unexecuted instantiation: moduleobject.c:_Py_REFCNT
object.c:_Py_REFCNT
Line
Count
Source
105
73.3M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
73.3M
    #if !defined(Py_GIL_DISABLED)
107
73.3M
        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
73.3M
    }
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.69k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
4.69k
    #if !defined(Py_GIL_DISABLED)
107
4.69k
        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.69k
    }
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
142k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
142k
    #if !defined(Py_GIL_DISABLED)
107
142k
        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
142k
    }
typeobject.c:_Py_REFCNT
Line
Count
Source
105
130
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
130
    #if !defined(Py_GIL_DISABLED)
107
130
        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
130
    }
Unexecuted instantiation: typevarobject.c:_Py_REFCNT
unicode_format.c:_Py_REFCNT
Line
Count
Source
105
5.07M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
5.07M
    #if !defined(Py_GIL_DISABLED)
107
5.07M
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
5.07M
    }
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
63.6M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
63.6M
    #if !defined(Py_GIL_DISABLED)
107
63.6M
        return ob->ob_refcnt;
108
    #else
109
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
110
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
111
            return _Py_IMMORTAL_INITIAL_REFCNT;
112
        }
113
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
114
        return _Py_STATIC_CAST(Py_ssize_t, local) +
115
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
116
    #endif
117
63.6M
    }
Unexecuted instantiation: unionobject.c:_Py_REFCNT
weakrefobject.c:_Py_REFCNT
Line
Count
Source
105
53.4M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
53.4M
    #if !defined(Py_GIL_DISABLED)
107
53.4M
        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
53.4M
    }
Unexecuted instantiation: _warnings.c:_Py_REFCNT
bltinmodule.c:_Py_REFCNT
Line
Count
Source
105
1.77M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
1.77M
    #if !defined(Py_GIL_DISABLED)
107
1.77M
        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.77M
    }
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
57.1M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
57.1M
    #if !defined(Py_GIL_DISABLED)
107
57.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
57.1M
    }
Unexecuted instantiation: future.c:_Py_REFCNT
gc.c:_Py_REFCNT
Line
Count
Source
105
375M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
375M
    #if !defined(Py_GIL_DISABLED)
107
375M
        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
375M
    }
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
82.0k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
82.0k
    #if !defined(Py_GIL_DISABLED)
107
82.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
82.0k
    }
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: 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
111k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
111k
    #if !defined(Py_GIL_DISABLED)
107
111k
        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
111k
    }
Unexecuted instantiation: fileio.c:_Py_REFCNT
bytesio.c:_Py_REFCNT
Line
Count
Source
105
71.6k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
71.6k
    #if !defined(Py_GIL_DISABLED)
107
71.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
71.6k
    }
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
241k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
241k
    #if !defined(Py_GIL_DISABLED)
107
241k
        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
241k
    }
Unexecuted instantiation: _localemodule.c:_Py_REFCNT
Unexecuted instantiation: _opcode.c:_Py_REFCNT
Unexecuted instantiation: _operator.c:_Py_REFCNT
Unexecuted instantiation: _stat.c:_Py_REFCNT
Unexecuted instantiation: symtablemodule.c:_Py_REFCNT
Unexecuted instantiation: pwdmodule.c:_Py_REFCNT
Unexecuted instantiation: getpath.c:_Py_REFCNT
Unexecuted instantiation: frozen.c:_Py_REFCNT
Unexecuted instantiation: getbuildinfo.c:_Py_REFCNT
Unexecuted instantiation: peg_api.c:_Py_REFCNT
Unexecuted instantiation: file_tokenizer.c:_Py_REFCNT
Unexecuted instantiation: helpers.c:_Py_REFCNT
Unexecuted instantiation: myreadline.c:_Py_REFCNT
Unexecuted instantiation: abstract.c:_Py_REFCNT
Unexecuted instantiation: boolobject.c:_Py_REFCNT
Unexecuted instantiation: bytes_methods.c:_Py_REFCNT
Unexecuted instantiation: bytearrayobject.c:_Py_REFCNT
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
200k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
200k
    #if !defined(Py_GIL_DISABLED)
107
200k
        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
200k
    }
Unexecuted instantiation: complexobject.c:_Py_REFCNT
Unexecuted instantiation: descrobject.c:_Py_REFCNT
enumobject.c:_Py_REFCNT
Line
Count
Source
105
18.0M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
18.0M
    #if !defined(Py_GIL_DISABLED)
107
18.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
18.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
38.8M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
38.8M
    #if !defined(Py_GIL_DISABLED)
107
38.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
38.8M
    }
Unexecuted instantiation: interpolationobject.c:_Py_REFCNT
Unexecuted instantiation: iterobject.c:_Py_REFCNT
Unexecuted instantiation: lazyimportobject.c:_Py_REFCNT
odictobject.c:_Py_REFCNT
Line
Count
Source
105
24
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
106
24
    #if !defined(Py_GIL_DISABLED)
107
24
        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
24
    }
Unexecuted instantiation: methodobject.c:_Py_REFCNT
Unexecuted instantiation: namespaceobject.c:_Py_REFCNT
Unexecuted instantiation: _contextvars.c:_Py_REFCNT
Unexecuted instantiation: Python-ast.c:_Py_REFCNT
Unexecuted instantiation: Python-tokenize.c:_Py_REFCNT
Unexecuted instantiation: asdl.c:_Py_REFCNT
Unexecuted instantiation: assemble.c:_Py_REFCNT
Unexecuted instantiation: ast.c:_Py_REFCNT
Unexecuted instantiation: ast_preprocess.c:_Py_REFCNT
Unexecuted instantiation: ast_unparse.c:_Py_REFCNT
Unexecuted instantiation: critical_section.c:_Py_REFCNT
Unexecuted instantiation: crossinterp.c:_Py_REFCNT
Unexecuted instantiation: getcopyright.c:_Py_REFCNT
Unexecuted instantiation: getplatform.c:_Py_REFCNT
Unexecuted instantiation: getversion.c:_Py_REFCNT
Unexecuted instantiation: optimizer.c:_Py_REFCNT
Unexecuted instantiation: pathconfig.c:_Py_REFCNT
Unexecuted instantiation: pegen.c:_Py_REFCNT
Unexecuted instantiation: pegen_errors.c:_Py_REFCNT
Unexecuted instantiation: parser.c:_Py_REFCNT
Unexecuted instantiation: buffer.c:_Py_REFCNT
Unexecuted instantiation: lexer.c:_Py_REFCNT
Unexecuted instantiation: state.c:_Py_REFCNT
Unexecuted instantiation: readline_tokenizer.c:_Py_REFCNT
Unexecuted instantiation: string_tokenizer.c:_Py_REFCNT
Unexecuted instantiation: utf8_tokenizer.c:_Py_REFCNT
Unexecuted instantiation: getcompiler.c:_Py_REFCNT
Unexecuted instantiation: mystrtoul.c:_Py_REFCNT
Unexecuted instantiation: token.c:_Py_REFCNT
Unexecuted instantiation: action_helpers.c:_Py_REFCNT
Unexecuted instantiation: string_parser.c:_Py_REFCNT
118
    #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
119
767M
    #  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
22.1G
{
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.1G
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
22.1G
}
bytesobject.c:_Py_IsImmortal
Line
Count
Source
127
27.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
27.2M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
27.2M
}
call.c:_Py_IsImmortal
Line
Count
Source
127
224M
{
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
224M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
224M
}
exceptions.c:_Py_IsImmortal
Line
Count
Source
127
204M
{
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
204M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
204M
}
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
502k
{
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
502k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
502k
}
listobject.c:_Py_IsImmortal
Line
Count
Source
127
1.69G
{
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.69G
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.69G
}
longobject.c:_Py_IsImmortal
Line
Count
Source
127
72.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
72.0M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
72.0M
}
dictobject.c:_Py_IsImmortal
Line
Count
Source
127
926M
{
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
926M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
926M
}
memoryobject.c:_Py_IsImmortal
Line
Count
Source
127
3.43M
{
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.43M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
3.43M
}
moduleobject.c:_Py_IsImmortal
Line
Count
Source
127
4.53M
{
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.53M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
4.53M
}
object.c:_Py_IsImmortal
Line
Count
Source
127
834M
{
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
834M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
834M
}
Unexecuted instantiation: obmalloc.c:_Py_IsImmortal
Unexecuted instantiation: picklebufobject.c:_Py_IsImmortal
rangeobject.c:_Py_IsImmortal
Line
Count
Source
127
44.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
44.1M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
44.1M
}
sentinelobject.c:_Py_IsImmortal
Line
Count
Source
127
47
{
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
47
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
47
}
setobject.c:_Py_IsImmortal
Line
Count
Source
127
14.4M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
14.4M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
14.4M
}
sliceobject.c:_Py_IsImmortal
Line
Count
Source
127
174M
{
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
174M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
174M
}
structseq.c:_Py_IsImmortal
Line
Count
Source
127
5.36M
{
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.36M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
5.36M
}
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
2.85G
{
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.85G
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
2.85G
}
typeobject.c:_Py_IsImmortal
Line
Count
Source
127
1.11G
{
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.11G
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.11G
}
typevarobject.c:_Py_IsImmortal
Line
Count
Source
127
263k
{
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
263k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
263k
}
unicode_format.c:_Py_IsImmortal
Line
Count
Source
127
32.4M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
32.4M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
32.4M
}
unicode_formatter.c:_Py_IsImmortal
Line
Count
Source
127
14.6M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
14.6M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
14.6M
}
unicode_writer.c:_Py_IsImmortal
Line
Count
Source
127
27.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
27.2M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
27.2M
}
Unexecuted instantiation: unicodectype.c:_Py_IsImmortal
unicodeobject.c:_Py_IsImmortal
Line
Count
Source
127
176M
{
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
176M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
176M
}
unionobject.c:_Py_IsImmortal
Line
Count
Source
127
4.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
4.51k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
4.51k
}
weakrefobject.c:_Py_IsImmortal
Line
Count
Source
127
2.60M
{
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.60M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
2.60M
}
_warnings.c:_Py_IsImmortal
Line
Count
Source
127
56.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
56.1M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
56.1M
}
bltinmodule.c:_Py_IsImmortal
Line
Count
Source
127
1.81G
{
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.81G
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.81G
}
ceval.c:_Py_IsImmortal
Line
Count
Source
127
9.08G
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
9.08G
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
9.08G
}
codecs.c:_Py_IsImmortal
Line
Count
Source
127
12.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
12.6M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
12.6M
}
codegen.c:_Py_IsImmortal
Line
Count
Source
127
84.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
84.9k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
84.9k
}
compile.c:_Py_IsImmortal
Line
Count
Source
127
405k
{
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
405k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
405k
}
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
90.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
90.5M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
90.5M
}
flowgraph.c:_Py_IsImmortal
Line
Count
Source
127
73.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
73.2k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
73.2k
}
frame.c:_Py_IsImmortal
Line
Count
Source
127
125M
{
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
125M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
125M
}
Unexecuted instantiation: future.c:_Py_IsImmortal
gc.c:_Py_IsImmortal
Line
Count
Source
127
379M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
379M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
379M
}
Unexecuted instantiation: gc_gil.c:_Py_IsImmortal
getargs.c:_Py_IsImmortal
Line
Count
Source
127
9.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
9.76M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
9.76M
}
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
28.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
28.7M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
28.7M
}
importdl.c:_Py_IsImmortal
Line
Count
Source
127
3.19k
{
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.19k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
3.19k
}
initconfig.c:_Py_IsImmortal
Line
Count
Source
127
5.25k
{
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.25k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
5.25k
}
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
}
instruction_sequence.c:_Py_IsImmortal
Line
Count
Source
127
1
{
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
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1
}
intrinsics.c:_Py_IsImmortal
Line
Count
Source
127
73.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
73.1k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
73.1k
}
Unexecuted instantiation: legacy_tracing.c:_Py_IsImmortal
Unexecuted instantiation: lock.c:_Py_IsImmortal
marshal.c:_Py_IsImmortal
Line
Count
Source
127
1.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
1.80M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.80M
}
modsupport.c:_Py_IsImmortal
Line
Count
Source
127
91.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
91.3k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
91.3k
}
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
14.0M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
14.0M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
14.0M
}
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.92k
{
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.92k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.92k
}
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
2.21M
{
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.21M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
2.21M
}
Unexecuted instantiation: slots.c:_Py_IsImmortal
Unexecuted instantiation: slots_generated.c:_Py_IsImmortal
structmember.c:_Py_IsImmortal
Line
Count
Source
127
17.7k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
17.7k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
17.7k
}
symtable.c:_Py_IsImmortal
Line
Count
Source
127
500k
{
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
500k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
500k
}
sysmodule.c:_Py_IsImmortal
Line
Count
Source
127
2.36M
{
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.36M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
2.36M
}
Unexecuted instantiation: thread.c:_Py_IsImmortal
traceback.c:_Py_IsImmortal
Line
Count
Source
127
176M
{
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
176M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
176M
}
Unexecuted instantiation: tracemalloc.c:_Py_IsImmortal
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
88.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
88.2k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
88.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
dynload_shlib.c:_Py_IsImmortal
Line
Count
Source
127
12
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
12
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
12
}
Unexecuted instantiation: config.c:_Py_IsImmortal
Unexecuted instantiation: gcmodule.c:_Py_IsImmortal
_asynciomodule.c:_Py_IsImmortal
Line
Count
Source
127
32
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
32
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
32
}
atexitmodule.c:_Py_IsImmortal
Line
Count
Source
127
12
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
12
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
12
}
Unexecuted instantiation: faulthandler.c:_Py_IsImmortal
posixmodule.c:_Py_IsImmortal
Line
Count
Source
127
2.81M
{
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.81M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
2.81M
}
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
148k
{
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
148k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
148k
}
Unexecuted instantiation: _codecsmodule.c:_Py_IsImmortal
_collectionsmodule.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: errnomodule.c:_Py_IsImmortal
_iomodule.c:_Py_IsImmortal
Line
Count
Source
127
2.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
2.05M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
2.05M
}
iobase.c:_Py_IsImmortal
Line
Count
Source
127
2.26M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
2.26M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
2.26M
}
fileio.c:_Py_IsImmortal
Line
Count
Source
127
83.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
83.1k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
83.1k
}
bytesio.c:_Py_IsImmortal
Line
Count
Source
127
353k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
353k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
353k
}
bufferedio.c:_Py_IsImmortal
Line
Count
Source
127
8.85M
{
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.85M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
8.85M
}
textio.c:_Py_IsImmortal
Line
Count
Source
127
1.11M
{
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.11M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.11M
}
stringio.c:_Py_IsImmortal
Line
Count
Source
127
309k
{
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
309k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
309k
}
itertoolsmodule.c:_Py_IsImmortal
Line
Count
Source
127
97.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
97.3k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
97.3k
}
sre.c:_Py_IsImmortal
Line
Count
Source
127
425M
{
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
425M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
425M
}
Unexecuted instantiation: _sysconfig.c:_Py_IsImmortal
_threadmodule.c:_Py_IsImmortal
Line
Count
Source
127
14.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
14.9M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
14.9M
}
timemodule.c:_Py_IsImmortal
Line
Count
Source
127
192
{
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
192
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
192
}
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
460k
{
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
460k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
460k
}
_functoolsmodule.c:_Py_IsImmortal
Line
Count
Source
127
1.10M
{
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.10M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.10M
}
Unexecuted instantiation: _localemodule.c:_Py_IsImmortal
Unexecuted instantiation: _opcode.c:_Py_IsImmortal
_operator.c:_Py_IsImmortal
Line
Count
Source
127
594k
{
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
594k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
594k
}
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.22k
{
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.22k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.22k
}
Unexecuted instantiation: frozen.c:_Py_IsImmortal
Unexecuted instantiation: getbuildinfo.c:_Py_IsImmortal
Unexecuted instantiation: peg_api.c:_Py_IsImmortal
Unexecuted instantiation: file_tokenizer.c:_Py_IsImmortal
helpers.c:_Py_IsImmortal
Line
Count
Source
127
21.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
21.1k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
21.1k
}
Unexecuted instantiation: myreadline.c:_Py_IsImmortal
abstract.c:_Py_IsImmortal
Line
Count
Source
127
562M
{
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
562M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
562M
}
Unexecuted instantiation: boolobject.c:_Py_IsImmortal
Unexecuted instantiation: bytes_methods.c:_Py_IsImmortal
bytearrayobject.c:_Py_IsImmortal
Line
Count
Source
127
21.8M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
21.8M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
21.8M
}
capsule.c:_Py_IsImmortal
Line
Count
Source
127
28
{
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
28
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
28
}
cellobject.c:_Py_IsImmortal
Line
Count
Source
127
10.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
10.5M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
10.5M
}
classobject.c:_Py_IsImmortal
Line
Count
Source
127
87.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
87.9M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
87.9M
}
codeobject.c:_Py_IsImmortal
Line
Count
Source
127
1.17M
{
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.17M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
1.17M
}
Unexecuted instantiation: complexobject.c:_Py_IsImmortal
descrobject.c:_Py_IsImmortal
Line
Count
Source
127
73.8M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
73.8M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
73.8M
}
enumobject.c:_Py_IsImmortal
Line
Count
Source
127
96.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
96.6M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
96.6M
}
genobject.c:_Py_IsImmortal
Line
Count
Source
127
114M
{
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
114M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
114M
}
fileobject.c:_Py_IsImmortal
Line
Count
Source
127
372k
{
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
372k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
372k
}
frameobject.c:_Py_IsImmortal
Line
Count
Source
127
40.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
40.9M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
40.9M
}
funcobject.c:_Py_IsImmortal
Line
Count
Source
127
220M
{
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
220M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
220M
}
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
3.46M
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
3.46M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
3.46M
}
lazyimportobject.c:_Py_IsImmortal
Line
Count
Source
127
424
{
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
424
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
424
}
odictobject.c:_Py_IsImmortal
Line
Count
Source
127
362k
{
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
362k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
362k
}
methodobject.c:_Py_IsImmortal
Line
Count
Source
127
154M
{
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
154M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
154M
}
namespaceobject.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
}
Unexecuted instantiation: _contextvars.c:_Py_IsImmortal
Python-ast.c:_Py_IsImmortal
Line
Count
Source
127
3.67M
{
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.67M
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
3.67M
}
Python-tokenize.c:_Py_IsImmortal
Line
Count
Source
127
504
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
504
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
504
}
Unexecuted instantiation: asdl.c:_Py_IsImmortal
assemble.c:_Py_IsImmortal
Line
Count
Source
127
37.6k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
37.6k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
37.6k
}
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
297k
{
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
297k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
297k
}
pegen_errors.c:_Py_IsImmortal
Line
Count
Source
127
276k
{
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
276k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
276k
}
Unexecuted instantiation: parser.c:_Py_IsImmortal
Unexecuted instantiation: buffer.c:_Py_IsImmortal
lexer.c:_Py_IsImmortal
Line
Count
Source
127
11.7k
{
128
#if defined(Py_GIL_DISABLED)
129
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
130
            _Py_IMMORTAL_REFCNT_LOCAL);
131
#elif SIZEOF_VOID_P > 4
132
11.7k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
11.7k
}
state.c:_Py_IsImmortal
Line
Count
Source
127
98.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
98.3k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
98.3k
}
readline_tokenizer.c:_Py_IsImmortal
Line
Count
Source
127
348
{
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
348
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
348
}
string_tokenizer.c:_Py_IsImmortal
Line
Count
Source
127
2.09k
{
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.09k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
2.09k
}
Unexecuted instantiation: utf8_tokenizer.c:_Py_IsImmortal
Unexecuted instantiation: getcompiler.c:_Py_IsImmortal
Unexecuted instantiation: mystrtoul.c:_Py_IsImmortal
Unexecuted instantiation: token.c:_Py_IsImmortal
Unexecuted instantiation: action_helpers.c:_Py_IsImmortal
string_parser.c:_Py_IsImmortal
Line
Count
Source
127
38.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
38.9k
    return _Py_CAST(int32_t, op->ob_refcnt) < 0;
133
#else
134
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
135
#endif
136
38.9k
}
137
23.8G
#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: 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: file_tokenizer.c:_Py_IsStaticImmortal
Unexecuted instantiation: helpers.c:_Py_IsStaticImmortal
Unexecuted instantiation: myreadline.c:_Py_IsStaticImmortal
Unexecuted instantiation: abstract.c:_Py_IsStaticImmortal
Unexecuted instantiation: boolobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: bytes_methods.c:_Py_IsStaticImmortal
Unexecuted instantiation: bytearrayobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: 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: 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: buffer.c:_Py_IsStaticImmortal
Unexecuted instantiation: lexer.c:_Py_IsStaticImmortal
Unexecuted instantiation: state.c:_Py_IsStaticImmortal
Unexecuted instantiation: readline_tokenizer.c:_Py_IsStaticImmortal
Unexecuted instantiation: string_tokenizer.c:_Py_IsStaticImmortal
Unexecuted instantiation: utf8_tokenizer.c:_Py_IsStaticImmortal
Unexecuted instantiation: getcompiler.c:_Py_IsStaticImmortal
Unexecuted instantiation: mystrtoul.c:_Py_IsStaticImmortal
Unexecuted instantiation: token.c:_Py_IsStaticImmortal
Unexecuted instantiation: action_helpers.c:_Py_IsStaticImmortal
Unexecuted instantiation: string_parser.c:_Py_IsStaticImmortal
148
0
#define _Py_IsStaticImmortal(op) _Py_IsStaticImmortal(_PyObject_CAST(op))
149
#endif // !defined(_Py_OPAQUE_PYOBJECT)
150
151
// Py_SET_REFCNT() implementation for stable ABI
152
PyAPI_FUNC(void) _Py_SetRefcnt(PyObject *ob, Py_ssize_t refcnt);
153
154
322M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
322M
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000) \
157
    || defined(_Py_OPAQUE_PYOBJECT)
158
    // Stable ABI implements Py_SET_REFCNT() as a function call
159
    // on limited C API version 3.13 and newer, and abi3t.
160
    _Py_SetRefcnt(ob, refcnt);
161
#else
162
    // This immortal check is for code that is unaware of immortal objects.
163
    // The runtime tracks these objects and we should avoid as much
164
    // as possible having extensions inadvertently change the refcnt
165
    // of an immortalized object.
166
322M
    if (_Py_IsImmortal(ob)) {
167
1.11k
        return;
168
1.11k
    }
169
322M
#ifndef Py_GIL_DISABLED
170
322M
#if SIZEOF_VOID_P > 4
171
322M
    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
322M
#endif  // Py_LIMITED_API
199
322M
}
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
233M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
233M
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000) \
157
    || defined(_Py_OPAQUE_PYOBJECT)
158
    // Stable ABI implements Py_SET_REFCNT() as a function call
159
    // on limited C API version 3.13 and newer, and abi3t.
160
    _Py_SetRefcnt(ob, refcnt);
161
#else
162
    // This immortal check is for code that is unaware of immortal objects.
163
    // The runtime tracks these objects and we should avoid as much
164
    // as possible having extensions inadvertently change the refcnt
165
    // of an immortalized object.
166
233M
    if (_Py_IsImmortal(ob)) {
167
0
        return;
168
0
    }
169
233M
#ifndef Py_GIL_DISABLED
170
233M
#if SIZEOF_VOID_P > 4
171
233M
    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
233M
#endif  // Py_LIMITED_API
199
233M
}
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 >= 0x030d0000) \
157
    || defined(_Py_OPAQUE_PYOBJECT)
158
    // Stable ABI implements Py_SET_REFCNT() as a function call
159
    // on limited C API version 3.13 and newer, and abi3t.
160
    _Py_SetRefcnt(ob, refcnt);
161
#else
162
    // This immortal check is for code that is unaware of immortal objects.
163
    // The runtime tracks these objects and we should avoid as much
164
    // as possible having extensions inadvertently change the refcnt
165
    // of an immortalized object.
166
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
48.8M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
48.8M
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000) \
157
    || defined(_Py_OPAQUE_PYOBJECT)
158
    // Stable ABI implements Py_SET_REFCNT() as a function call
159
    // on limited C API version 3.13 and newer, and abi3t.
160
    _Py_SetRefcnt(ob, refcnt);
161
#else
162
    // This immortal check is for code that is unaware of immortal objects.
163
    // The runtime tracks these objects and we should avoid as much
164
    // as possible having extensions inadvertently change the refcnt
165
    // of an immortalized object.
166
48.8M
    if (_Py_IsImmortal(ob)) {
167
0
        return;
168
0
    }
169
48.8M
#ifndef Py_GIL_DISABLED
170
48.8M
#if SIZEOF_VOID_P > 4
171
48.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
48.8M
#endif  // Py_LIMITED_API
199
48.8M
}
Unexecuted instantiation: obmalloc.c:Py_SET_REFCNT
Unexecuted instantiation: picklebufobject.c:Py_SET_REFCNT
Unexecuted instantiation: rangeobject.c:Py_SET_REFCNT
Unexecuted instantiation: sentinelobject.c:Py_SET_REFCNT
Unexecuted instantiation: setobject.c:Py_SET_REFCNT
Unexecuted instantiation: sliceobject.c:Py_SET_REFCNT
Unexecuted instantiation: structseq.c:Py_SET_REFCNT
Unexecuted instantiation: templateobject.c:Py_SET_REFCNT
Unexecuted instantiation: tupleobject.c:Py_SET_REFCNT
Unexecuted instantiation: typeobject.c:Py_SET_REFCNT
Unexecuted instantiation: typevarobject.c:Py_SET_REFCNT
Unexecuted instantiation: unicode_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
1.07M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
1.07M
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000) \
157
    || defined(_Py_OPAQUE_PYOBJECT)
158
    // Stable ABI implements Py_SET_REFCNT() as a function call
159
    // on limited C API version 3.13 and newer, and abi3t.
160
    _Py_SetRefcnt(ob, refcnt);
161
#else
162
    // This immortal check is for code that is unaware of immortal objects.
163
    // The runtime tracks these objects and we should avoid as much
164
    // as possible having extensions inadvertently change the refcnt
165
    // of an immortalized object.
166
1.07M
    if (_Py_IsImmortal(ob)) {
167
0
        return;
168
0
    }
169
1.07M
#ifndef Py_GIL_DISABLED
170
1.07M
#if SIZEOF_VOID_P > 4
171
1.07M
    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
1.07M
#endif  // Py_LIMITED_API
199
1.07M
}
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: 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: file_tokenizer.c:Py_SET_REFCNT
Unexecuted instantiation: helpers.c:Py_SET_REFCNT
Unexecuted instantiation: myreadline.c:Py_SET_REFCNT
Unexecuted instantiation: abstract.c:Py_SET_REFCNT
Unexecuted instantiation: boolobject.c:Py_SET_REFCNT
Unexecuted instantiation: bytes_methods.c:Py_SET_REFCNT
Unexecuted instantiation: bytearrayobject.c:Py_SET_REFCNT
Unexecuted instantiation: 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
200k
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
200k
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000) \
157
    || defined(_Py_OPAQUE_PYOBJECT)
158
    // Stable ABI implements Py_SET_REFCNT() as a function call
159
    // on limited C API version 3.13 and newer, and abi3t.
160
    _Py_SetRefcnt(ob, refcnt);
161
#else
162
    // This immortal check is for code that is unaware of immortal objects.
163
    // The runtime tracks these objects and we should avoid as much
164
    // as possible having extensions inadvertently change the refcnt
165
    // of an immortalized object.
166
200k
    if (_Py_IsImmortal(ob)) {
167
0
        return;
168
0
    }
169
200k
#ifndef Py_GIL_DISABLED
170
200k
#if SIZEOF_VOID_P > 4
171
200k
    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
200k
#endif  // Py_LIMITED_API
199
200k
}
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
38.8M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
155
38.8M
    assert(refcnt >= 0);
156
#if (defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000) \
157
    || defined(_Py_OPAQUE_PYOBJECT)
158
    // Stable ABI implements Py_SET_REFCNT() as a function call
159
    // on limited C API version 3.13 and newer, and abi3t.
160
    _Py_SetRefcnt(ob, refcnt);
161
#else
162
    // This immortal check is for code that is unaware of immortal objects.
163
    // The runtime tracks these objects and we should avoid as much
164
    // as possible having extensions inadvertently change the refcnt
165
    // of an immortalized object.
166
38.8M
    if (_Py_IsImmortal(ob)) {
167
0
        return;
168
0
    }
169
38.8M
#ifndef Py_GIL_DISABLED
170
38.8M
#if SIZEOF_VOID_P > 4
171
38.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
38.8M
#endif  // Py_LIMITED_API
199
38.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: 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: buffer.c:Py_SET_REFCNT
Unexecuted instantiation: lexer.c:Py_SET_REFCNT
Unexecuted instantiation: state.c:Py_SET_REFCNT
Unexecuted instantiation: readline_tokenizer.c:Py_SET_REFCNT
Unexecuted instantiation: string_tokenizer.c:Py_SET_REFCNT
Unexecuted instantiation: utf8_tokenizer.c:Py_SET_REFCNT
Unexecuted instantiation: getcompiler.c:Py_SET_REFCNT
Unexecuted instantiation: mystrtoul.c:Py_SET_REFCNT
Unexecuted instantiation: token.c:Py_SET_REFCNT
Unexecuted instantiation: action_helpers.c:Py_SET_REFCNT
Unexecuted instantiation: string_parser.c:Py_SET_REFCNT
200
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
201
322M
#  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
10.6G
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
10.6G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
6.10G
        _Py_INCREF_IMMORTAL_STAT_INC();
290
6.10G
        return;
291
6.10G
    }
292
4.57G
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
4.57G
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
4.57G
#endif
308
4.57G
}
bytesobject.c:Py_INCREF
Line
Count
Source
256
144M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
144M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
142M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
142M
        return;
291
142M
    }
292
2.57M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
2.57M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
2.57M
#endif
308
2.57M
}
call.c:Py_INCREF
Line
Count
Source
256
32.1M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
32.1M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
18.1M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
18.1M
        return;
291
18.1M
    }
292
14.0M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
14.0M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
14.0M
#endif
308
14.0M
}
exceptions.c:Py_INCREF
Line
Count
Source
256
187M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
187M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
45.9M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
45.9M
        return;
291
45.9M
    }
292
141M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
141M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
141M
#endif
308
141M
}
genericaliasobject.c:Py_INCREF
Line
Count
Source
256
2.29k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
2.29k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
1.73k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
1.73k
        return;
291
1.73k
    }
292
562
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
562
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
562
#endif
308
562
}
floatobject.c:Py_INCREF
Line
Count
Source
256
1.29M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
1.29M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
1.29M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
1.29M
        return;
291
1.29M
    }
292
0
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
0
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
0
#endif
308
0
}
listobject.c:Py_INCREF
Line
Count
Source
256
1.43G
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
1.43G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
351M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
351M
        return;
291
351M
    }
292
1.08G
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
1.08G
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
1.08G
#endif
308
1.08G
}
longobject.c:Py_INCREF
Line
Count
Source
256
100M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
100M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
100M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
100M
        return;
291
100M
    }
292
1.03k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
1.03k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
1.03k
#endif
308
1.03k
}
dictobject.c:Py_INCREF
Line
Count
Source
256
974M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
974M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
302M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
302M
        return;
291
302M
    }
292
671M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
671M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
671M
#endif
308
671M
}
memoryobject.c:Py_INCREF
Line
Count
Source
256
3.24M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
3.24M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
162
        _Py_INCREF_IMMORTAL_STAT_INC();
290
162
        return;
291
162
    }
292
3.24M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
3.24M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
3.24M
#endif
308
3.24M
}
moduleobject.c:Py_INCREF
Line
Count
Source
256
8.39k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
8.39k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
6.82k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
6.82k
        return;
291
6.82k
    }
292
1.56k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
1.56k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
1.56k
#endif
308
1.56k
}
object.c:Py_INCREF
Line
Count
Source
256
848M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
848M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
571M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
571M
        return;
291
571M
    }
292
277M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
277M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
277M
#endif
308
277M
}
Unexecuted instantiation: obmalloc.c:Py_INCREF
Unexecuted instantiation: picklebufobject.c:Py_INCREF
rangeobject.c:Py_INCREF
Line
Count
Source
256
148
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
148
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
111
        _Py_INCREF_IMMORTAL_STAT_INC();
290
111
        return;
291
111
    }
292
37
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
37
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
37
#endif
308
37
}
sentinelobject.c:Py_INCREF
Line
Count
Source
256
141
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
141
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
141
        _Py_INCREF_IMMORTAL_STAT_INC();
290
141
        return;
291
141
    }
292
0
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
0
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
0
#endif
308
0
}
setobject.c:Py_INCREF
Line
Count
Source
256
12.1M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
12.1M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
893k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
893k
        return;
291
893k
    }
292
11.2M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
11.2M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
11.2M
#endif
308
11.2M
}
sliceobject.c:Py_INCREF
Line
Count
Source
256
174M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
174M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
97.7M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
97.7M
        return;
291
97.7M
    }
292
77.1M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
77.1M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
77.1M
#endif
308
77.1M
}
structseq.c:Py_INCREF
Line
Count
Source
256
135k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
135k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
123k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
123k
        return;
291
123k
    }
292
12.3k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
12.3k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
12.3k
#endif
308
12.3k
}
templateobject.c:Py_INCREF
Line
Count
Source
256
22
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
22
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
7
        _Py_INCREF_IMMORTAL_STAT_INC();
290
7
        return;
291
7
    }
292
15
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
15
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
15
#endif
308
15
}
tupleobject.c:Py_INCREF
Line
Count
Source
256
2.50G
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
2.50G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
1.99G
        _Py_INCREF_IMMORTAL_STAT_INC();
290
1.99G
        return;
291
1.99G
    }
292
505M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
505M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
505M
#endif
308
505M
}
typeobject.c:Py_INCREF
Line
Count
Source
256
333M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
333M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
197M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
197M
        return;
291
197M
    }
292
136M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
136M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
136M
#endif
308
136M
}
typevarobject.c:Py_INCREF
Line
Count
Source
256
2.20k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
2.20k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
780
        _Py_INCREF_IMMORTAL_STAT_INC();
290
780
        return;
291
780
    }
292
1.42k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
1.42k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
1.42k
#endif
308
1.42k
}
unicode_format.c:Py_INCREF
Line
Count
Source
256
17.1M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
17.1M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
7.33M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
7.33M
        return;
291
7.33M
    }
292
9.83M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
9.83M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
9.83M
#endif
308
9.83M
}
Unexecuted instantiation: unicode_formatter.c:Py_INCREF
unicode_writer.c:Py_INCREF
Line
Count
Source
256
6.37k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
6.37k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
6.37k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
6.37k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
6.37k
#endif
308
6.37k
}
Unexecuted instantiation: unicodectype.c:Py_INCREF
unicodeobject.c:Py_INCREF
Line
Count
Source
256
704M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
704M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
631M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
631M
        return;
291
631M
    }
292
72.8M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
72.8M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
72.8M
#endif
308
72.8M
}
unionobject.c:Py_INCREF
Line
Count
Source
256
920
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
920
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
596
        _Py_INCREF_IMMORTAL_STAT_INC();
290
596
        return;
291
596
    }
292
324
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
324
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
324
#endif
308
324
}
weakrefobject.c:Py_INCREF
Line
Count
Source
256
3.43M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
3.43M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
119k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
119k
        return;
291
119k
    }
292
3.31M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
3.31M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
3.31M
#endif
308
3.31M
}
_warnings.c:Py_INCREF
Line
Count
Source
256
4.80M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
4.80M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
2.40M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
2.40M
        return;
291
2.40M
    }
292
2.39M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
2.39M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
2.39M
#endif
308
2.39M
}
bltinmodule.c:Py_INCREF
Line
Count
Source
256
79.1M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
79.1M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
44.5M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
44.5M
        return;
291
44.5M
    }
292
34.5M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
34.5M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
34.5M
#endif
308
34.5M
}
ceval.c:Py_INCREF
Line
Count
Source
256
1.05G
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
1.05G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
590M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
590M
        return;
291
590M
    }
292
461M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
461M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
461M
#endif
308
461M
}
codecs.c:Py_INCREF
Line
Count
Source
256
5.95M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
5.95M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
338k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
338k
        return;
291
338k
    }
292
5.62M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
5.62M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
5.62M
#endif
308
5.62M
}
codegen.c:Py_INCREF
Line
Count
Source
256
2.45k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
2.45k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
2.45k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
2.45k
        return;
291
2.45k
    }
292
0
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
0
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
0
#endif
308
0
}
compile.c:Py_INCREF
Line
Count
Source
256
76.6k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
76.6k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
36.8k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
36.8k
        return;
291
36.8k
    }
292
39.7k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
39.7k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
39.7k
#endif
308
39.7k
}
context.c:Py_INCREF
Line
Count
Source
256
66
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
66
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
29
        _Py_INCREF_IMMORTAL_STAT_INC();
290
29
        return;
291
29
    }
292
37
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
37
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
37
#endif
308
37
}
errors.c:Py_INCREF
Line
Count
Source
256
87.5M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
87.5M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
38.1M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
38.1M
        return;
291
38.1M
    }
292
49.4M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
49.4M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
49.4M
#endif
308
49.4M
}
flowgraph.c:Py_INCREF
Line
Count
Source
256
79.5k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
79.5k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
43.9k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
43.9k
        return;
291
43.9k
    }
292
35.5k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
35.5k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
35.5k
#endif
308
35.5k
}
frame.c:Py_INCREF
Line
Count
Source
256
61.1M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
61.1M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
61.1M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
61.1M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
61.1M
#endif
308
61.1M
}
Unexecuted instantiation: future.c:Py_INCREF
gc.c:Py_INCREF
Line
Count
Source
256
493M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
493M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
415M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
415M
        return;
291
415M
    }
292
77.8M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
77.8M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
77.8M
#endif
308
77.8M
}
Unexecuted instantiation: gc_gil.c:Py_INCREF
getargs.c:Py_INCREF
Line
Count
Source
256
3.12M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
3.12M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
2.42M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
2.42M
        return;
291
2.42M
    }
292
694k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
694k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
694k
#endif
308
694k
}
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
17.9M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
17.9M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
3.92M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
3.92M
        return;
291
3.92M
    }
292
14.0M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
14.0M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
14.0M
#endif
308
14.0M
}
importdl.c:Py_INCREF
Line
Count
Source
256
1.38k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
1.38k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
1.07k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
1.07k
        return;
291
1.07k
    }
292
315
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
315
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
315
#endif
308
315
}
initconfig.c:Py_INCREF
Line
Count
Source
256
629
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
629
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
629
        _Py_INCREF_IMMORTAL_STAT_INC();
290
629
        return;
291
629
    }
292
0
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
0
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
0
#endif
308
0
}
Unexecuted instantiation: instrumentation.c:Py_INCREF
Unexecuted instantiation: instruction_sequence.c:Py_INCREF
intrinsics.c:Py_INCREF
Line
Count
Source
256
66.5k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
66.5k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
66.5k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
66.5k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
66.5k
#endif
308
66.5k
}
Unexecuted instantiation: legacy_tracing.c:Py_INCREF
Unexecuted instantiation: lock.c:Py_INCREF
marshal.c:Py_INCREF
Line
Count
Source
256
1.92M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
1.92M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
1.75M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
1.75M
        return;
291
1.75M
    }
292
172k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
172k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
172k
#endif
308
172k
}
modsupport.c:Py_INCREF
Line
Count
Source
256
3.24M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
3.24M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
601k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
601k
        return;
291
601k
    }
292
2.64M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
2.64M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
2.64M
#endif
308
2.64M
}
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) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
37
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
37
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
37
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
37
#endif
308
37
}
Unexecuted instantiation: pymath.c:Py_INCREF
pystate.c:Py_INCREF
Line
Count
Source
256
1.06M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
1.06M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
1.06M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
1.06M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
1.06M
#endif
308
1.06M
}
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
6.11M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
6.11M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
914k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
914k
        return;
291
914k
    }
292
5.20M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
5.20M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
5.20M
#endif
308
5.20M
}
symtable.c:Py_INCREF
Line
Count
Source
256
156k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
156k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
156k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
156k
        return;
291
156k
    }
292
359
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
359
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
359
#endif
308
359
}
sysmodule.c:Py_INCREF
Line
Count
Source
256
4.11k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
4.11k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
2.34k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
2.34k
        return;
291
2.34k
    }
292
1.77k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
1.77k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
1.77k
#endif
308
1.77k
}
Unexecuted instantiation: thread.c:Py_INCREF
traceback.c:Py_INCREF
Line
Count
Source
256
88.3M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
88.3M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
88.3M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
88.3M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
88.3M
#endif
308
88.3M
}
Unexecuted instantiation: tracemalloc.c:Py_INCREF
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
Unexecuted instantiation: suggestions.c:Py_INCREF
Unexecuted instantiation: perf_trampoline.c:Py_INCREF
Unexecuted instantiation: perf_jit_trampoline.c:Py_INCREF
Unexecuted instantiation: jit_unwind.c:Py_INCREF
Unexecuted instantiation: remote_debugging.c:Py_INCREF
Unexecuted instantiation: dynload_shlib.c:Py_INCREF
Unexecuted instantiation: config.c:Py_INCREF
Unexecuted instantiation: gcmodule.c:Py_INCREF
Unexecuted instantiation: _asynciomodule.c:Py_INCREF
atexitmodule.c:Py_INCREF
Line
Count
Source
256
6
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
6
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
6
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
6
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
6
#endif
308
6
}
Unexecuted instantiation: faulthandler.c:Py_INCREF
posixmodule.c:Py_INCREF
Line
Count
Source
256
2.21M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
2.21M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
386k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
386k
        return;
291
386k
    }
292
1.82M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
1.82M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
1.82M
#endif
308
1.82M
}
signalmodule.c:Py_INCREF
Line
Count
Source
256
2.36k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
2.36k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
2.36k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
2.36k
        return;
291
2.36k
    }
292
0
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
0
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
0
#endif
308
0
}
Unexecuted instantiation: _tracemalloc.c:Py_INCREF
Unexecuted instantiation: _suggestions.c:Py_INCREF
_datetimemodule.c:Py_INCREF
Line
Count
Source
256
37.4k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
37.4k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
20.4k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
20.4k
        return;
291
20.4k
    }
292
16.9k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
16.9k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
16.9k
#endif
308
16.9k
}
Unexecuted instantiation: _codecsmodule.c:Py_INCREF
_collectionsmodule.c:Py_INCREF
Line
Count
Source
256
23.4M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
23.4M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
21.1M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
21.1M
        return;
291
21.1M
    }
292
2.29M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
2.29M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
2.29M
#endif
308
2.29M
}
Unexecuted instantiation: errnomodule.c:Py_INCREF
_iomodule.c:Py_INCREF
Line
Count
Source
256
310
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
310
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
284
        _Py_INCREF_IMMORTAL_STAT_INC();
290
284
        return;
291
284
    }
292
26
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
26
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
26
#endif
308
26
}
iobase.c:Py_INCREF
Line
Count
Source
256
103k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
103k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
103k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
103k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
103k
#endif
308
103k
}
Unexecuted instantiation: fileio.c:Py_INCREF
bytesio.c:Py_INCREF
Line
Count
Source
256
69.6k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
69.6k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
2.17k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
2.17k
        return;
291
2.17k
    }
292
67.4k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
67.4k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
67.4k
#endif
308
67.4k
}
bufferedio.c:Py_INCREF
Line
Count
Source
256
39.3k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
39.3k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
39.3k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
39.3k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
39.3k
#endif
308
39.3k
}
textio.c:Py_INCREF
Line
Count
Source
256
619k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
619k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
20.0k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
20.0k
        return;
291
20.0k
    }
292
599k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
599k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
599k
#endif
308
599k
}
stringio.c:Py_INCREF
Line
Count
Source
256
22.0k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
22.0k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
100
        _Py_INCREF_IMMORTAL_STAT_INC();
290
100
        return;
291
100
    }
292
21.9k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
21.9k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
21.9k
#endif
308
21.9k
}
itertoolsmodule.c:Py_INCREF
Line
Count
Source
256
42.7k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
42.7k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
41.4k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
41.4k
        return;
291
41.4k
    }
292
1.33k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
1.33k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
1.33k
#endif
308
1.33k
}
sre.c:Py_INCREF
Line
Count
Source
256
214M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
214M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
60.7M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
60.7M
        return;
291
60.7M
    }
292
153M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
153M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
153M
#endif
308
153M
}
Unexecuted instantiation: _sysconfig.c:Py_INCREF
_threadmodule.c:Py_INCREF
Line
Count
Source
256
152
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
152
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
76
        _Py_INCREF_IMMORTAL_STAT_INC();
290
76
        return;
291
76
    }
292
76
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
76
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
76
#endif
308
76
}
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
109k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
109k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
109k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
109k
        return;
291
109k
    }
292
393
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
393
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
393
#endif
308
393
}
_functoolsmodule.c:Py_INCREF
Line
Count
Source
256
643k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
643k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
23.8k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
23.8k
        return;
291
23.8k
    }
292
619k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
619k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
619k
#endif
308
619k
}
Unexecuted instantiation: _localemodule.c:Py_INCREF
Unexecuted instantiation: _opcode.c:Py_INCREF
_operator.c:Py_INCREF
Line
Count
Source
256
1.31M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
1.31M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
1.29M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
1.29M
        return;
291
1.29M
    }
292
22.3k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
22.3k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
22.3k
#endif
308
22.3k
}
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
518
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
518
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
518
        _Py_INCREF_IMMORTAL_STAT_INC();
290
518
        return;
291
518
    }
292
0
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
0
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
0
#endif
308
0
}
Unexecuted instantiation: frozen.c:Py_INCREF
Unexecuted instantiation: getbuildinfo.c:Py_INCREF
Unexecuted instantiation: peg_api.c:Py_INCREF
Unexecuted instantiation: file_tokenizer.c:Py_INCREF
Unexecuted instantiation: helpers.c:Py_INCREF
Unexecuted instantiation: myreadline.c:Py_INCREF
abstract.c:Py_INCREF
Line
Count
Source
256
565M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
565M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
321M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
321M
        return;
291
321M
    }
292
244M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
244M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
244M
#endif
308
244M
}
Unexecuted instantiation: boolobject.c:Py_INCREF
Unexecuted instantiation: bytes_methods.c:Py_INCREF
bytearrayobject.c:Py_INCREF
Line
Count
Source
256
17.0M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
17.0M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
17.0M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
17.0M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
17.0M
#endif
308
17.0M
}
Unexecuted instantiation: capsule.c:Py_INCREF
cellobject.c:Py_INCREF
Line
Count
Source
256
5.04M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
5.04M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
1.00M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
1.00M
        return;
291
1.00M
    }
292
4.04M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
4.04M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
4.04M
#endif
308
4.04M
}
classobject.c:Py_INCREF
Line
Count
Source
256
87.9M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
87.9M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
125
        _Py_INCREF_IMMORTAL_STAT_INC();
290
125
        return;
291
125
    }
292
87.9M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
87.9M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
87.9M
#endif
308
87.9M
}
codeobject.c:Py_INCREF
Line
Count
Source
256
2.17M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
2.17M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
888k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
888k
        return;
291
888k
    }
292
1.29M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
1.29M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
1.29M
#endif
308
1.29M
}
complexobject.c:Py_INCREF
Line
Count
Source
256
4.65k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
4.65k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
4.65k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
4.65k
        return;
291
4.65k
    }
292
0
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
0
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
0
#endif
308
0
}
descrobject.c:Py_INCREF
Line
Count
Source
256
21.0M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
21.0M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
73.0k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
73.0k
        return;
291
73.0k
    }
292
20.9M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
20.9M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
20.9M
#endif
308
20.9M
}
enumobject.c:Py_INCREF
Line
Count
Source
256
18.0M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
18.0M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
12
        _Py_INCREF_IMMORTAL_STAT_INC();
290
12
        return;
291
12
    }
292
18.0M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
18.0M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
18.0M
#endif
308
18.0M
}
genobject.c:Py_INCREF
Line
Count
Source
256
48.4M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
48.4M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
48.2M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
48.2M
        return;
291
48.2M
    }
292
167k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
167k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
167k
#endif
308
167k
}
Unexecuted instantiation: fileobject.c:Py_INCREF
frameobject.c:Py_INCREF
Line
Count
Source
256
40.4M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
40.4M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
168
        _Py_INCREF_IMMORTAL_STAT_INC();
290
168
        return;
291
168
    }
292
40.4M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
40.4M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
40.4M
#endif
308
40.4M
}
funcobject.c:Py_INCREF
Line
Count
Source
256
98.0M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
98.0M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
58.4M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
58.4M
        return;
291
58.4M
    }
292
39.5M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
39.5M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
39.5M
#endif
308
39.5M
}
interpolationobject.c:Py_INCREF
Line
Count
Source
256
12
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
12
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
12
        _Py_INCREF_IMMORTAL_STAT_INC();
290
12
        return;
291
12
    }
292
0
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
0
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
0
#endif
308
0
}
iterobject.c:Py_INCREF
Line
Count
Source
256
3.10M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
3.10M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
358k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
358k
        return;
291
358k
    }
292
2.74M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
2.74M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
2.74M
#endif
308
2.74M
}
lazyimportobject.c:Py_INCREF
Line
Count
Source
256
1.53k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
1.53k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
552
        _Py_INCREF_IMMORTAL_STAT_INC();
290
552
        return;
291
552
    }
292
985
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
985
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
985
#endif
308
985
}
odictobject.c:Py_INCREF
Line
Count
Source
256
250k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
250k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
139k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
139k
        return;
291
139k
    }
292
111k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
111k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
111k
#endif
308
111k
}
methodobject.c:Py_INCREF
Line
Count
Source
256
154M
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
154M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
25.4M
        _Py_INCREF_IMMORTAL_STAT_INC();
290
25.4M
        return;
291
25.4M
    }
292
129M
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
129M
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
129M
#endif
308
129M
}
Unexecuted instantiation: namespaceobject.c:Py_INCREF
Unexecuted instantiation: _contextvars.c:Py_INCREF
Python-ast.c:Py_INCREF
Line
Count
Source
256
517k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
517k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
227k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
227k
        return;
291
227k
    }
292
289k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
289k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
289k
#endif
308
289k
}
Unexecuted instantiation: Python-tokenize.c:Py_INCREF
Unexecuted instantiation: asdl.c:Py_INCREF
assemble.c:Py_INCREF
Line
Count
Source
256
28.2k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
28.2k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
28.2k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
28.2k
        return;
291
28.2k
    }
292
47
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
47
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
47
#endif
308
47
}
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
98.7k
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
98.7k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
1.30k
        _Py_INCREF_IMMORTAL_STAT_INC();
290
1.30k
        return;
291
1.30k
    }
292
97.4k
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
97.4k
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
97.4k
#endif
308
97.4k
}
Unexecuted instantiation: pegen_errors.c:Py_INCREF
Unexecuted instantiation: parser.c:Py_INCREF
Unexecuted instantiation: buffer.c:Py_INCREF
Unexecuted instantiation: lexer.c:Py_INCREF
Unexecuted instantiation: state.c:Py_INCREF
readline_tokenizer.c:Py_INCREF
Line
Count
Source
256
20
{
257
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
258
    || defined(_Py_OPAQUE_PYOBJECT)
259
    // Stable ABI implements Py_INCREF() as a function call on limited C API
260
    // version 3.12 and newer, abi3t, and on Python built in debug mode.
261
    // _Py_IncRef() was added to Python 3.10.0a7, use Py_IncRef() on older versions.
262
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
263
#  if Py_LIMITED_API+0 >= 0x030a00A7
264
    _Py_IncRef(op);
265
#  else
266
    Py_IncRef(op);
267
#  endif
268
#else
269
    // Non-limited C API and limited C API for Python 3.9 and older access
270
    // directly PyObject.ob_refcnt.
271
#if defined(Py_GIL_DISABLED)
272
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
273
    uint32_t new_local = local + 1;
274
    if (new_local == 0) {
275
        _Py_INCREF_IMMORTAL_STAT_INC();
276
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
277
        return;
278
    }
279
    if (_Py_IsOwnedByCurrentThread(op)) {
280
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
281
    }
282
    else {
283
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
284
    }
285
#elif SIZEOF_VOID_P > 4
286
    uint32_t cur_refcnt = op->ob_refcnt;
287
20
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
288
        // the object is immortal
289
0
        _Py_INCREF_IMMORTAL_STAT_INC();
290
0
        return;
291
0
    }
292
20
    op->ob_refcnt = cur_refcnt + 1;
293
#else
294
    if (_Py_IsImmortal(op)) {
295
        _Py_INCREF_IMMORTAL_STAT_INC();
296
        return;
297
    }
298
    op->ob_refcnt++;
299
#endif
300
20
    _Py_INCREF_STAT_INC();
301
#ifdef Py_REF_DEBUG
302
    // Don't count the incref if the object is immortal.
303
    if (!_Py_IsImmortal(op)) {
304
        _Py_INCREF_IncRefTotal();
305
    }
306
#endif
307
20
#endif
308
20
}
Unexecuted instantiation: string_tokenizer.c:Py_INCREF
Unexecuted instantiation: utf8_tokenizer.c:Py_INCREF
Unexecuted instantiation: getcompiler.c:Py_INCREF
Unexecuted instantiation: mystrtoul.c:Py_INCREF
Unexecuted instantiation: token.c:Py_INCREF
Unexecuted instantiation: action_helpers.c:Py_INCREF
Unexecuted instantiation: string_parser.c:Py_INCREF
309
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
310
10.6G
#  define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op))
311
#endif
312
313
#if !defined(Py_LIMITED_API)
314
#if defined(Py_GIL_DISABLED)
315
// Implements Py_DECREF on objects not owned by the current thread.
316
PyAPI_FUNC(void) _Py_DecRefShared(PyObject *);
317
PyAPI_FUNC(void) _Py_DecRefSharedDebug(PyObject *, const char *, int);
318
319
// Called from Py_DECREF by the owning thread when the local refcount reaches
320
// zero. The call will deallocate the object if the shared refcount is also
321
// zero. Otherwise, the thread gives up ownership and merges the reference
322
// count fields.
323
PyAPI_FUNC(void) _Py_MergeZeroLocalRefcount(PyObject *);
324
#endif  // Py_GIL_DISABLED
325
#endif  // Py_LIMITED_API
326
327
#if (defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))) \
328
    || defined(_Py_OPAQUE_PYOBJECT)
329
// Stable ABI implements Py_DECREF() as a function call on limited C API
330
// version 3.12 and newer, abi3t, and on Python built in debug mode.
331
// _Py_DecRef() was added to Python 3.10.0a7, use Py_DecRef() on older versions.
332
// Py_DecRef() accepts NULL whereas _Py_DecRef() doesn't.
333
10.1k
static inline void Py_DECREF(PyObject *op) {
334
10.1k
#  if Py_LIMITED_API+0 >= 0x030a00A7
335
10.1k
    _Py_DecRef(op);
336
#  else
337
    Py_DecRef(op);
338
#  endif
339
10.1k
}
errnomodule.c:Py_DECREF
Line
Count
Source
333
10.1k
static inline void Py_DECREF(PyObject *op) {
334
10.1k
#  if Py_LIMITED_API+0 >= 0x030a00A7
335
10.1k
    _Py_DecRef(op);
336
#  else
337
    Py_DecRef(op);
338
#  endif
339
10.1k
}
Unexecuted instantiation: _stat.c:Py_DECREF
340
10.1k
#define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op))
341
342
#elif defined(Py_GIL_DISABLED) && defined(Py_REF_DEBUG)
343
static inline void Py_DECREF(const char *filename, int lineno, PyObject *op)
344
{
345
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
346
    if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
347
        _Py_DECREF_IMMORTAL_STAT_INC();
348
        return;
349
    }
350
    _Py_DECREF_STAT_INC();
351
    _Py_DECREF_DecRefTotal();
352
    if (_Py_IsOwnedByCurrentThread(op)) {
353
        if (local == 0) {
354
            _Py_NegativeRefcount(filename, lineno, op);
355
        }
356
        local--;
357
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, local);
358
        if (local == 0) {
359
            _Py_MergeZeroLocalRefcount(op);
360
        }
361
    }
362
    else {
363
        _Py_DecRefSharedDebug(op, filename, lineno);
364
    }
365
}
366
#define Py_DECREF(op) Py_DECREF(__FILE__, __LINE__, _PyObject_CAST(op))
367
368
#elif defined(Py_GIL_DISABLED)
369
static inline void Py_DECREF(PyObject *op)
370
{
371
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
372
    if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
373
        _Py_DECREF_IMMORTAL_STAT_INC();
374
        return;
375
    }
376
    _Py_DECREF_STAT_INC();
377
    if (_Py_IsOwnedByCurrentThread(op)) {
378
        local--;
379
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, local);
380
        if (local == 0) {
381
            _Py_MergeZeroLocalRefcount(op);
382
        }
383
    }
384
    else {
385
        _Py_DecRefShared(op);
386
    }
387
}
388
#define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op))
389
390
#elif defined(Py_REF_DEBUG)
391
392
static inline void Py_DECREF(const char *filename, int lineno, PyObject *op)
393
{
394
#if SIZEOF_VOID_P > 4
395
    /* If an object has been freed, it will have a negative full refcnt
396
     * If it has not it been freed, will have a very large refcnt */
397
    if (op->ob_refcnt_full <= 0 || op->ob_refcnt > (((uint32_t)-1) - (1<<20))) {
398
#else
399
    if (op->ob_refcnt <= 0) {
400
#endif
401
        _Py_NegativeRefcount(filename, lineno, op);
402
    }
403
    if (_Py_IsImmortal(op)) {
404
        _Py_DECREF_IMMORTAL_STAT_INC();
405
        return;
406
    }
407
    _Py_DECREF_STAT_INC();
408
    _Py_DECREF_DecRefTotal();
409
    if (--op->ob_refcnt == 0) {
410
        _Py_Dealloc(op);
411
    }
412
}
413
#define Py_DECREF(op) Py_DECREF(__FILE__, __LINE__, _PyObject_CAST(op))
414
415
#else
416
417
static inline Py_ALWAYS_INLINE void Py_DECREF(PyObject *op)
418
11.3G
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
11.3G
    if (_Py_IsImmortal(op)) {
422
6.46G
        _Py_DECREF_IMMORTAL_STAT_INC();
423
6.46G
        return;
424
6.46G
    }
425
4.90G
    _Py_DECREF_STAT_INC();
426
4.90G
    if (--op->ob_refcnt == 0) {
427
1.20G
        _Py_Dealloc(op);
428
1.20G
    }
429
4.90G
}
bytesobject.c:Py_DECREF
Line
Count
Source
418
27.2M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
27.2M
    if (_Py_IsImmortal(op)) {
422
24.8M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
24.8M
        return;
424
24.8M
    }
425
2.30M
    _Py_DECREF_STAT_INC();
426
2.30M
    if (--op->ob_refcnt == 0) {
427
172k
        _Py_Dealloc(op);
428
172k
    }
429
2.30M
}
call.c:Py_DECREF
Line
Count
Source
418
224M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
224M
    if (_Py_IsImmortal(op)) {
422
81.0M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
81.0M
        return;
424
81.0M
    }
425
143M
    _Py_DECREF_STAT_INC();
426
143M
    if (--op->ob_refcnt == 0) {
427
107M
        _Py_Dealloc(op);
428
107M
    }
429
143M
}
exceptions.c:Py_DECREF
Line
Count
Source
418
204M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
204M
    if (_Py_IsImmortal(op)) {
422
49.4M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
49.4M
        return;
424
49.4M
    }
425
154M
    _Py_DECREF_STAT_INC();
426
154M
    if (--op->ob_refcnt == 0) {
427
93.5M
        _Py_Dealloc(op);
428
93.5M
    }
429
154M
}
genericaliasobject.c:Py_DECREF
Line
Count
Source
418
296
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
296
    if (_Py_IsImmortal(op)) {
422
168
        _Py_DECREF_IMMORTAL_STAT_INC();
423
168
        return;
424
168
    }
425
128
    _Py_DECREF_STAT_INC();
426
128
    if (--op->ob_refcnt == 0) {
427
128
        _Py_Dealloc(op);
428
128
    }
429
128
}
floatobject.c:Py_DECREF
Line
Count
Source
418
502k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
502k
    if (_Py_IsImmortal(op)) {
422
54.0k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
54.0k
        return;
424
54.0k
    }
425
448k
    _Py_DECREF_STAT_INC();
426
448k
    if (--op->ob_refcnt == 0) {
427
16
        _Py_Dealloc(op);
428
16
    }
429
448k
}
listobject.c:Py_DECREF
Line
Count
Source
418
1.69G
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.69G
    if (_Py_IsImmortal(op)) {
422
473M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
473M
        return;
424
473M
    }
425
1.22G
    _Py_DECREF_STAT_INC();
426
1.22G
    if (--op->ob_refcnt == 0) {
427
254M
        _Py_Dealloc(op);
428
254M
    }
429
1.22G
}
longobject.c:Py_DECREF
Line
Count
Source
418
38.4M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
38.4M
    if (_Py_IsImmortal(op)) {
422
28.0M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
28.0M
        return;
424
28.0M
    }
425
10.4M
    _Py_DECREF_STAT_INC();
426
10.4M
    if (--op->ob_refcnt == 0) {
427
2.88M
        _Py_Dealloc(op);
428
2.88M
    }
429
10.4M
}
dictobject.c:Py_DECREF
Line
Count
Source
418
654M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
654M
    if (_Py_IsImmortal(op)) {
422
306M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
306M
        return;
424
306M
    }
425
347M
    _Py_DECREF_STAT_INC();
426
347M
    if (--op->ob_refcnt == 0) {
427
86.3M
        _Py_Dealloc(op);
428
86.3M
    }
429
347M
}
memoryobject.c:Py_DECREF
Line
Count
Source
418
3.43M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
3.43M
    if (_Py_IsImmortal(op)) {
422
120k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
120k
        return;
424
120k
    }
425
3.31M
    _Py_DECREF_STAT_INC();
426
3.31M
    if (--op->ob_refcnt == 0) {
427
1.57M
        _Py_Dealloc(op);
428
1.57M
    }
429
3.31M
}
moduleobject.c:Py_DECREF
Line
Count
Source
418
4.53M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
4.53M
    if (_Py_IsImmortal(op)) {
422
4.49M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
4.49M
        return;
424
4.49M
    }
425
36.2k
    _Py_DECREF_STAT_INC();
426
36.2k
    if (--op->ob_refcnt == 0) {
427
4.38k
        _Py_Dealloc(op);
428
4.38k
    }
429
36.2k
}
object.c:Py_DECREF
Line
Count
Source
418
784M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
784M
    if (_Py_IsImmortal(op)) {
422
549M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
549M
        return;
424
549M
    }
425
235M
    _Py_DECREF_STAT_INC();
426
235M
    if (--op->ob_refcnt == 0) {
427
12.8k
        _Py_Dealloc(op);
428
12.8k
    }
429
235M
}
Unexecuted instantiation: obmalloc.c:Py_DECREF
Unexecuted instantiation: picklebufobject.c:Py_DECREF
rangeobject.c:Py_DECREF
Line
Count
Source
418
44.1M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
44.1M
    if (_Py_IsImmortal(op)) {
422
43.8M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
43.8M
        return;
424
43.8M
    }
425
281k
    _Py_DECREF_STAT_INC();
426
281k
    if (--op->ob_refcnt == 0) {
427
145k
        _Py_Dealloc(op);
428
145k
    }
429
281k
}
sentinelobject.c:Py_DECREF
Line
Count
Source
418
47
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
47
    if (_Py_IsImmortal(op)) {
422
47
        _Py_DECREF_IMMORTAL_STAT_INC();
423
47
        return;
424
47
    }
425
0
    _Py_DECREF_STAT_INC();
426
0
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
0
}
setobject.c:Py_DECREF
Line
Count
Source
418
14.4M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
14.4M
    if (_Py_IsImmortal(op)) {
422
3.86M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
3.86M
        return;
424
3.86M
    }
425
10.6M
    _Py_DECREF_STAT_INC();
426
10.6M
    if (--op->ob_refcnt == 0) {
427
1.87M
        _Py_Dealloc(op);
428
1.87M
    }
429
10.6M
}
sliceobject.c:Py_DECREF
Line
Count
Source
418
174M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
174M
    if (_Py_IsImmortal(op)) {
422
97.8M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
97.8M
        return;
424
97.8M
    }
425
77.1M
    _Py_DECREF_STAT_INC();
426
77.1M
    if (--op->ob_refcnt == 0) {
427
24.6k
        _Py_Dealloc(op);
428
24.6k
    }
429
77.1M
}
structseq.c:Py_DECREF
Line
Count
Source
418
5.36M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
5.36M
    if (_Py_IsImmortal(op)) {
422
1.64M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.64M
        return;
424
1.64M
    }
425
3.72M
    _Py_DECREF_STAT_INC();
426
3.72M
    if (--op->ob_refcnt == 0) {
427
3.38M
        _Py_Dealloc(op);
428
3.38M
    }
429
3.72M
}
templateobject.c:Py_DECREF
Line
Count
Source
418
22
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
22
    if (_Py_IsImmortal(op)) {
422
7
        _Py_DECREF_IMMORTAL_STAT_INC();
423
7
        return;
424
7
    }
425
15
    _Py_DECREF_STAT_INC();
426
15
    if (--op->ob_refcnt == 0) {
427
4
        _Py_Dealloc(op);
428
4
    }
429
15
}
tupleobject.c:Py_DECREF
Line
Count
Source
418
2.85G
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
2.85G
    if (_Py_IsImmortal(op)) {
422
2.10G
        _Py_DECREF_IMMORTAL_STAT_INC();
423
2.10G
        return;
424
2.10G
    }
425
741M
    _Py_DECREF_STAT_INC();
426
741M
    if (--op->ob_refcnt == 0) {
427
123M
        _Py_Dealloc(op);
428
123M
    }
429
741M
}
typeobject.c:Py_DECREF
Line
Count
Source
418
366M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
366M
    if (_Py_IsImmortal(op)) {
422
105M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
105M
        return;
424
105M
    }
425
260M
    _Py_DECREF_STAT_INC();
426
260M
    if (--op->ob_refcnt == 0) {
427
47.5M
        _Py_Dealloc(op);
428
47.5M
    }
429
260M
}
typevarobject.c:Py_DECREF
Line
Count
Source
418
263k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
263k
    if (_Py_IsImmortal(op)) {
422
368
        _Py_DECREF_IMMORTAL_STAT_INC();
423
368
        return;
424
368
    }
425
263k
    _Py_DECREF_STAT_INC();
426
263k
    if (--op->ob_refcnt == 0) {
427
816
        _Py_Dealloc(op);
428
816
    }
429
263k
}
unicode_format.c:Py_DECREF
Line
Count
Source
418
32.4M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
32.4M
    if (_Py_IsImmortal(op)) {
422
7.37M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
7.37M
        return;
424
7.37M
    }
425
25.0M
    _Py_DECREF_STAT_INC();
426
25.0M
    if (--op->ob_refcnt == 0) {
427
10.1M
        _Py_Dealloc(op);
428
10.1M
    }
429
25.0M
}
unicode_formatter.c:Py_DECREF
Line
Count
Source
418
14.6M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
14.6M
    if (_Py_IsImmortal(op)) {
422
10.9M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
10.9M
        return;
424
10.9M
    }
425
3.66M
    _Py_DECREF_STAT_INC();
426
3.66M
    if (--op->ob_refcnt == 0) {
427
3.66M
        _Py_Dealloc(op);
428
3.66M
    }
429
3.66M
}
unicode_writer.c:Py_DECREF
Line
Count
Source
418
27.2M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
27.2M
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
27.2M
    _Py_DECREF_STAT_INC();
426
27.2M
    if (--op->ob_refcnt == 0) {
427
27.2M
        _Py_Dealloc(op);
428
27.2M
    }
429
27.2M
}
Unexecuted instantiation: unicodectype.c:Py_DECREF
unicodeobject.c:Py_DECREF
Line
Count
Source
418
168M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
168M
    if (_Py_IsImmortal(op)) {
422
90.3M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
90.3M
        return;
424
90.3M
    }
425
78.3M
    _Py_DECREF_STAT_INC();
426
78.3M
    if (--op->ob_refcnt == 0) {
427
15.1M
        _Py_Dealloc(op);
428
15.1M
    }
429
78.3M
}
unionobject.c:Py_DECREF
Line
Count
Source
418
4.51k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
4.51k
    if (_Py_IsImmortal(op)) {
422
572
        _Py_DECREF_IMMORTAL_STAT_INC();
423
572
        return;
424
572
    }
425
3.94k
    _Py_DECREF_STAT_INC();
426
3.94k
    if (--op->ob_refcnt == 0) {
427
3.35k
        _Py_Dealloc(op);
428
3.35k
    }
429
3.94k
}
weakrefobject.c:Py_DECREF
Line
Count
Source
418
2.60M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
2.60M
    if (_Py_IsImmortal(op)) {
422
149k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
149k
        return;
424
149k
    }
425
2.45M
    _Py_DECREF_STAT_INC();
426
2.45M
    if (--op->ob_refcnt == 0) {
427
30.8k
        _Py_Dealloc(op);
428
30.8k
    }
429
2.45M
}
_warnings.c:Py_DECREF
Line
Count
Source
418
56.1M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
56.1M
    if (_Py_IsImmortal(op)) {
422
5.60M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
5.60M
        return;
424
5.60M
    }
425
50.5M
    _Py_DECREF_STAT_INC();
426
50.5M
    if (--op->ob_refcnt == 0) {
427
2.15M
        _Py_Dealloc(op);
428
2.15M
    }
429
50.5M
}
bltinmodule.c:Py_DECREF
Line
Count
Source
418
1.81G
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.81G
    if (_Py_IsImmortal(op)) {
422
1.62G
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.62G
        return;
424
1.62G
    }
425
184M
    _Py_DECREF_STAT_INC();
426
184M
    if (--op->ob_refcnt == 0) {
427
126M
        _Py_Dealloc(op);
428
126M
    }
429
184M
}
ceval.c:Py_DECREF
Line
Count
Source
418
120k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
120k
    if (_Py_IsImmortal(op)) {
422
613
        _Py_DECREF_IMMORTAL_STAT_INC();
423
613
        return;
424
613
    }
425
120k
    _Py_DECREF_STAT_INC();
426
120k
    if (--op->ob_refcnt == 0) {
427
547
        _Py_Dealloc(op);
428
547
    }
429
120k
}
codecs.c:Py_DECREF
Line
Count
Source
418
12.6M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
12.6M
    if (_Py_IsImmortal(op)) {
422
4.41M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
4.41M
        return;
424
4.41M
    }
425
8.19M
    _Py_DECREF_STAT_INC();
426
8.19M
    if (--op->ob_refcnt == 0) {
427
3.95M
        _Py_Dealloc(op);
428
3.95M
    }
429
8.19M
}
codegen.c:Py_DECREF
Line
Count
Source
418
84.9k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
84.9k
    if (_Py_IsImmortal(op)) {
422
74.4k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
74.4k
        return;
424
74.4k
    }
425
10.5k
    _Py_DECREF_STAT_INC();
426
10.5k
    if (--op->ob_refcnt == 0) {
427
414
        _Py_Dealloc(op);
428
414
    }
429
10.5k
}
compile.c:Py_DECREF
Line
Count
Source
418
405k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
405k
    if (_Py_IsImmortal(op)) {
422
208k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
208k
        return;
424
208k
    }
425
197k
    _Py_DECREF_STAT_INC();
426
197k
    if (--op->ob_refcnt == 0) {
427
74.4k
        _Py_Dealloc(op);
428
74.4k
    }
429
197k
}
context.c:Py_DECREF
Line
Count
Source
418
74
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
74
    if (_Py_IsImmortal(op)) {
422
37
        _Py_DECREF_IMMORTAL_STAT_INC();
423
37
        return;
424
37
    }
425
37
    _Py_DECREF_STAT_INC();
426
37
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
37
}
errors.c:Py_DECREF
Line
Count
Source
418
90.5M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
90.5M
    if (_Py_IsImmortal(op)) {
422
38.1M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
38.1M
        return;
424
38.1M
    }
425
52.3M
    _Py_DECREF_STAT_INC();
426
52.3M
    if (--op->ob_refcnt == 0) {
427
18.5M
        _Py_Dealloc(op);
428
18.5M
    }
429
52.3M
}
flowgraph.c:Py_DECREF
Line
Count
Source
418
73.2k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
73.2k
    if (_Py_IsImmortal(op)) {
422
45.1k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
45.1k
        return;
424
45.1k
    }
425
28.0k
    _Py_DECREF_STAT_INC();
426
28.0k
    if (--op->ob_refcnt == 0) {
427
138
        _Py_Dealloc(op);
428
138
    }
429
28.0k
}
frame.c:Py_DECREF
Line
Count
Source
418
57.1M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
57.1M
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
57.1M
    _Py_DECREF_STAT_INC();
426
57.1M
    if (--op->ob_refcnt == 0) {
427
16.1M
        _Py_Dealloc(op);
428
16.1M
    }
429
57.1M
}
Unexecuted instantiation: future.c:Py_DECREF
gc.c:Py_DECREF
Line
Count
Source
418
4.09M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
4.09M
    if (_Py_IsImmortal(op)) {
422
44.4k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
44.4k
        return;
424
44.4k
    }
425
4.05M
    _Py_DECREF_STAT_INC();
426
4.05M
    if (--op->ob_refcnt == 0) {
427
944k
        _Py_Dealloc(op);
428
944k
    }
429
4.05M
}
Unexecuted instantiation: gc_gil.c:Py_DECREF
getargs.c:Py_DECREF
Line
Count
Source
418
9.76M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
9.76M
    if (_Py_IsImmortal(op)) {
422
8.94M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
8.94M
        return;
424
8.94M
    }
425
818k
    _Py_DECREF_STAT_INC();
426
818k
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
818k
}
Unexecuted instantiation: ceval_gil.c:Py_DECREF
Unexecuted instantiation: hamt.c:Py_DECREF
Unexecuted instantiation: hashtable.c:Py_DECREF
import.c:Py_DECREF
Line
Count
Source
418
28.7M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
28.7M
    if (_Py_IsImmortal(op)) {
422
3.92M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
3.92M
        return;
424
3.92M
    }
425
24.8M
    _Py_DECREF_STAT_INC();
426
24.8M
    if (--op->ob_refcnt == 0) {
427
311k
        _Py_Dealloc(op);
428
311k
    }
429
24.8M
}
importdl.c:Py_DECREF
Line
Count
Source
418
3.19k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
3.19k
    if (_Py_IsImmortal(op)) {
422
1.26k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.26k
        return;
424
1.26k
    }
425
1.92k
    _Py_DECREF_STAT_INC();
426
1.92k
    if (--op->ob_refcnt == 0) {
427
1.17k
        _Py_Dealloc(op);
428
1.17k
    }
429
1.92k
}
initconfig.c:Py_DECREF
Line
Count
Source
418
5.25k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
5.25k
    if (_Py_IsImmortal(op)) {
422
4.25k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
4.25k
        return;
424
4.25k
    }
425
999
    _Py_DECREF_STAT_INC();
426
999
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
999
}
instrumentation.c:Py_DECREF
Line
Count
Source
418
888
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
888
    if (_Py_IsImmortal(op)) {
422
555
        _Py_DECREF_IMMORTAL_STAT_INC();
423
555
        return;
424
555
    }
425
333
    _Py_DECREF_STAT_INC();
426
333
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
333
}
instruction_sequence.c:Py_DECREF
Line
Count
Source
418
1
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
1
    _Py_DECREF_STAT_INC();
426
1
    if (--op->ob_refcnt == 0) {
427
1
        _Py_Dealloc(op);
428
1
    }
429
1
}
intrinsics.c:Py_DECREF
Line
Count
Source
418
73.1k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
73.1k
    if (_Py_IsImmortal(op)) {
422
41.5k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
41.5k
        return;
424
41.5k
    }
425
31.6k
    _Py_DECREF_STAT_INC();
426
31.6k
    if (--op->ob_refcnt == 0) {
427
327
        _Py_Dealloc(op);
428
327
    }
429
31.6k
}
Unexecuted instantiation: legacy_tracing.c:Py_DECREF
Unexecuted instantiation: lock.c:Py_DECREF
marshal.c:Py_DECREF
Line
Count
Source
418
1.80M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.80M
    if (_Py_IsImmortal(op)) {
422
747k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
747k
        return;
424
747k
    }
425
1.06M
    _Py_DECREF_STAT_INC();
426
1.06M
    if (--op->ob_refcnt == 0) {
427
6.91k
        _Py_Dealloc(op);
428
6.91k
    }
429
1.06M
}
modsupport.c:Py_DECREF
Line
Count
Source
418
91.3k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
91.3k
    if (_Py_IsImmortal(op)) {
422
40.6k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
40.6k
        return;
424
40.6k
    }
425
50.7k
    _Py_DECREF_STAT_INC();
426
50.7k
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
50.7k
}
Unexecuted instantiation: mysnprintf.c:Py_DECREF
Unexecuted instantiation: parking_lot.c:Py_DECREF
Unexecuted instantiation: preconfig.c:Py_DECREF
pyarena.c:Py_DECREF
Line
Count
Source
418
14.0M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
14.0M
    if (_Py_IsImmortal(op)) {
422
13.3M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
13.3M
        return;
424
13.3M
    }
425
694k
    _Py_DECREF_STAT_INC();
426
694k
    if (--op->ob_refcnt == 0) {
427
99.8k
        _Py_Dealloc(op);
428
99.8k
    }
429
694k
}
Unexecuted instantiation: pyctype.c:Py_DECREF
Unexecuted instantiation: pyhash.c:Py_DECREF
pylifecycle.c:Py_DECREF
Line
Count
Source
418
1.33k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.33k
    if (_Py_IsImmortal(op)) {
422
259
        _Py_DECREF_IMMORTAL_STAT_INC();
423
259
        return;
424
259
    }
425
1.07k
    _Py_DECREF_STAT_INC();
426
1.07k
    if (--op->ob_refcnt == 0) {
427
111
        _Py_Dealloc(op);
428
111
    }
429
1.07k
}
Unexecuted instantiation: pymath.c:Py_DECREF
Unexecuted instantiation: pystate.c:Py_DECREF
pythonrun.c:Py_DECREF
Line
Count
Source
418
1.92k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.92k
    if (_Py_IsImmortal(op)) {
422
420
        _Py_DECREF_IMMORTAL_STAT_INC();
423
420
        return;
424
420
    }
425
1.50k
    _Py_DECREF_STAT_INC();
426
1.50k
    if (--op->ob_refcnt == 0) {
427
593
        _Py_Dealloc(op);
428
593
    }
429
1.50k
}
Unexecuted instantiation: pytime.c:Py_DECREF
Unexecuted instantiation: qsbr.c:Py_DECREF
Unexecuted instantiation: bootstrap_hash.c:Py_DECREF
specialize.c:Py_DECREF
Line
Count
Source
418
2.21M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
2.21M
    if (_Py_IsImmortal(op)) {
422
1.11M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.11M
        return;
424
1.11M
    }
425
1.09M
    _Py_DECREF_STAT_INC();
426
1.09M
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
1.09M
}
Unexecuted instantiation: slots.c:Py_DECREF
Unexecuted instantiation: slots_generated.c:Py_DECREF
structmember.c:Py_DECREF
Line
Count
Source
418
17.7k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
17.7k
    if (_Py_IsImmortal(op)) {
422
9.25k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
9.25k
        return;
424
9.25k
    }
425
8.54k
    _Py_DECREF_STAT_INC();
426
8.54k
    if (--op->ob_refcnt == 0) {
427
330
        _Py_Dealloc(op);
428
330
    }
429
8.54k
}
symtable.c:Py_DECREF
Line
Count
Source
418
500k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
500k
    if (_Py_IsImmortal(op)) {
422
214k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
214k
        return;
424
214k
    }
425
285k
    _Py_DECREF_STAT_INC();
426
285k
    if (--op->ob_refcnt == 0) {
427
150k
        _Py_Dealloc(op);
428
150k
    }
429
285k
}
sysmodule.c:Py_DECREF
Line
Count
Source
418
2.36M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
2.36M
    if (_Py_IsImmortal(op)) {
422
545k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
545k
        return;
424
545k
    }
425
1.81M
    _Py_DECREF_STAT_INC();
426
1.81M
    if (--op->ob_refcnt == 0) {
427
1.35M
        _Py_Dealloc(op);
428
1.35M
    }
429
1.81M
}
Unexecuted instantiation: thread.c:Py_DECREF
traceback.c:Py_DECREF
Line
Count
Source
418
176M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
176M
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
176M
    _Py_DECREF_STAT_INC();
426
176M
    if (--op->ob_refcnt == 0) {
427
54.8M
        _Py_Dealloc(op);
428
54.8M
    }
429
176M
}
Unexecuted instantiation: tracemalloc.c:Py_DECREF
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
418
88.2k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
88.2k
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
88.2k
    _Py_DECREF_STAT_INC();
426
88.2k
    if (--op->ob_refcnt == 0) {
427
88.2k
        _Py_Dealloc(op);
428
88.2k
    }
429
88.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
dynload_shlib.c:Py_DECREF
Line
Count
Source
418
12
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
12
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
12
    _Py_DECREF_STAT_INC();
426
12
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
12
}
Unexecuted instantiation: config.c:Py_DECREF
Unexecuted instantiation: gcmodule.c:Py_DECREF
_asynciomodule.c:Py_DECREF
Line
Count
Source
418
32
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
32
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
32
    _Py_DECREF_STAT_INC();
426
32
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
32
}
atexitmodule.c:Py_DECREF
Line
Count
Source
418
12
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
12
    if (_Py_IsImmortal(op)) {
422
6
        _Py_DECREF_IMMORTAL_STAT_INC();
423
6
        return;
424
6
    }
425
6
    _Py_DECREF_STAT_INC();
426
6
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
6
}
Unexecuted instantiation: faulthandler.c:Py_DECREF
posixmodule.c:Py_DECREF
Line
Count
Source
418
2.81M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
2.81M
    if (_Py_IsImmortal(op)) {
422
972k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
972k
        return;
424
972k
    }
425
1.83M
    _Py_DECREF_STAT_INC();
426
1.83M
    if (--op->ob_refcnt == 0) {
427
759k
        _Py_Dealloc(op);
428
759k
    }
429
1.83M
}
signalmodule.c:Py_DECREF
Line
Count
Source
418
74
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
74
    if (_Py_IsImmortal(op)) {
422
37
        _Py_DECREF_IMMORTAL_STAT_INC();
423
37
        return;
424
37
    }
425
37
    _Py_DECREF_STAT_INC();
426
37
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
37
}
Unexecuted instantiation: _tracemalloc.c:Py_DECREF
Unexecuted instantiation: _suggestions.c:Py_DECREF
_datetimemodule.c:Py_DECREF
Line
Count
Source
418
148k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
148k
    if (_Py_IsImmortal(op)) {
422
22.4k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
22.4k
        return;
424
22.4k
    }
425
126k
    _Py_DECREF_STAT_INC();
426
126k
    if (--op->ob_refcnt == 0) {
427
63.9k
        _Py_Dealloc(op);
428
63.9k
    }
429
126k
}
Unexecuted instantiation: _codecsmodule.c:Py_DECREF
_collectionsmodule.c:Py_DECREF
Line
Count
Source
418
214k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
214k
    if (_Py_IsImmortal(op)) {
422
114k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
114k
        return;
424
114k
    }
425
99.5k
    _Py_DECREF_STAT_INC();
426
99.5k
    if (--op->ob_refcnt == 0) {
427
42.2k
        _Py_Dealloc(op);
428
42.2k
    }
429
99.5k
}
_iomodule.c:Py_DECREF
Line
Count
Source
418
2.05M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
2.05M
    if (_Py_IsImmortal(op)) {
422
1.93M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.93M
        return;
424
1.93M
    }
425
113k
    _Py_DECREF_STAT_INC();
426
113k
    if (--op->ob_refcnt == 0) {
427
55.7k
        _Py_Dealloc(op);
428
55.7k
    }
429
113k
}
iobase.c:Py_DECREF
Line
Count
Source
418
2.26M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
2.26M
    if (_Py_IsImmortal(op)) {
422
2.16M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
2.16M
        return;
424
2.16M
    }
425
101k
    _Py_DECREF_STAT_INC();
426
101k
    if (--op->ob_refcnt == 0) {
427
50.8k
        _Py_Dealloc(op);
428
50.8k
    }
429
101k
}
fileio.c:Py_DECREF
Line
Count
Source
418
83.1k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
83.1k
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
83.1k
    _Py_DECREF_STAT_INC();
426
83.1k
    if (--op->ob_refcnt == 0) {
427
55.3k
        _Py_Dealloc(op);
428
55.3k
    }
429
83.1k
}
bytesio.c:Py_DECREF
Line
Count
Source
418
353k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
353k
    if (_Py_IsImmortal(op)) {
422
151k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
151k
        return;
424
151k
    }
425
201k
    _Py_DECREF_STAT_INC();
426
201k
    if (--op->ob_refcnt == 0) {
427
14.7k
        _Py_Dealloc(op);
428
14.7k
    }
429
201k
}
bufferedio.c:Py_DECREF
Line
Count
Source
418
8.85M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
8.85M
    if (_Py_IsImmortal(op)) {
422
8.39M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
8.39M
        return;
424
8.39M
    }
425
457k
    _Py_DECREF_STAT_INC();
426
457k
    if (--op->ob_refcnt == 0) {
427
381k
        _Py_Dealloc(op);
428
381k
    }
429
457k
}
textio.c:Py_DECREF
Line
Count
Source
418
1.11M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.11M
    if (_Py_IsImmortal(op)) {
422
292k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
292k
        return;
424
292k
    }
425
818k
    _Py_DECREF_STAT_INC();
426
818k
    if (--op->ob_refcnt == 0) {
427
260k
        _Py_Dealloc(op);
428
260k
    }
429
818k
}
stringio.c:Py_DECREF
Line
Count
Source
418
309k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
309k
    if (_Py_IsImmortal(op)) {
422
158k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
158k
        return;
424
158k
    }
425
150k
    _Py_DECREF_STAT_INC();
426
150k
    if (--op->ob_refcnt == 0) {
427
32.0k
        _Py_Dealloc(op);
428
32.0k
    }
429
150k
}
itertoolsmodule.c:Py_DECREF
Line
Count
Source
418
97.3k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
97.3k
    if (_Py_IsImmortal(op)) {
422
5.65k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
5.65k
        return;
424
5.65k
    }
425
91.6k
    _Py_DECREF_STAT_INC();
426
91.6k
    if (--op->ob_refcnt == 0) {
427
31.1k
        _Py_Dealloc(op);
428
31.1k
    }
429
91.6k
}
sre.c:Py_DECREF
Line
Count
Source
418
425M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
425M
    if (_Py_IsImmortal(op)) {
422
164M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
164M
        return;
424
164M
    }
425
260M
    _Py_DECREF_STAT_INC();
426
260M
    if (--op->ob_refcnt == 0) {
427
18.2M
        _Py_Dealloc(op);
428
18.2M
    }
429
260M
}
Unexecuted instantiation: _sysconfig.c:Py_DECREF
_threadmodule.c:Py_DECREF
Line
Count
Source
418
14.9M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
14.9M
    if (_Py_IsImmortal(op)) {
422
4
        _Py_DECREF_IMMORTAL_STAT_INC();
423
4
        return;
424
4
    }
425
14.9M
    _Py_DECREF_STAT_INC();
426
14.9M
    if (--op->ob_refcnt == 0) {
427
8
        _Py_Dealloc(op);
428
8
    }
429
14.9M
}
timemodule.c:Py_DECREF
Line
Count
Source
418
192
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
192
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
192
    _Py_DECREF_STAT_INC();
426
192
    if (--op->ob_refcnt == 0) {
427
192
        _Py_Dealloc(op);
428
192
    }
429
192
}
Unexecuted instantiation: _typesmodule.c:Py_DECREF
Unexecuted instantiation: _typingmodule.c:Py_DECREF
Unexecuted instantiation: _weakref.c:Py_DECREF
_abc.c:Py_DECREF
Line
Count
Source
418
460k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
460k
    if (_Py_IsImmortal(op)) {
422
118k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
118k
        return;
424
118k
    }
425
342k
    _Py_DECREF_STAT_INC();
426
342k
    if (--op->ob_refcnt == 0) {
427
7.50k
        _Py_Dealloc(op);
428
7.50k
    }
429
342k
}
_functoolsmodule.c:Py_DECREF
Line
Count
Source
418
1.10M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.10M
    if (_Py_IsImmortal(op)) {
422
241k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
241k
        return;
424
241k
    }
425
865k
    _Py_DECREF_STAT_INC();
426
865k
    if (--op->ob_refcnt == 0) {
427
467k
        _Py_Dealloc(op);
428
467k
    }
429
865k
}
Unexecuted instantiation: _localemodule.c:Py_DECREF
Unexecuted instantiation: _opcode.c:Py_DECREF
_operator.c:Py_DECREF
Line
Count
Source
418
594k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
594k
    if (_Py_IsImmortal(op)) {
422
297k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
297k
        return;
424
297k
    }
425
297k
    _Py_DECREF_STAT_INC();
426
297k
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
297k
}
Unexecuted instantiation: symtablemodule.c:Py_DECREF
Unexecuted instantiation: pwdmodule.c:Py_DECREF
getpath.c:Py_DECREF
Line
Count
Source
418
1.22k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
1.22k
    if (_Py_IsImmortal(op)) {
422
444
        _Py_DECREF_IMMORTAL_STAT_INC();
423
444
        return;
424
444
    }
425
777
    _Py_DECREF_STAT_INC();
426
777
    if (--op->ob_refcnt == 0) {
427
37
        _Py_Dealloc(op);
428
37
    }
429
777
}
Unexecuted instantiation: frozen.c:Py_DECREF
Unexecuted instantiation: getbuildinfo.c:Py_DECREF
Unexecuted instantiation: peg_api.c:Py_DECREF
Unexecuted instantiation: file_tokenizer.c:Py_DECREF
helpers.c:Py_DECREF
Line
Count
Source
418
21.1k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
21.1k
    if (_Py_IsImmortal(op)) {
422
734
        _Py_DECREF_IMMORTAL_STAT_INC();
423
734
        return;
424
734
    }
425
20.4k
    _Py_DECREF_STAT_INC();
426
20.4k
    if (--op->ob_refcnt == 0) {
427
14.3k
        _Py_Dealloc(op);
428
14.3k
    }
429
20.4k
}
Unexecuted instantiation: myreadline.c:Py_DECREF
abstract.c:Py_DECREF
Line
Count
Source
418
562M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
562M
    if (_Py_IsImmortal(op)) {
422
373M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
373M
        return;
424
373M
    }
425
188M
    _Py_DECREF_STAT_INC();
426
188M
    if (--op->ob_refcnt == 0) {
427
8.89M
        _Py_Dealloc(op);
428
8.89M
    }
429
188M
}
Unexecuted instantiation: boolobject.c:Py_DECREF
Unexecuted instantiation: bytes_methods.c:Py_DECREF
bytearrayobject.c:Py_DECREF
Line
Count
Source
418
21.8M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
21.8M
    if (_Py_IsImmortal(op)) {
422
1.89M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.89M
        return;
424
1.89M
    }
425
19.9M
    _Py_DECREF_STAT_INC();
426
19.9M
    if (--op->ob_refcnt == 0) {
427
19.9M
        _Py_Dealloc(op);
428
19.9M
    }
429
19.9M
}
capsule.c:Py_DECREF
Line
Count
Source
418
28
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
28
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
28
    _Py_DECREF_STAT_INC();
426
28
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
28
}
cellobject.c:Py_DECREF
Line
Count
Source
418
10.5M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
10.5M
    if (_Py_IsImmortal(op)) {
422
1.74M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.74M
        return;
424
1.74M
    }
425
8.83M
    _Py_DECREF_STAT_INC();
426
8.83M
    if (--op->ob_refcnt == 0) {
427
3.14M
        _Py_Dealloc(op);
428
3.14M
    }
429
8.83M
}
classobject.c:Py_DECREF
Line
Count
Source
418
87.9M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
87.9M
    if (_Py_IsImmortal(op)) {
422
125
        _Py_DECREF_IMMORTAL_STAT_INC();
423
125
        return;
424
125
    }
425
87.9M
    _Py_DECREF_STAT_INC();
426
87.9M
    if (--op->ob_refcnt == 0) {
427
6.03k
        _Py_Dealloc(op);
428
6.03k
    }
429
87.9M
}
codeobject.c:Py_DECREF
Line
Count
Source
418
970k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
970k
    if (_Py_IsImmortal(op)) {
422
432k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
432k
        return;
424
432k
    }
425
538k
    _Py_DECREF_STAT_INC();
426
538k
    if (--op->ob_refcnt == 0) {
427
416k
        _Py_Dealloc(op);
428
416k
    }
429
538k
}
Unexecuted instantiation: complexobject.c:Py_DECREF
descrobject.c:Py_DECREF
Line
Count
Source
418
73.8M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
73.8M
    if (_Py_IsImmortal(op)) {
422
11.2M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
11.2M
        return;
424
11.2M
    }
425
62.5M
    _Py_DECREF_STAT_INC();
426
62.5M
    if (--op->ob_refcnt == 0) {
427
32.9M
        _Py_Dealloc(op);
428
32.9M
    }
429
62.5M
}
enumobject.c:Py_DECREF
Line
Count
Source
418
96.6M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
96.6M
    if (_Py_IsImmortal(op)) {
422
15.3M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
15.3M
        return;
424
15.3M
    }
425
81.3M
    _Py_DECREF_STAT_INC();
426
81.3M
    if (--op->ob_refcnt == 0) {
427
60.5M
        _Py_Dealloc(op);
428
60.5M
    }
429
81.3M
}
genobject.c:Py_DECREF
Line
Count
Source
418
60.2M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
60.2M
    if (_Py_IsImmortal(op)) {
422
60.1M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
60.1M
        return;
424
60.1M
    }
425
82.9k
    _Py_DECREF_STAT_INC();
426
82.9k
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
82.9k
}
fileobject.c:Py_DECREF
Line
Count
Source
418
372k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
372k
    if (_Py_IsImmortal(op)) {
422
366k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
366k
        return;
424
366k
    }
425
6.53k
    _Py_DECREF_STAT_INC();
426
6.53k
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
6.53k
}
frameobject.c:Py_DECREF
Line
Count
Source
418
40.9M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
40.9M
    if (_Py_IsImmortal(op)) {
422
84
        _Py_DECREF_IMMORTAL_STAT_INC();
423
84
        return;
424
84
    }
425
40.9M
    _Py_DECREF_STAT_INC();
426
40.9M
    if (--op->ob_refcnt == 0) {
427
10.3M
        _Py_Dealloc(op);
428
10.3M
    }
429
40.9M
}
funcobject.c:Py_DECREF
Line
Count
Source
418
182M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
182M
    if (_Py_IsImmortal(op)) {
422
102M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
102M
        return;
424
102M
    }
425
79.9M
    _Py_DECREF_STAT_INC();
426
79.9M
    if (--op->ob_refcnt == 0) {
427
7.22M
        _Py_Dealloc(op);
428
7.22M
    }
429
79.9M
}
interpolationobject.c:Py_DECREF
Line
Count
Source
418
53
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
53
    if (_Py_IsImmortal(op)) {
422
16
        _Py_DECREF_IMMORTAL_STAT_INC();
423
16
        return;
424
16
    }
425
37
    _Py_DECREF_STAT_INC();
426
37
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
37
}
iterobject.c:Py_DECREF
Line
Count
Source
418
3.46M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
3.46M
    if (_Py_IsImmortal(op)) {
422
717k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
717k
        return;
424
717k
    }
425
2.74M
    _Py_DECREF_STAT_INC();
426
2.74M
    if (--op->ob_refcnt == 0) {
427
358k
        _Py_Dealloc(op);
428
358k
    }
429
2.74M
}
lazyimportobject.c:Py_DECREF
Line
Count
Source
418
424
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
424
    if (_Py_IsImmortal(op)) {
422
107
        _Py_DECREF_IMMORTAL_STAT_INC();
423
107
        return;
424
107
    }
425
317
    _Py_DECREF_STAT_INC();
426
317
    if (--op->ob_refcnt == 0) {
427
6
        _Py_Dealloc(op);
428
6
    }
429
317
}
odictobject.c:Py_DECREF
Line
Count
Source
418
362k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
362k
    if (_Py_IsImmortal(op)) {
422
168k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
168k
        return;
424
168k
    }
425
194k
    _Py_DECREF_STAT_INC();
426
194k
    if (--op->ob_refcnt == 0) {
427
45.4k
        _Py_Dealloc(op);
428
45.4k
    }
429
194k
}
methodobject.c:Py_DECREF
Line
Count
Source
418
154M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
154M
    if (_Py_IsImmortal(op)) {
422
25.4M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
25.4M
        return;
424
25.4M
    }
425
129M
    _Py_DECREF_STAT_INC();
426
129M
    if (--op->ob_refcnt == 0) {
427
30.9M
        _Py_Dealloc(op);
428
30.9M
    }
429
129M
}
namespaceobject.c:Py_DECREF
Line
Count
Source
418
53
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
53
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
53
    _Py_DECREF_STAT_INC();
426
53
    if (--op->ob_refcnt == 0) {
427
53
        _Py_Dealloc(op);
428
53
    }
429
53
}
Unexecuted instantiation: _contextvars.c:Py_DECREF
Python-ast.c:Py_DECREF
Line
Count
Source
418
3.67M
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
3.67M
    if (_Py_IsImmortal(op)) {
422
1.93M
        _Py_DECREF_IMMORTAL_STAT_INC();
423
1.93M
        return;
424
1.93M
    }
425
1.74M
    _Py_DECREF_STAT_INC();
426
1.74M
    if (--op->ob_refcnt == 0) {
427
457k
        _Py_Dealloc(op);
428
457k
    }
429
1.74M
}
Python-tokenize.c:Py_DECREF
Line
Count
Source
418
504
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
504
    if (_Py_IsImmortal(op)) {
422
196
        _Py_DECREF_IMMORTAL_STAT_INC();
423
196
        return;
424
196
    }
425
308
    _Py_DECREF_STAT_INC();
426
308
    if (--op->ob_refcnt == 0) {
427
20
        _Py_Dealloc(op);
428
20
    }
429
308
}
Unexecuted instantiation: asdl.c:Py_DECREF
assemble.c:Py_DECREF
Line
Count
Source
418
37.6k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
37.6k
    if (_Py_IsImmortal(op)) {
422
8.05k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
8.05k
        return;
424
8.05k
    }
425
29.6k
    _Py_DECREF_STAT_INC();
426
29.6k
    if (--op->ob_refcnt == 0) {
427
0
        _Py_Dealloc(op);
428
0
    }
429
29.6k
}
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
418
297k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
297k
    if (_Py_IsImmortal(op)) {
422
58.0k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
58.0k
        return;
424
58.0k
    }
425
239k
    _Py_DECREF_STAT_INC();
426
239k
    if (--op->ob_refcnt == 0) {
427
213k
        _Py_Dealloc(op);
428
213k
    }
429
239k
}
pegen_errors.c:Py_DECREF
Line
Count
Source
418
276k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
276k
    if (_Py_IsImmortal(op)) {
422
2.41k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
2.41k
        return;
424
2.41k
    }
425
273k
    _Py_DECREF_STAT_INC();
426
273k
    if (--op->ob_refcnt == 0) {
427
3.45k
        _Py_Dealloc(op);
428
3.45k
    }
429
273k
}
Unexecuted instantiation: parser.c:Py_DECREF
Unexecuted instantiation: buffer.c:Py_DECREF
lexer.c:Py_DECREF
Line
Count
Source
418
11.7k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
11.7k
    if (_Py_IsImmortal(op)) {
422
881
        _Py_DECREF_IMMORTAL_STAT_INC();
423
881
        return;
424
881
    }
425
10.9k
    _Py_DECREF_STAT_INC();
426
10.9k
    if (--op->ob_refcnt == 0) {
427
10.9k
        _Py_Dealloc(op);
428
10.9k
    }
429
10.9k
}
state.c:Py_DECREF
Line
Count
Source
418
98.3k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
98.3k
    if (_Py_IsImmortal(op)) {
422
806
        _Py_DECREF_IMMORTAL_STAT_INC();
423
806
        return;
424
806
    }
425
97.5k
    _Py_DECREF_STAT_INC();
426
97.5k
    if (--op->ob_refcnt == 0) {
427
75
        _Py_Dealloc(op);
428
75
    }
429
97.5k
}
readline_tokenizer.c:Py_DECREF
Line
Count
Source
418
348
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
348
    if (_Py_IsImmortal(op)) {
422
44
        _Py_DECREF_IMMORTAL_STAT_INC();
423
44
        return;
424
44
    }
425
304
    _Py_DECREF_STAT_INC();
426
304
    if (--op->ob_refcnt == 0) {
427
68
        _Py_Dealloc(op);
428
68
    }
429
304
}
string_tokenizer.c:Py_DECREF
Line
Count
Source
418
2.09k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
2.09k
    if (_Py_IsImmortal(op)) {
422
0
        _Py_DECREF_IMMORTAL_STAT_INC();
423
0
        return;
424
0
    }
425
2.09k
    _Py_DECREF_STAT_INC();
426
2.09k
    if (--op->ob_refcnt == 0) {
427
2.09k
        _Py_Dealloc(op);
428
2.09k
    }
429
2.09k
}
Unexecuted instantiation: utf8_tokenizer.c:Py_DECREF
Unexecuted instantiation: getcompiler.c:Py_DECREF
Unexecuted instantiation: mystrtoul.c:Py_DECREF
Unexecuted instantiation: token.c:Py_DECREF
Unexecuted instantiation: action_helpers.c:Py_DECREF
string_parser.c:Py_DECREF
Line
Count
Source
418
38.9k
{
419
    // Non-limited C API and limited C API for Python 3.9 and older access
420
    // directly PyObject.ob_refcnt.
421
38.9k
    if (_Py_IsImmortal(op)) {
422
3.65k
        _Py_DECREF_IMMORTAL_STAT_INC();
423
3.65k
        return;
424
3.65k
    }
425
35.2k
    _Py_DECREF_STAT_INC();
426
35.2k
    if (--op->ob_refcnt == 0) {
427
35.2k
        _Py_Dealloc(op);
428
35.2k
    }
429
35.2k
}
430
11.3G
#define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op))
431
#endif
432
433
434
/* Safely decref `op` and set `op` to NULL, especially useful in tp_clear
435
 * and tp_dealloc implementations.
436
 *
437
 * Note that "the obvious" code can be deadly:
438
 *
439
 *     Py_XDECREF(op);
440
 *     op = NULL;
441
 *
442
 * Typically, `op` is something like self->containee, and `self` is done
443
 * using its `containee` member.  In the code sequence above, suppose
444
 * `containee` is non-NULL with a refcount of 1.  Its refcount falls to
445
 * 0 on the first line, which can trigger an arbitrary amount of code,
446
 * possibly including finalizers (like __del__ methods or weakref callbacks)
447
 * coded in Python, which in turn can release the GIL and allow other threads
448
 * to run, etc.  Such code may even invoke methods of `self` again, or cause
449
 * cyclic gc to trigger, but-- oops! --self->containee still points to the
450
 * object being torn down, and it may be in an insane state while being torn
451
 * down.  This has in fact been a rich historic source of miserable (rare &
452
 * hard-to-diagnose) segfaulting (and other) bugs.
453
 *
454
 * The safe way is:
455
 *
456
 *      Py_CLEAR(op);
457
 *
458
 * That arranges to set `op` to NULL _before_ decref'ing, so that any code
459
 * triggered as a side-effect of `op` getting torn down no longer believes
460
 * `op` points to a valid object.
461
 *
462
 * There are cases where it's safe to use the naive code, but they're brittle.
463
 * For example, if `op` points to a Python integer, you know that destroying
464
 * one of those can't cause problems -- but in part that relies on that
465
 * Python integers aren't currently weakly referencable.  Best practice is
466
 * to use Py_CLEAR() even if you can't think of a reason for why you need to.
467
 *
468
 * gh-98724: Use a temporary variable to only evaluate the macro argument once,
469
 * to avoid the duplication of side effects if the argument has side effects.
470
 *
471
 * gh-99701: If the PyObject* type is used with casting arguments to PyObject*,
472
 * the code can be miscompiled with strict aliasing because of type punning.
473
 * With strict aliasing, a compiler considers that two pointers of different
474
 * types cannot read or write the same memory which enables optimization
475
 * opportunities.
476
 *
477
 * If available, use _Py_TYPEOF() to use the 'op' type for temporary variables,
478
 * and so avoid type punning. Otherwise, use memcpy() which causes type erasure
479
 * and so prevents the compiler to reuse an old cached 'op' value after
480
 * Py_CLEAR().
481
 */
482
#ifdef _Py_TYPEOF
483
#define Py_CLEAR(op) \
484
2.46G
    do { \
485
2.46G
        _Py_TYPEOF(op)* _tmp_op_ptr = &(op); \
486
2.46G
        _Py_TYPEOF(op) _tmp_old_op = (*_tmp_op_ptr); \
487
2.46G
        if (_tmp_old_op != NULL) { \
488
545M
            *_tmp_op_ptr = _Py_NULL; \
489
545M
            Py_DECREF(_tmp_old_op); \
490
545M
        } \
491
2.46G
    } while (0)
492
#else
493
#define Py_CLEAR(op) \
494
    do { \
495
        PyObject **_tmp_op_ptr = _Py_CAST(PyObject**, &(op)); \
496
        PyObject *_tmp_old_op = (*_tmp_op_ptr); \
497
        if (_tmp_old_op != NULL) { \
498
            PyObject *_null_ptr = _Py_NULL; \
499
            memcpy(_tmp_op_ptr, &_null_ptr, sizeof(PyObject*)); \
500
            Py_DECREF(_tmp_old_op); \
501
        } \
502
    } while (0)
503
#endif
504
505
506
/* Function to use in case the object pointer can be NULL: */
507
static inline void Py_XINCREF(PyObject *op)
508
1.48G
{
509
1.48G
    if (op != _Py_NULL) {
510
803M
        Py_INCREF(op);
511
803M
    }
512
1.48G
}
Unexecuted instantiation: bytesobject.c:Py_XINCREF
Unexecuted instantiation: call.c:Py_XINCREF
exceptions.c:Py_XINCREF
Line
Count
Source
508
117M
{
509
117M
    if (op != _Py_NULL) {
510
25.7M
        Py_INCREF(op);
511
25.7M
    }
512
117M
}
Unexecuted instantiation: genericaliasobject.c:Py_XINCREF
Unexecuted instantiation: floatobject.c:Py_XINCREF
listobject.c:Py_XINCREF
Line
Count
Source
508
71.1M
{
509
71.1M
    if (op != _Py_NULL) {
510
71.1M
        Py_INCREF(op);
511
71.1M
    }
512
71.1M
}
Unexecuted instantiation: longobject.c:Py_XINCREF
dictobject.c:Py_XINCREF
Line
Count
Source
508
377M
{
509
377M
    if (op != _Py_NULL) {
510
203M
        Py_INCREF(op);
511
203M
    }
512
377M
}
memoryobject.c:Py_XINCREF
Line
Count
Source
508
162
{
509
162
    if (op != _Py_NULL) {
510
162
        Py_INCREF(op);
511
162
    }
512
162
}
Unexecuted instantiation: moduleobject.c:Py_XINCREF
Unexecuted instantiation: object.c:Py_XINCREF
Unexecuted instantiation: obmalloc.c:Py_XINCREF
Unexecuted instantiation: picklebufobject.c:Py_XINCREF
Unexecuted instantiation: rangeobject.c:Py_XINCREF
sentinelobject.c:Py_XINCREF
Line
Count
Source
508
47
{
509
47
    if (op != _Py_NULL) {
510
0
        Py_INCREF(op);
511
0
    }
512
47
}
Unexecuted instantiation: setobject.c:Py_XINCREF
Unexecuted instantiation: sliceobject.c:Py_XINCREF
Unexecuted instantiation: structseq.c:Py_XINCREF
Unexecuted instantiation: templateobject.c:Py_XINCREF
Unexecuted instantiation: tupleobject.c:Py_XINCREF
typeobject.c:Py_XINCREF
Line
Count
Source
508
566k
{
509
566k
    if (op != _Py_NULL) {
510
280k
        Py_INCREF(op);
511
280k
    }
512
566k
}
typevarobject.c:Py_XINCREF
Line
Count
Source
508
1.20k
{
509
1.20k
    if (op != _Py_NULL) {
510
244
        Py_INCREF(op);
511
244
    }
512
1.20k
}
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
508
1.35M
{
509
1.35M
    if (op != _Py_NULL) {
510
686k
        Py_INCREF(op);
511
686k
    }
512
1.35M
}
Unexecuted instantiation: _warnings.c:Py_XINCREF
bltinmodule.c:Py_XINCREF
Line
Count
Source
508
1.30k
{
509
1.30k
    if (op != _Py_NULL) {
510
1.30k
        Py_INCREF(op);
511
1.30k
    }
512
1.30k
}
ceval.c:Py_XINCREF
Line
Count
Source
508
303M
{
509
303M
    if (op != _Py_NULL) {
510
95.1M
        Py_INCREF(op);
511
95.1M
    }
512
303M
}
Unexecuted instantiation: codecs.c:Py_XINCREF
Unexecuted instantiation: codegen.c:Py_XINCREF
compile.c:Py_XINCREF
Line
Count
Source
508
8.86k
{
509
8.86k
    if (op != _Py_NULL) {
510
3.57k
        Py_INCREF(op);
511
3.57k
    }
512
8.86k
}
context.c:Py_XINCREF
Line
Count
Source
508
276k
{
509
276k
    if (op != _Py_NULL) {
510
0
        Py_INCREF(op);
511
0
    }
512
276k
}
errors.c:Py_XINCREF
Line
Count
Source
508
41.3M
{
509
41.3M
    if (op != _Py_NULL) {
510
41.2M
        Py_INCREF(op);
511
41.2M
    }
512
41.3M
}
Unexecuted instantiation: flowgraph.c:Py_XINCREF
Unexecuted instantiation: frame.c:Py_XINCREF
Unexecuted instantiation: future.c:Py_XINCREF
Unexecuted instantiation: gc.c:Py_XINCREF
Unexecuted instantiation: gc_gil.c:Py_XINCREF
Unexecuted instantiation: getargs.c:Py_XINCREF
Unexecuted instantiation: ceval_gil.c:Py_XINCREF
Unexecuted instantiation: hamt.c:Py_XINCREF
Unexecuted instantiation: hashtable.c:Py_XINCREF
import.c:Py_XINCREF
Line
Count
Source
508
33.8k
{
509
33.8k
    if (op != _Py_NULL) {
510
27.7k
        Py_INCREF(op);
511
27.7k
    }
512
33.8k
}
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
508
1.06M
{
509
1.06M
    if (op != _Py_NULL) {
510
1.06M
        Py_INCREF(op);
511
1.06M
    }
512
1.06M
}
Unexecuted instantiation: pythonrun.c:Py_XINCREF
Unexecuted instantiation: pytime.c:Py_XINCREF
Unexecuted instantiation: qsbr.c:Py_XINCREF
Unexecuted instantiation: bootstrap_hash.c:Py_XINCREF
Unexecuted instantiation: specialize.c:Py_XINCREF
Unexecuted instantiation: slots.c:Py_XINCREF
Unexecuted instantiation: slots_generated.c:Py_XINCREF
structmember.c:Py_XINCREF
Line
Count
Source
508
6.44M
{
509
6.44M
    if (op != _Py_NULL) {
510
5.95M
        Py_INCREF(op);
511
5.95M
    }
512
6.44M
}
Unexecuted instantiation: symtable.c:Py_XINCREF
sysmodule.c:Py_XINCREF
Line
Count
Source
508
273
{
509
273
    if (op != _Py_NULL) {
510
273
        Py_INCREF(op);
511
273
    }
512
273
}
Unexecuted instantiation: thread.c:Py_XINCREF
traceback.c:Py_XINCREF
Line
Count
Source
508
128M
{
509
128M
    if (op != _Py_NULL) {
510
88.3M
        Py_INCREF(op);
511
88.3M
    }
512
128M
}
Unexecuted instantiation: tracemalloc.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
Unexecuted instantiation: suggestions.c:Py_XINCREF
Unexecuted instantiation: perf_trampoline.c:Py_XINCREF
Unexecuted instantiation: perf_jit_trampoline.c:Py_XINCREF
Unexecuted instantiation: jit_unwind.c:Py_XINCREF
Unexecuted instantiation: remote_debugging.c:Py_XINCREF
Unexecuted instantiation: dynload_shlib.c:Py_XINCREF
Unexecuted instantiation: config.c:Py_XINCREF
Unexecuted instantiation: gcmodule.c:Py_XINCREF
Unexecuted instantiation: _asynciomodule.c:Py_XINCREF
Unexecuted instantiation: atexitmodule.c:Py_XINCREF
Unexecuted instantiation: faulthandler.c:Py_XINCREF
posixmodule.c:Py_XINCREF
Line
Count
Source
508
92.1k
{
509
92.1k
    if (op != _Py_NULL) {
510
92.1k
        Py_INCREF(op);
511
92.1k
    }
512
92.1k
}
Unexecuted instantiation: signalmodule.c:Py_XINCREF
Unexecuted instantiation: _tracemalloc.c:Py_XINCREF
Unexecuted instantiation: _suggestions.c:Py_XINCREF
_datetimemodule.c:Py_XINCREF
Line
Count
Source
508
78
{
509
78
    if (op != _Py_NULL) {
510
0
        Py_INCREF(op);
511
0
    }
512
78
}
Unexecuted instantiation: _codecsmodule.c:Py_XINCREF
_collectionsmodule.c:Py_XINCREF
Line
Count
Source
508
21.6k
{
509
21.6k
    if (op != _Py_NULL) {
510
21.6k
        Py_INCREF(op);
511
21.6k
    }
512
21.6k
}
Unexecuted instantiation: errnomodule.c:Py_XINCREF
Unexecuted instantiation: _iomodule.c:Py_XINCREF
Unexecuted instantiation: iobase.c:Py_XINCREF
Unexecuted instantiation: fileio.c:Py_XINCREF
Unexecuted instantiation: bytesio.c:Py_XINCREF
bufferedio.c:Py_XINCREF
Line
Count
Source
508
6.54k
{
509
6.54k
    if (op != _Py_NULL) {
510
6.54k
        Py_INCREF(op);
511
6.54k
    }
512
6.54k
}
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
508
152
{
509
152
    if (op != _Py_NULL) {
510
76
        Py_INCREF(op);
511
76
    }
512
152
}
Unexecuted instantiation: timemodule.c:Py_XINCREF
Unexecuted instantiation: _typesmodule.c:Py_XINCREF
Unexecuted instantiation: _typingmodule.c:Py_XINCREF
Unexecuted instantiation: _weakref.c:Py_XINCREF
_abc.c:Py_XINCREF
Line
Count
Source
508
30.7k
{
509
30.7k
    if (op != _Py_NULL) {
510
30.7k
        Py_INCREF(op);
511
30.7k
    }
512
30.7k
}
_functoolsmodule.c:Py_XINCREF
Line
Count
Source
508
40
{
509
40
    if (op != _Py_NULL) {
510
0
        Py_INCREF(op);
511
0
    }
512
40
}
Unexecuted instantiation: _localemodule.c:Py_XINCREF
Unexecuted instantiation: _opcode.c:Py_XINCREF
Unexecuted instantiation: _operator.c:Py_XINCREF
Unexecuted instantiation: _stat.c:Py_XINCREF
Unexecuted instantiation: symtablemodule.c:Py_XINCREF
Unexecuted instantiation: pwdmodule.c:Py_XINCREF
getpath.c:Py_XINCREF
Line
Count
Source
508
222
{
509
222
    if (op != _Py_NULL) {
510
222
        Py_INCREF(op);
511
222
    }
512
222
}
Unexecuted instantiation: frozen.c:Py_XINCREF
Unexecuted instantiation: getbuildinfo.c:Py_XINCREF
Unexecuted instantiation: peg_api.c:Py_XINCREF
Unexecuted instantiation: file_tokenizer.c:Py_XINCREF
Unexecuted instantiation: helpers.c:Py_XINCREF
Unexecuted instantiation: myreadline.c:Py_XINCREF
abstract.c:Py_XINCREF
Line
Count
Source
508
102M
{
509
102M
    if (op != _Py_NULL) {
510
100M
        Py_INCREF(op);
511
100M
    }
512
102M
}
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
508
21.2M
{
509
21.2M
    if (op != _Py_NULL) {
510
5.04M
        Py_INCREF(op);
511
5.04M
    }
512
21.2M
}
Unexecuted instantiation: classobject.c:Py_XINCREF
codeobject.c:Py_XINCREF
Line
Count
Source
508
4.52k
{
509
4.52k
    if (op != _Py_NULL) {
510
4.52k
        Py_INCREF(op);
511
4.52k
    }
512
4.52k
}
Unexecuted instantiation: complexobject.c:Py_XINCREF
descrobject.c:Py_XINCREF
Line
Count
Source
508
113k
{
509
113k
    if (op != _Py_NULL) {
510
107k
        Py_INCREF(op);
511
107k
    }
512
113k
}
Unexecuted instantiation: enumobject.c:Py_XINCREF
genobject.c:Py_XINCREF
Line
Count
Source
508
85.6k
{
509
85.6k
    if (op != _Py_NULL) {
510
0
        Py_INCREF(op);
511
0
    }
512
85.6k
}
Unexecuted instantiation: fileobject.c:Py_XINCREF
frameobject.c:Py_XINCREF
Line
Count
Source
508
19.6M
{
509
19.6M
    if (op != _Py_NULL) {
510
19.6M
        Py_INCREF(op);
511
19.6M
    }
512
19.6M
}
funcobject.c:Py_XINCREF
Line
Count
Source
508
60.7k
{
509
60.7k
    if (op != _Py_NULL) {
510
37.2k
        Py_INCREF(op);
511
37.2k
    }
512
60.7k
}
Unexecuted instantiation: interpolationobject.c:Py_XINCREF
Unexecuted instantiation: iterobject.c:Py_XINCREF
lazyimportobject.c:Py_XINCREF
Line
Count
Source
508
878
{
509
878
    if (op != _Py_NULL) {
510
659
        Py_INCREF(op);
511
659
    }
512
878
}
Unexecuted instantiation: odictobject.c:Py_XINCREF
methodobject.c:Py_XINCREF
Line
Count
Source
508
289M
{
509
289M
    if (op != _Py_NULL) {
510
144M
        Py_INCREF(op);
511
144M
    }
512
289M
}
Unexecuted instantiation: namespaceobject.c:Py_XINCREF
Unexecuted instantiation: _contextvars.c:Py_XINCREF
Unexecuted instantiation: Python-ast.c:Py_XINCREF
Unexecuted instantiation: Python-tokenize.c:Py_XINCREF
Unexecuted instantiation: asdl.c:Py_XINCREF
Unexecuted instantiation: assemble.c:Py_XINCREF
Unexecuted instantiation: ast.c:Py_XINCREF
Unexecuted instantiation: ast_preprocess.c:Py_XINCREF
Unexecuted instantiation: ast_unparse.c:Py_XINCREF
Unexecuted instantiation: critical_section.c:Py_XINCREF
Unexecuted instantiation: crossinterp.c:Py_XINCREF
Unexecuted instantiation: getcopyright.c:Py_XINCREF
Unexecuted instantiation: getplatform.c:Py_XINCREF
Unexecuted instantiation: getversion.c:Py_XINCREF
Unexecuted instantiation: optimizer.c:Py_XINCREF
Unexecuted instantiation: pathconfig.c:Py_XINCREF
pegen.c:Py_XINCREF
Line
Count
Source
508
97.4k
{
509
97.4k
    if (op != _Py_NULL) {
510
766
        Py_INCREF(op);
511
766
    }
512
97.4k
}
Unexecuted instantiation: pegen_errors.c:Py_XINCREF
Unexecuted instantiation: parser.c:Py_XINCREF
Unexecuted instantiation: buffer.c:Py_XINCREF
Unexecuted instantiation: lexer.c:Py_XINCREF
Unexecuted instantiation: state.c:Py_XINCREF
Unexecuted instantiation: readline_tokenizer.c:Py_XINCREF
Unexecuted instantiation: string_tokenizer.c:Py_XINCREF
Unexecuted instantiation: utf8_tokenizer.c:Py_XINCREF
Unexecuted instantiation: getcompiler.c:Py_XINCREF
Unexecuted instantiation: mystrtoul.c:Py_XINCREF
Unexecuted instantiation: token.c:Py_XINCREF
Unexecuted instantiation: action_helpers.c:Py_XINCREF
Unexecuted instantiation: string_parser.c:Py_XINCREF
513
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
514
1.48G
#  define Py_XINCREF(op) Py_XINCREF(_PyObject_CAST(op))
515
#endif
516
517
static inline void Py_XDECREF(PyObject *op)
518
6.46G
{
519
6.46G
    if (op != _Py_NULL) {
520
5.51G
        Py_DECREF(op);
521
5.51G
    }
522
6.46G
}
bytesobject.c:Py_XDECREF
Line
Count
Source
518
27.5M
{
519
27.5M
    if (op != _Py_NULL) {
520
112k
        Py_DECREF(op);
521
112k
    }
522
27.5M
}
Unexecuted instantiation: call.c:Py_XDECREF
exceptions.c:Py_XDECREF
Line
Count
Source
518
123M
{
519
123M
    if (op != _Py_NULL) {
520
61.8M
        Py_DECREF(op);
521
61.8M
    }
522
123M
}
genericaliasobject.c:Py_XDECREF
Line
Count
Source
518
556
{
519
556
    if (op != _Py_NULL) {
520
296
        Py_DECREF(op);
521
296
    }
522
556
}
floatobject.c:Py_XDECREF
Line
Count
Source
518
1.21M
{
519
1.21M
    if (op != _Py_NULL) {
520
502k
        Py_DECREF(op);
521
502k
    }
522
1.21M
}
listobject.c:Py_XDECREF
Line
Count
Source
518
1.65G
{
519
1.65G
    if (op != _Py_NULL) {
520
1.62G
        Py_DECREF(op);
521
1.62G
    }
522
1.65G
}
longobject.c:Py_XDECREF
Line
Count
Source
518
27.0M
{
519
27.0M
    if (op != _Py_NULL) {
520
12.3M
        Py_DECREF(op);
521
12.3M
    }
522
27.0M
}
dictobject.c:Py_XDECREF
Line
Count
Source
518
317M
{
519
317M
    if (op != _Py_NULL) {
520
309M
        Py_DECREF(op);
521
309M
    }
522
317M
}
Unexecuted instantiation: memoryobject.c:Py_XDECREF
moduleobject.c:Py_XDECREF
Line
Count
Source
518
19.6k
{
519
19.6k
    if (op != _Py_NULL) {
520
10.2k
        Py_DECREF(op);
521
10.2k
    }
522
19.6k
}
object.c:Py_XDECREF
Line
Count
Source
518
11.1M
{
519
11.1M
    if (op != _Py_NULL) {
520
50.4k
        Py_DECREF(op);
521
50.4k
    }
522
11.1M
}
Unexecuted instantiation: obmalloc.c:Py_XDECREF
Unexecuted instantiation: picklebufobject.c:Py_XDECREF
rangeobject.c:Py_XDECREF
Line
Count
Source
518
111
{
519
111
    if (op != _Py_NULL) {
520
111
        Py_DECREF(op);
521
111
    }
522
111
}
Unexecuted instantiation: sentinelobject.c:Py_XDECREF
setobject.c:Py_XDECREF
Line
Count
Source
518
95.0k
{
519
95.0k
    if (op != _Py_NULL) {
520
250
        Py_DECREF(op);
521
250
    }
522
95.0k
}
Unexecuted instantiation: sliceobject.c:Py_XDECREF
structseq.c:Py_XDECREF
Line
Count
Source
518
5.08M
{
519
5.08M
    if (op != _Py_NULL) {
520
5.08M
        Py_DECREF(op);
521
5.08M
    }
522
5.08M
}
Unexecuted instantiation: templateobject.c:Py_XDECREF
tupleobject.c:Py_XDECREF
Line
Count
Source
518
2.85G
{
519
2.85G
    if (op != _Py_NULL) {
520
2.84G
        Py_DECREF(op);
521
2.84G
    }
522
2.85G
}
typeobject.c:Py_XDECREF
Line
Count
Source
518
35.0M
{
519
35.0M
    if (op != _Py_NULL) {
520
15.1M
        Py_DECREF(op);
521
15.1M
    }
522
35.0M
}
typevarobject.c:Py_XDECREF
Line
Count
Source
518
604
{
519
604
    if (op != _Py_NULL) {
520
432
        Py_DECREF(op);
521
432
    }
522
604
}
unicode_format.c:Py_XDECREF
Line
Count
Source
518
23.1M
{
519
23.1M
    if (op != _Py_NULL) {
520
50.5k
        Py_DECREF(op);
521
50.5k
    }
522
23.1M
}
unicode_formatter.c:Py_XDECREF
Line
Count
Source
518
18.3M
{
519
18.3M
    if (op != _Py_NULL) {
520
14.6M
        Py_DECREF(op);
521
14.6M
    }
522
18.3M
}
Unexecuted instantiation: unicode_writer.c:Py_XDECREF
Unexecuted instantiation: unicodectype.c:Py_XDECREF
unicodeobject.c:Py_XDECREF
Line
Count
Source
518
105M
{
519
105M
    if (op != _Py_NULL) {
520
47.7M
        Py_DECREF(op);
521
47.7M
    }
522
105M
}
unionobject.c:Py_XDECREF
Line
Count
Source
518
2.13k
{
519
2.13k
    if (op != _Py_NULL) {
520
336
        Py_DECREF(op);
521
336
    }
522
2.13k
}
weakrefobject.c:Py_XDECREF
Line
Count
Source
518
1.36M
{
519
1.36M
    if (op != _Py_NULL) {
520
653k
        Py_DECREF(op);
521
653k
    }
522
1.36M
}
_warnings.c:Py_XDECREF
Line
Count
Source
518
6.45M
{
519
6.45M
    if (op != _Py_NULL) {
520
5.65M
        Py_DECREF(op);
521
5.65M
    }
522
6.45M
}
bltinmodule.c:Py_XDECREF
Line
Count
Source
518
16.7M
{
519
16.7M
    if (op != _Py_NULL) {
520
483k
        Py_DECREF(op);
521
483k
    }
522
16.7M
}
ceval.c:Py_XDECREF
Line
Count
Source
518
5.66M
{
519
5.66M
    if (op != _Py_NULL) {
520
120k
        Py_DECREF(op);
521
120k
    }
522
5.66M
}
codecs.c:Py_XDECREF
Line
Count
Source
518
238k
{
519
238k
    if (op != _Py_NULL) {
520
159k
        Py_DECREF(op);
521
159k
    }
522
238k
}
Unexecuted instantiation: codegen.c:Py_XDECREF
compile.c:Py_XDECREF
Line
Count
Source
518
21.1k
{
519
21.1k
    if (op != _Py_NULL) {
520
8.55k
        Py_DECREF(op);
521
8.55k
    }
522
21.1k
}
Unexecuted instantiation: context.c:Py_XDECREF
errors.c:Py_XDECREF
Line
Count
Source
518
279M
{
519
279M
    if (op != _Py_NULL) {
520
32.1M
        Py_DECREF(op);
521
32.1M
    }
522
279M
}
Unexecuted instantiation: flowgraph.c:Py_XDECREF
Unexecuted instantiation: frame.c:Py_XDECREF
Unexecuted instantiation: future.c:Py_XDECREF
gc.c:Py_XDECREF
Line
Count
Source
518
185k
{
519
185k
    if (op != _Py_NULL) {
520
5.80k
        Py_DECREF(op);
521
5.80k
    }
522
185k
}
Unexecuted instantiation: gc_gil.c:Py_XDECREF
Unexecuted instantiation: getargs.c:Py_XDECREF
Unexecuted instantiation: ceval_gil.c:Py_XDECREF
Unexecuted instantiation: hamt.c:Py_XDECREF
Unexecuted instantiation: hashtable.c:Py_XDECREF
import.c:Py_XDECREF
Line
Count
Source
518
9.10M
{
519
9.10M
    if (op != _Py_NULL) {
520
9.07M
        Py_DECREF(op);
521
9.07M
    }
522
9.10M
}
Unexecuted instantiation: importdl.c:Py_XDECREF
Unexecuted instantiation: initconfig.c:Py_XDECREF
Unexecuted instantiation: instrumentation.c:Py_XDECREF
instruction_sequence.c:Py_XDECREF
Line
Count
Source
518
10.7k
{
519
10.7k
    if (op != _Py_NULL) {
520
0
        Py_DECREF(op);
521
0
    }
522
10.7k
}
intrinsics.c:Py_XDECREF
Line
Count
Source
518
34.7k
{
519
34.7k
    if (op != _Py_NULL) {
520
34.7k
        Py_DECREF(op);
521
34.7k
    }
522
34.7k
}
Unexecuted instantiation: legacy_tracing.c:Py_XDECREF
Unexecuted instantiation: lock.c:Py_XDECREF
marshal.c:Py_XDECREF
Line
Count
Source
518
1.79M
{
519
1.79M
    if (op != _Py_NULL) {
520
1.79M
        Py_DECREF(op);
521
1.79M
    }
522
1.79M
}
modsupport.c:Py_XDECREF
Line
Count
Source
518
16.2k
{
519
16.2k
    if (op != _Py_NULL) {
520
16.2k
        Py_DECREF(op);
521
16.2k
    }
522
16.2k
}
Unexecuted instantiation: mysnprintf.c:Py_XDECREF
Unexecuted instantiation: parking_lot.c:Py_XDECREF
Unexecuted instantiation: preconfig.c:Py_XDECREF
Unexecuted instantiation: pyarena.c:Py_XDECREF
Unexecuted instantiation: pyctype.c:Py_XDECREF
Unexecuted instantiation: pyhash.c:Py_XDECREF
pylifecycle.c:Py_XDECREF
Line
Count
Source
518
222
{
519
222
    if (op != _Py_NULL) {
520
222
        Py_DECREF(op);
521
222
    }
522
222
}
Unexecuted instantiation: pymath.c:Py_XDECREF
Unexecuted instantiation: pystate.c:Py_XDECREF
pythonrun.c:Py_XDECREF
Line
Count
Source
518
1.77k
{
519
1.77k
    if (op != _Py_NULL) {
520
1.18k
        Py_DECREF(op);
521
1.18k
    }
522
1.77k
}
Unexecuted instantiation: pytime.c:Py_XDECREF
Unexecuted instantiation: qsbr.c:Py_XDECREF
Unexecuted instantiation: bootstrap_hash.c:Py_XDECREF
specialize.c:Py_XDECREF
Line
Count
Source
518
4.13M
{
519
4.13M
    if (op != _Py_NULL) {
520
2.21M
        Py_DECREF(op);
521
2.21M
    }
522
4.13M
}
Unexecuted instantiation: slots.c:Py_XDECREF
Unexecuted instantiation: slots_generated.c:Py_XDECREF
structmember.c:Py_XDECREF
Line
Count
Source
518
5.79M
{
519
5.79M
    if (op != _Py_NULL) {
520
17.7k
        Py_DECREF(op);
521
17.7k
    }
522
5.79M
}
symtable.c:Py_XDECREF
Line
Count
Source
518
137k
{
519
137k
    if (op != _Py_NULL) {
520
102k
        Py_DECREF(op);
521
102k
    }
522
137k
}
sysmodule.c:Py_XDECREF
Line
Count
Source
518
1.81M
{
519
1.81M
    if (op != _Py_NULL) {
520
1.36M
        Py_DECREF(op);
521
1.36M
    }
522
1.81M
}
Unexecuted instantiation: thread.c:Py_XDECREF
traceback.c:Py_XDECREF
Line
Count
Source
518
256M
{
519
256M
    if (op != _Py_NULL) {
520
176M
        Py_DECREF(op);
521
176M
    }
522
256M
}
Unexecuted instantiation: tracemalloc.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
Unexecuted instantiation: atexitmodule.c:Py_XDECREF
Unexecuted instantiation: faulthandler.c:Py_XDECREF
posixmodule.c:Py_XDECREF
Line
Count
Source
518
882k
{
519
882k
    if (op != _Py_NULL) {
520
748k
        Py_DECREF(op);
521
748k
    }
522
882k
}
signalmodule.c:Py_XDECREF
Line
Count
Source
518
2.36k
{
519
2.36k
    if (op != _Py_NULL) {
520
0
        Py_DECREF(op);
521
0
    }
522
2.36k
}
Unexecuted instantiation: _tracemalloc.c:Py_XDECREF
Unexecuted instantiation: _suggestions.c:Py_XDECREF
_datetimemodule.c:Py_XDECREF
Line
Count
Source
518
25.7k
{
519
25.7k
    if (op != _Py_NULL) {
520
24.8k
        Py_DECREF(op);
521
24.8k
    }
522
25.7k
}
Unexecuted instantiation: _codecsmodule.c:Py_XDECREF
_collectionsmodule.c:Py_XDECREF
Line
Count
Source
518
21.6k
{
519
21.6k
    if (op != _Py_NULL) {
520
0
        Py_DECREF(op);
521
0
    }
522
21.6k
}
Unexecuted instantiation: errnomodule.c:Py_XDECREF
_iomodule.c:Py_XDECREF
Line
Count
Source
518
22
{
519
22
    if (op != _Py_NULL) {
520
11
        Py_DECREF(op);
521
11
    }
522
22
}
Unexecuted instantiation: iobase.c:Py_XDECREF
Unexecuted instantiation: fileio.c:Py_XDECREF
bytesio.c:Py_XDECREF
Line
Count
Source
518
46.8k
{
519
46.8k
    if (op != _Py_NULL) {
520
46.8k
        Py_DECREF(op);
521
46.8k
    }
522
46.8k
}
bufferedio.c:Py_XDECREF
Line
Count
Source
518
52.5k
{
519
52.5k
    if (op != _Py_NULL) {
520
6.56k
        Py_DECREF(op);
521
6.56k
    }
522
52.5k
}
textio.c:Py_XDECREF
Line
Count
Source
518
32.6k
{
519
32.6k
    if (op != _Py_NULL) {
520
211
        Py_DECREF(op);
521
211
    }
522
32.6k
}
Unexecuted instantiation: stringio.c:Py_XDECREF
itertoolsmodule.c:Py_XDECREF
Line
Count
Source
518
33.7k
{
519
33.7k
    if (op != _Py_NULL) {
520
5.37k
        Py_DECREF(op);
521
5.37k
    }
522
33.7k
}
sre.c:Py_XDECREF
Line
Count
Source
518
81.9M
{
519
81.9M
    if (op != _Py_NULL) {
520
81.9M
        Py_DECREF(op);
521
81.9M
    }
522
81.9M
}
Unexecuted instantiation: _sysconfig.c:Py_XDECREF
Unexecuted instantiation: _threadmodule.c:Py_XDECREF
Unexecuted instantiation: timemodule.c:Py_XDECREF
Unexecuted instantiation: _typesmodule.c:Py_XDECREF
Unexecuted instantiation: _typingmodule.c:Py_XDECREF
Unexecuted instantiation: _weakref.c:Py_XDECREF
_abc.c:Py_XDECREF
Line
Count
Source
518
200k
{
519
200k
    if (op != _Py_NULL) {
520
168k
        Py_DECREF(op);
521
168k
    }
522
200k
}
_functoolsmodule.c:Py_XDECREF
Line
Count
Source
518
7.63k
{
519
7.63k
    if (op != _Py_NULL) {
520
0
        Py_DECREF(op);
521
0
    }
522
7.63k
}
Unexecuted instantiation: _localemodule.c:Py_XDECREF
Unexecuted instantiation: _opcode.c:Py_XDECREF
Unexecuted instantiation: _operator.c:Py_XDECREF
Unexecuted instantiation: _stat.c:Py_XDECREF
Unexecuted instantiation: symtablemodule.c:Py_XDECREF
Unexecuted instantiation: pwdmodule.c:Py_XDECREF
Unexecuted instantiation: getpath.c:Py_XDECREF
Unexecuted instantiation: frozen.c:Py_XDECREF
Unexecuted instantiation: getbuildinfo.c:Py_XDECREF
Unexecuted instantiation: peg_api.c:Py_XDECREF
Unexecuted instantiation: file_tokenizer.c:Py_XDECREF
helpers.c:Py_XDECREF
Line
Count
Source
518
2.99k
{
519
2.99k
    if (op != _Py_NULL) {
520
2.99k
        Py_DECREF(op);
521
2.99k
    }
522
2.99k
}
Unexecuted instantiation: myreadline.c:Py_XDECREF
abstract.c:Py_XDECREF
Line
Count
Source
518
4.08M
{
519
4.08M
    if (op != _Py_NULL) {
520
260k
        Py_DECREF(op);
521
260k
    }
522
4.08M
}
Unexecuted instantiation: boolobject.c:Py_XDECREF
Unexecuted instantiation: bytes_methods.c:Py_XDECREF
bytearrayobject.c:Py_XDECREF
Line
Count
Source
518
21.7M
{
519
21.7M
    if (op != _Py_NULL) {
520
21.7M
        Py_DECREF(op);
521
21.7M
    }
522
21.7M
}
capsule.c:Py_XDECREF
Line
Count
Source
518
14
{
519
14
    if (op != _Py_NULL) {
520
14
        Py_DECREF(op);
521
14
    }
522
14
}
cellobject.c:Py_XDECREF
Line
Count
Source
518
21.2M
{
519
21.2M
    if (op != _Py_NULL) {
520
7.59M
        Py_DECREF(op);
521
7.59M
    }
522
21.2M
}
classobject.c:Py_XDECREF
Line
Count
Source
518
43.9M
{
519
43.9M
    if (op != _Py_NULL) {
520
43.9M
        Py_DECREF(op);
521
43.9M
    }
522
43.9M
}
codeobject.c:Py_XDECREF
Line
Count
Source
518
1.14M
{
519
1.14M
    if (op != _Py_NULL) {
520
948k
        Py_DECREF(op);
521
948k
    }
522
1.14M
}
Unexecuted instantiation: complexobject.c:Py_XDECREF
descrobject.c:Py_XDECREF
Line
Count
Source
518
30.0M
{
519
30.0M
    if (op != _Py_NULL) {
520
20.8M
        Py_DECREF(op);
521
20.8M
    }
522
30.0M
}
enumobject.c:Py_XDECREF
Line
Count
Source
518
25.2M
{
519
25.2M
    if (op != _Py_NULL) {
520
16.8M
        Py_DECREF(op);
521
16.8M
    }
522
25.2M
}
genobject.c:Py_XDECREF
Line
Count
Source
518
42.8k
{
519
42.8k
    if (op != _Py_NULL) {
520
0
        Py_DECREF(op);
521
0
    }
522
42.8k
}
Unexecuted instantiation: fileobject.c:Py_XDECREF
Unexecuted instantiation: frameobject.c:Py_XDECREF
funcobject.c:Py_XDECREF
Line
Count
Source
518
69.4k
{
519
69.4k
    if (op != _Py_NULL) {
520
33.7k
        Py_DECREF(op);
521
33.7k
    }
522
69.4k
}
Unexecuted instantiation: interpolationobject.c:Py_XDECREF
iterobject.c:Py_XDECREF
Line
Count
Source
518
3.46M
{
519
3.46M
    if (op != _Py_NULL) {
520
358k
        Py_DECREF(op);
521
358k
    }
522
3.46M
}
Unexecuted instantiation: lazyimportobject.c:Py_XDECREF
odictobject.c:Py_XDECREF
Line
Count
Source
518
282k
{
519
282k
    if (op != _Py_NULL) {
520
82.9k
        Py_DECREF(op);
521
82.9k
    }
522
282k
}
methodobject.c:Py_XDECREF
Line
Count
Source
518
434M
{
519
434M
    if (op != _Py_NULL) {
520
154M
        Py_DECREF(op);
521
154M
    }
522
434M
}
Unexecuted instantiation: namespaceobject.c:Py_XDECREF
Unexecuted instantiation: _contextvars.c:Py_XDECREF
Python-ast.c:Py_XDECREF
Line
Count
Source
518
750
{
519
750
    if (op != _Py_NULL) {
520
500
        Py_DECREF(op);
521
500
    }
522
750
}
Python-tokenize.c:Py_XDECREF
Line
Count
Source
518
340
{
519
340
    if (op != _Py_NULL) {
520
320
        Py_DECREF(op);
521
320
    }
522
340
}
Unexecuted instantiation: asdl.c:Py_XDECREF
assemble.c:Py_XDECREF
Line
Count
Source
518
37.6k
{
519
37.6k
    if (op != _Py_NULL) {
520
37.6k
        Py_DECREF(op);
521
37.6k
    }
522
37.6k
}
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
518
187k
{
519
187k
    if (op != _Py_NULL) {
520
1.49k
        Py_DECREF(op);
521
1.49k
    }
522
187k
}
pegen_errors.c:Py_XDECREF
Line
Count
Source
518
10.8k
{
519
10.8k
    if (op != _Py_NULL) {
520
9.37k
        Py_DECREF(op);
521
9.37k
    }
522
10.8k
}
Unexecuted instantiation: parser.c:Py_XDECREF
Unexecuted instantiation: buffer.c:Py_XDECREF
Unexecuted instantiation: lexer.c:Py_XDECREF
state.c:Py_XDECREF
Line
Count
Source
518
587k
{
519
587k
    if (op != _Py_NULL) {
520
98.3k
        Py_DECREF(op);
521
98.3k
    }
522
587k
}
Unexecuted instantiation: readline_tokenizer.c:Py_XDECREF
Unexecuted instantiation: string_tokenizer.c:Py_XDECREF
Unexecuted instantiation: utf8_tokenizer.c:Py_XDECREF
Unexecuted instantiation: getcompiler.c:Py_XDECREF
Unexecuted instantiation: mystrtoul.c:Py_XDECREF
Unexecuted instantiation: token.c:Py_XDECREF
Unexecuted instantiation: action_helpers.c:Py_XDECREF
string_parser.c:Py_XDECREF
Line
Count
Source
518
29.6k
{
519
29.6k
    if (op != _Py_NULL) {
520
29.6k
        Py_DECREF(op);
521
29.6k
    }
522
29.6k
}
523
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
524
6.46G
#  define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op))
525
#endif
526
527
// Create a new strong reference to an object:
528
// increment the reference count of the object and return the object.
529
PyAPI_FUNC(PyObject*) Py_NewRef(PyObject *obj);
530
531
// Similar to Py_NewRef(), but the object can be NULL.
532
PyAPI_FUNC(PyObject*) Py_XNewRef(PyObject *obj);
533
534
static inline PyObject* _Py_NewRef(PyObject *obj)
535
7.01G
{
536
7.01G
    Py_INCREF(obj);
537
7.01G
    return obj;
538
7.01G
}
bytesobject.c:_Py_NewRef
Line
Count
Source
535
1.14M
{
536
1.14M
    Py_INCREF(obj);
537
1.14M
    return obj;
538
1.14M
}
call.c:_Py_NewRef
Line
Count
Source
535
32.1M
{
536
32.1M
    Py_INCREF(obj);
537
32.1M
    return obj;
538
32.1M
}
exceptions.c:_Py_NewRef
Line
Count
Source
535
158M
{
536
158M
    Py_INCREF(obj);
537
158M
    return obj;
538
158M
}
genericaliasobject.c:_Py_NewRef
Line
Count
Source
535
1.99k
{
536
1.99k
    Py_INCREF(obj);
537
1.99k
    return obj;
538
1.99k
}
Unexecuted instantiation: floatobject.c:_Py_NewRef
listobject.c:_Py_NewRef
Line
Count
Source
535
1.34G
{
536
1.34G
    Py_INCREF(obj);
537
1.34G
    return obj;
538
1.34G
}
longobject.c:_Py_NewRef
Line
Count
Source
535
17.8M
{
536
17.8M
    Py_INCREF(obj);
537
17.8M
    return obj;
538
17.8M
}
dictobject.c:_Py_NewRef
Line
Count
Source
535
589M
{
536
589M
    Py_INCREF(obj);
537
589M
    return obj;
538
589M
}
memoryobject.c:_Py_NewRef
Line
Count
Source
535
3.24M
{
536
3.24M
    Py_INCREF(obj);
537
3.24M
    return obj;
538
3.24M
}
moduleobject.c:_Py_NewRef
Line
Count
Source
535
8.39k
{
536
8.39k
    Py_INCREF(obj);
537
8.39k
    return obj;
538
8.39k
}
object.c:_Py_NewRef
Line
Count
Source
535
82.2M
{
536
82.2M
    Py_INCREF(obj);
537
82.2M
    return obj;
538
82.2M
}
Unexecuted instantiation: obmalloc.c:_Py_NewRef
Unexecuted instantiation: picklebufobject.c:_Py_NewRef
rangeobject.c:_Py_NewRef
Line
Count
Source
535
111
{
536
111
    Py_INCREF(obj);
537
111
    return obj;
538
111
}
sentinelobject.c:_Py_NewRef
Line
Count
Source
535
141
{
536
141
    Py_INCREF(obj);
537
141
    return obj;
538
141
}
setobject.c:_Py_NewRef
Line
Count
Source
535
9.08M
{
536
9.08M
    Py_INCREF(obj);
537
9.08M
    return obj;
538
9.08M
}
sliceobject.c:_Py_NewRef
Line
Count
Source
535
174M
{
536
174M
    Py_INCREF(obj);
537
174M
    return obj;
538
174M
}
structseq.c:_Py_NewRef
Line
Count
Source
535
135k
{
536
135k
    Py_INCREF(obj);
537
135k
    return obj;
538
135k
}
templateobject.c:_Py_NewRef
Line
Count
Source
535
22
{
536
22
    Py_INCREF(obj);
537
22
    return obj;
538
22
}
tupleobject.c:_Py_NewRef
Line
Count
Source
535
2.50G
{
536
2.50G
    Py_INCREF(obj);
537
2.50G
    return obj;
538
2.50G
}
typeobject.c:_Py_NewRef
Line
Count
Source
535
158M
{
536
158M
    Py_INCREF(obj);
537
158M
    return obj;
538
158M
}
typevarobject.c:_Py_NewRef
Line
Count
Source
535
1.95k
{
536
1.95k
    Py_INCREF(obj);
537
1.95k
    return obj;
538
1.95k
}
unicode_format.c:_Py_NewRef
Line
Count
Source
535
17.1M
{
536
17.1M
    Py_INCREF(obj);
537
17.1M
    return obj;
538
17.1M
}
Unexecuted instantiation: unicode_formatter.c:_Py_NewRef
unicode_writer.c:_Py_NewRef
Line
Count
Source
535
6.37k
{
536
6.37k
    Py_INCREF(obj);
537
6.37k
    return obj;
538
6.37k
}
Unexecuted instantiation: unicodectype.c:_Py_NewRef
unicodeobject.c:_Py_NewRef
Line
Count
Source
535
127M
{
536
127M
    Py_INCREF(obj);
537
127M
    return obj;
538
127M
}
unionobject.c:_Py_NewRef
Line
Count
Source
535
920
{
536
920
    Py_INCREF(obj);
537
920
    return obj;
538
920
}
Unexecuted instantiation: weakrefobject.c:_Py_NewRef
_warnings.c:_Py_NewRef
Line
Count
Source
535
2.40M
{
536
2.40M
    Py_INCREF(obj);
537
2.40M
    return obj;
538
2.40M
}
bltinmodule.c:_Py_NewRef
Line
Count
Source
535
36.5M
{
536
36.5M
    Py_INCREF(obj);
537
36.5M
    return obj;
538
36.5M
}
ceval.c:_Py_NewRef
Line
Count
Source
535
770M
{
536
770M
    Py_INCREF(obj);
537
770M
    return obj;
538
770M
}
codecs.c:_Py_NewRef
Line
Count
Source
535
5.95M
{
536
5.95M
    Py_INCREF(obj);
537
5.95M
    return obj;
538
5.95M
}
codegen.c:_Py_NewRef
Line
Count
Source
535
2.41k
{
536
2.41k
    Py_INCREF(obj);
537
2.41k
    return obj;
538
2.41k
}
compile.c:_Py_NewRef
Line
Count
Source
535
73.0k
{
536
73.0k
    Py_INCREF(obj);
537
73.0k
    return obj;
538
73.0k
}
context.c:_Py_NewRef
Line
Count
Source
535
66
{
536
66
    Py_INCREF(obj);
537
66
    return obj;
538
66
}
errors.c:_Py_NewRef
Line
Count
Source
535
41.4M
{
536
41.4M
    Py_INCREF(obj);
537
41.4M
    return obj;
538
41.4M
}
flowgraph.c:_Py_NewRef
Line
Count
Source
535
79.5k
{
536
79.5k
    Py_INCREF(obj);
537
79.5k
    return obj;
538
79.5k
}
frame.c:_Py_NewRef
Line
Count
Source
535
40.9M
{
536
40.9M
    Py_INCREF(obj);
537
40.9M
    return obj;
538
40.9M
}
Unexecuted instantiation: future.c:_Py_NewRef
Unexecuted instantiation: gc.c:_Py_NewRef
Unexecuted instantiation: gc_gil.c:_Py_NewRef
getargs.c:_Py_NewRef
Line
Count
Source
535
3.12M
{
536
3.12M
    Py_INCREF(obj);
537
3.12M
    return obj;
538
3.12M
}
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
535
7.88M
{
536
7.88M
    Py_INCREF(obj);
537
7.88M
    return obj;
538
7.88M
}
importdl.c:_Py_NewRef
Line
Count
Source
535
1.17k
{
536
1.17k
    Py_INCREF(obj);
537
1.17k
    return obj;
538
1.17k
}
initconfig.c:_Py_NewRef
Line
Count
Source
535
629
{
536
629
    Py_INCREF(obj);
537
629
    return obj;
538
629
}
Unexecuted instantiation: instrumentation.c:_Py_NewRef
Unexecuted instantiation: instruction_sequence.c:_Py_NewRef
intrinsics.c:_Py_NewRef
Line
Count
Source
535
66.5k
{
536
66.5k
    Py_INCREF(obj);
537
66.5k
    return obj;
538
66.5k
}
Unexecuted instantiation: legacy_tracing.c:_Py_NewRef
Unexecuted instantiation: lock.c:_Py_NewRef
marshal.c:_Py_NewRef
Line
Count
Source
535
1.92M
{
536
1.92M
    Py_INCREF(obj);
537
1.92M
    return obj;
538
1.92M
}
modsupport.c:_Py_NewRef
Line
Count
Source
535
18
{
536
18
    Py_INCREF(obj);
537
18
    return obj;
538
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
535
37
{
536
37
    Py_INCREF(obj);
537
37
    return obj;
538
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
535
156k
{
536
156k
    Py_INCREF(obj);
537
156k
    return obj;
538
156k
}
sysmodule.c:_Py_NewRef
Line
Count
Source
535
1.93k
{
536
1.93k
    Py_INCREF(obj);
537
1.93k
    return obj;
538
1.93k
}
Unexecuted instantiation: thread.c:_Py_NewRef
Unexecuted instantiation: traceback.c:_Py_NewRef
Unexecuted instantiation: tracemalloc.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
535
6
{
536
6
    Py_INCREF(obj);
537
6
    return obj;
538
6
}
Unexecuted instantiation: faulthandler.c:_Py_NewRef
posixmodule.c:_Py_NewRef
Line
Count
Source
535
1.26M
{
536
1.26M
    Py_INCREF(obj);
537
1.26M
    return obj;
538
1.26M
}
signalmodule.c:_Py_NewRef
Line
Count
Source
535
2.36k
{
536
2.36k
    Py_INCREF(obj);
537
2.36k
    return obj;
538
2.36k
}
Unexecuted instantiation: _tracemalloc.c:_Py_NewRef
Unexecuted instantiation: _suggestions.c:_Py_NewRef
_datetimemodule.c:_Py_NewRef
Line
Count
Source
535
24.7k
{
536
24.7k
    Py_INCREF(obj);
537
24.7k
    return obj;
538
24.7k
}
Unexecuted instantiation: _codecsmodule.c:_Py_NewRef
_collectionsmodule.c:_Py_NewRef
Line
Count
Source
535
23.4M
{
536
23.4M
    Py_INCREF(obj);
537
23.4M
    return obj;
538
23.4M
}
Unexecuted instantiation: errnomodule.c:_Py_NewRef
_iomodule.c:_Py_NewRef
Line
Count
Source
535
310
{
536
310
    Py_INCREF(obj);
537
310
    return obj;
538
310
}
iobase.c:_Py_NewRef
Line
Count
Source
535
103k
{
536
103k
    Py_INCREF(obj);
537
103k
    return obj;
538
103k
}
Unexecuted instantiation: fileio.c:_Py_NewRef
bytesio.c:_Py_NewRef
Line
Count
Source
535
69.6k
{
536
69.6k
    Py_INCREF(obj);
537
69.6k
    return obj;
538
69.6k
}
bufferedio.c:_Py_NewRef
Line
Count
Source
535
11.5k
{
536
11.5k
    Py_INCREF(obj);
537
11.5k
    return obj;
538
11.5k
}
textio.c:_Py_NewRef
Line
Count
Source
535
359k
{
536
359k
    Py_INCREF(obj);
537
359k
    return obj;
538
359k
}
stringio.c:_Py_NewRef
Line
Count
Source
535
22.0k
{
536
22.0k
    Py_INCREF(obj);
537
22.0k
    return obj;
538
22.0k
}
itertoolsmodule.c:_Py_NewRef
Line
Count
Source
535
41.2k
{
536
41.2k
    Py_INCREF(obj);
537
41.2k
    return obj;
538
41.2k
}
sre.c:_Py_NewRef
Line
Count
Source
535
157M
{
536
157M
    Py_INCREF(obj);
537
157M
    return obj;
538
157M
}
Unexecuted instantiation: _sysconfig.c:_Py_NewRef
_threadmodule.c:_Py_NewRef
Line
Count
Source
535
76
{
536
76
    Py_INCREF(obj);
537
76
    return obj;
538
76
}
Unexecuted instantiation: timemodule.c:_Py_NewRef
Unexecuted instantiation: _typesmodule.c:_Py_NewRef
Unexecuted instantiation: _typingmodule.c:_Py_NewRef
Unexecuted instantiation: _weakref.c:_Py_NewRef
_abc.c:_Py_NewRef
Line
Count
Source
535
53.5k
{
536
53.5k
    Py_INCREF(obj);
537
53.5k
    return obj;
538
53.5k
}
_functoolsmodule.c:_Py_NewRef
Line
Count
Source
535
576k
{
536
576k
    Py_INCREF(obj);
537
576k
    return obj;
538
576k
}
Unexecuted instantiation: _localemodule.c:_Py_NewRef
Unexecuted instantiation: _opcode.c:_Py_NewRef
_operator.c:_Py_NewRef
Line
Count
Source
535
1.31M
{
536
1.31M
    Py_INCREF(obj);
537
1.31M
    return obj;
538
1.31M
}
Unexecuted instantiation: _stat.c:_Py_NewRef
Unexecuted instantiation: symtablemodule.c:_Py_NewRef
Unexecuted instantiation: pwdmodule.c:_Py_NewRef
getpath.c:_Py_NewRef
Line
Count
Source
535
296
{
536
296
    Py_INCREF(obj);
537
296
    return obj;
538
296
}
Unexecuted instantiation: frozen.c:_Py_NewRef
Unexecuted instantiation: getbuildinfo.c:_Py_NewRef
Unexecuted instantiation: peg_api.c:_Py_NewRef
Unexecuted instantiation: file_tokenizer.c:_Py_NewRef
Unexecuted instantiation: helpers.c:_Py_NewRef
Unexecuted instantiation: myreadline.c:_Py_NewRef
abstract.c:_Py_NewRef
Line
Count
Source
535
464M
{
536
464M
    Py_INCREF(obj);
537
464M
    return obj;
538
464M
}
Unexecuted instantiation: boolobject.c:_Py_NewRef
Unexecuted instantiation: bytes_methods.c:_Py_NewRef
bytearrayobject.c:_Py_NewRef
Line
Count
Source
535
17.0M
{
536
17.0M
    Py_INCREF(obj);
537
17.0M
    return obj;
538
17.0M
}
Unexecuted instantiation: capsule.c:_Py_NewRef
Unexecuted instantiation: cellobject.c:_Py_NewRef
classobject.c:_Py_NewRef
Line
Count
Source
535
87.9M
{
536
87.9M
    Py_INCREF(obj);
537
87.9M
    return obj;
538
87.9M
}
codeobject.c:_Py_NewRef
Line
Count
Source
535
2.17M
{
536
2.17M
    Py_INCREF(obj);
537
2.17M
    return obj;
538
2.17M
}
Unexecuted instantiation: complexobject.c:_Py_NewRef
descrobject.c:_Py_NewRef
Line
Count
Source
535
20.9M
{
536
20.9M
    Py_INCREF(obj);
537
20.9M
    return obj;
538
20.9M
}
enumobject.c:_Py_NewRef
Line
Count
Source
535
28
{
536
28
    Py_INCREF(obj);
537
28
    return obj;
538
28
}
genobject.c:_Py_NewRef
Line
Count
Source
535
48.3M
{
536
48.3M
    Py_INCREF(obj);
537
48.3M
    return obj;
538
48.3M
}
Unexecuted instantiation: fileobject.c:_Py_NewRef
frameobject.c:_Py_NewRef
Line
Count
Source
535
20.7M
{
536
20.7M
    Py_INCREF(obj);
537
20.7M
    return obj;
538
20.7M
}
funcobject.c:_Py_NewRef
Line
Count
Source
535
20.0M
{
536
20.0M
    Py_INCREF(obj);
537
20.0M
    return obj;
538
20.0M
}
interpolationobject.c:_Py_NewRef
Line
Count
Source
535
12
{
536
12
    Py_INCREF(obj);
537
12
    return obj;
538
12
}
iterobject.c:_Py_NewRef
Line
Count
Source
535
3.10M
{
536
3.10M
    Py_INCREF(obj);
537
3.10M
    return obj;
538
3.10M
}
lazyimportobject.c:_Py_NewRef
Line
Count
Source
535
878
{
536
878
    Py_INCREF(obj);
537
878
    return obj;
538
878
}
odictobject.c:_Py_NewRef
Line
Count
Source
535
204k
{
536
204k
    Py_INCREF(obj);
537
204k
    return obj;
538
204k
}
methodobject.c:_Py_NewRef
Line
Count
Source
535
9.99M
{
536
9.99M
    Py_INCREF(obj);
537
9.99M
    return obj;
538
9.99M
}
Unexecuted instantiation: namespaceobject.c:_Py_NewRef
Unexecuted instantiation: _contextvars.c:_Py_NewRef
Python-ast.c:_Py_NewRef
Line
Count
Source
535
515k
{
536
515k
    Py_INCREF(obj);
537
515k
    return obj;
538
515k
}
Unexecuted instantiation: Python-tokenize.c:_Py_NewRef
Unexecuted instantiation: asdl.c:_Py_NewRef
assemble.c:_Py_NewRef
Line
Count
Source
535
28.2k
{
536
28.2k
    Py_INCREF(obj);
537
28.2k
    return obj;
538
28.2k
}
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
pegen.c:_Py_NewRef
Line
Count
Source
535
97.4k
{
536
97.4k
    Py_INCREF(obj);
537
97.4k
    return obj;
538
97.4k
}
Unexecuted instantiation: pegen_errors.c:_Py_NewRef
Unexecuted instantiation: parser.c:_Py_NewRef
Unexecuted instantiation: buffer.c:_Py_NewRef
Unexecuted instantiation: lexer.c:_Py_NewRef
Unexecuted instantiation: state.c:_Py_NewRef
Unexecuted instantiation: readline_tokenizer.c:_Py_NewRef
Unexecuted instantiation: string_tokenizer.c:_Py_NewRef
Unexecuted instantiation: utf8_tokenizer.c:_Py_NewRef
Unexecuted instantiation: getcompiler.c:_Py_NewRef
Unexecuted instantiation: mystrtoul.c:_Py_NewRef
Unexecuted instantiation: token.c:_Py_NewRef
Unexecuted instantiation: action_helpers.c:_Py_NewRef
Unexecuted instantiation: string_parser.c:_Py_NewRef
539
540
static inline PyObject* _Py_XNewRef(PyObject *obj)
541
1.23G
{
542
1.23G
    Py_XINCREF(obj);
543
1.23G
    return obj;
544
1.23G
}
Unexecuted instantiation: bytesobject.c:_Py_XNewRef
Unexecuted instantiation: call.c:_Py_XNewRef
exceptions.c:_Py_XNewRef
Line
Count
Source
541
117M
{
542
117M
    Py_XINCREF(obj);
543
117M
    return obj;
544
117M
}
Unexecuted instantiation: genericaliasobject.c:_Py_XNewRef
Unexecuted instantiation: floatobject.c:_Py_XNewRef
listobject.c:_Py_XNewRef
Line
Count
Source
541
71.1M
{
542
71.1M
    Py_XINCREF(obj);
543
71.1M
    return obj;
544
71.1M
}
Unexecuted instantiation: longobject.c:_Py_XNewRef
dictobject.c:_Py_XNewRef
Line
Count
Source
541
377M
{
542
377M
    Py_XINCREF(obj);
543
377M
    return obj;
544
377M
}
memoryobject.c:_Py_XNewRef
Line
Count
Source
541
162
{
542
162
    Py_XINCREF(obj);
543
162
    return obj;
544
162
}
Unexecuted instantiation: moduleobject.c:_Py_XNewRef
Unexecuted instantiation: object.c:_Py_XNewRef
Unexecuted instantiation: obmalloc.c:_Py_XNewRef
Unexecuted instantiation: picklebufobject.c:_Py_XNewRef
Unexecuted instantiation: rangeobject.c:_Py_XNewRef
sentinelobject.c:_Py_XNewRef
Line
Count
Source
541
47
{
542
47
    Py_XINCREF(obj);
543
47
    return obj;
544
47
}
Unexecuted instantiation: setobject.c:_Py_XNewRef
Unexecuted instantiation: sliceobject.c:_Py_XNewRef
Unexecuted instantiation: structseq.c:_Py_XNewRef
Unexecuted instantiation: templateobject.c:_Py_XNewRef
Unexecuted instantiation: tupleobject.c:_Py_XNewRef
typeobject.c:_Py_XNewRef
Line
Count
Source
541
291k
{
542
291k
    Py_XINCREF(obj);
543
291k
    return obj;
544
291k
}
typevarobject.c:_Py_XNewRef
Line
Count
Source
541
1.20k
{
542
1.20k
    Py_XINCREF(obj);
543
1.20k
    return obj;
544
1.20k
}
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
541
1.35M
{
542
1.35M
    Py_XINCREF(obj);
543
1.35M
    return obj;
544
1.35M
}
Unexecuted instantiation: _warnings.c:_Py_XNewRef
bltinmodule.c:_Py_XNewRef
Line
Count
Source
541
1.30k
{
542
1.30k
    Py_XINCREF(obj);
543
1.30k
    return obj;
544
1.30k
}
ceval.c:_Py_XNewRef
Line
Count
Source
541
95.1M
{
542
95.1M
    Py_XINCREF(obj);
543
95.1M
    return obj;
544
95.1M
}
Unexecuted instantiation: codecs.c:_Py_XNewRef
Unexecuted instantiation: codegen.c:_Py_XNewRef
compile.c:_Py_XNewRef
Line
Count
Source
541
8.86k
{
542
8.86k
    Py_XINCREF(obj);
543
8.86k
    return obj;
544
8.86k
}
context.c:_Py_XNewRef
Line
Count
Source
541
66
{
542
66
    Py_XINCREF(obj);
543
66
    return obj;
544
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
541
33.8k
{
542
33.8k
    Py_XINCREF(obj);
543
33.8k
    return obj;
544
33.8k
}
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
541
1.06M
{
542
1.06M
    Py_XINCREF(obj);
543
1.06M
    return obj;
544
1.06M
}
Unexecuted instantiation: pythonrun.c:_Py_XNewRef
Unexecuted instantiation: pytime.c:_Py_XNewRef
Unexecuted instantiation: qsbr.c:_Py_XNewRef
Unexecuted instantiation: bootstrap_hash.c:_Py_XNewRef
Unexecuted instantiation: specialize.c:_Py_XNewRef
Unexecuted instantiation: slots.c:_Py_XNewRef
Unexecuted instantiation: slots_generated.c:_Py_XNewRef
structmember.c:_Py_XNewRef
Line
Count
Source
541
5.79M
{
542
5.79M
    Py_XINCREF(obj);
543
5.79M
    return obj;
544
5.79M
}
Unexecuted instantiation: symtable.c:_Py_XNewRef
sysmodule.c:_Py_XNewRef
Line
Count
Source
541
273
{
542
273
    Py_XINCREF(obj);
543
273
    return obj;
544
273
}
Unexecuted instantiation: thread.c:_Py_XNewRef
traceback.c:_Py_XNewRef
Line
Count
Source
541
128M
{
542
128M
    Py_XINCREF(obj);
543
128M
    return obj;
544
128M
}
Unexecuted instantiation: tracemalloc.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
Unexecuted instantiation: suggestions.c:_Py_XNewRef
Unexecuted instantiation: perf_trampoline.c:_Py_XNewRef
Unexecuted instantiation: perf_jit_trampoline.c:_Py_XNewRef
Unexecuted instantiation: jit_unwind.c:_Py_XNewRef
Unexecuted instantiation: remote_debugging.c:_Py_XNewRef
Unexecuted instantiation: dynload_shlib.c:_Py_XNewRef
Unexecuted instantiation: config.c:_Py_XNewRef
Unexecuted instantiation: gcmodule.c:_Py_XNewRef
Unexecuted instantiation: _asynciomodule.c:_Py_XNewRef
Unexecuted instantiation: atexitmodule.c:_Py_XNewRef
Unexecuted instantiation: faulthandler.c:_Py_XNewRef
posixmodule.c:_Py_XNewRef
Line
Count
Source
541
92.1k
{
542
92.1k
    Py_XINCREF(obj);
543
92.1k
    return obj;
544
92.1k
}
Unexecuted instantiation: signalmodule.c:_Py_XNewRef
Unexecuted instantiation: _tracemalloc.c:_Py_XNewRef
Unexecuted instantiation: _suggestions.c:_Py_XNewRef
_datetimemodule.c:_Py_XNewRef
Line
Count
Source
541
78
{
542
78
    Py_XINCREF(obj);
543
78
    return obj;
544
78
}
Unexecuted instantiation: _codecsmodule.c:_Py_XNewRef
_collectionsmodule.c:_Py_XNewRef
Line
Count
Source
541
21.6k
{
542
21.6k
    Py_XINCREF(obj);
543
21.6k
    return obj;
544
21.6k
}
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
541
152
{
542
152
    Py_XINCREF(obj);
543
152
    return obj;
544
152
}
Unexecuted instantiation: timemodule.c:_Py_XNewRef
Unexecuted instantiation: _typesmodule.c:_Py_XNewRef
Unexecuted instantiation: _typingmodule.c:_Py_XNewRef
Unexecuted instantiation: _weakref.c:_Py_XNewRef
_abc.c:_Py_XNewRef
Line
Count
Source
541
30.7k
{
542
30.7k
    Py_XINCREF(obj);
543
30.7k
    return obj;
544
30.7k
}
_functoolsmodule.c:_Py_XNewRef
Line
Count
Source
541
40
{
542
40
    Py_XINCREF(obj);
543
40
    return obj;
544
40
}
Unexecuted instantiation: _localemodule.c:_Py_XNewRef
Unexecuted instantiation: _opcode.c:_Py_XNewRef
Unexecuted instantiation: _operator.c:_Py_XNewRef
Unexecuted instantiation: _stat.c:_Py_XNewRef
Unexecuted instantiation: symtablemodule.c:_Py_XNewRef
Unexecuted instantiation: pwdmodule.c:_Py_XNewRef
getpath.c:_Py_XNewRef
Line
Count
Source
541
222
{
542
222
    Py_XINCREF(obj);
543
222
    return obj;
544
222
}
Unexecuted instantiation: frozen.c:_Py_XNewRef
Unexecuted instantiation: getbuildinfo.c:_Py_XNewRef
Unexecuted instantiation: peg_api.c:_Py_XNewRef
Unexecuted instantiation: file_tokenizer.c:_Py_XNewRef
Unexecuted instantiation: helpers.c:_Py_XNewRef
Unexecuted instantiation: myreadline.c:_Py_XNewRef
abstract.c:_Py_XNewRef
Line
Count
Source
541
102M
{
542
102M
    Py_XINCREF(obj);
543
102M
    return obj;
544
102M
}
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
541
21.2M
{
542
21.2M
    Py_XINCREF(obj);
543
21.2M
    return obj;
544
21.2M
}
Unexecuted instantiation: classobject.c:_Py_XNewRef
codeobject.c:_Py_XNewRef
Line
Count
Source
541
4.52k
{
542
4.52k
    Py_XINCREF(obj);
543
4.52k
    return obj;
544
4.52k
}
Unexecuted instantiation: complexobject.c:_Py_XNewRef
descrobject.c:_Py_XNewRef
Line
Count
Source
541
113k
{
542
113k
    Py_XINCREF(obj);
543
113k
    return obj;
544
113k
}
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
541
19.6M
{
542
19.6M
    Py_XINCREF(obj);
543
19.6M
    return obj;
544
19.6M
}
funcobject.c:_Py_XNewRef
Line
Count
Source
541
60.7k
{
542
60.7k
    Py_XINCREF(obj);
543
60.7k
    return obj;
544
60.7k
}
Unexecuted instantiation: interpolationobject.c:_Py_XNewRef
Unexecuted instantiation: iterobject.c:_Py_XNewRef
lazyimportobject.c:_Py_XNewRef
Line
Count
Source
541
878
{
542
878
    Py_XINCREF(obj);
543
878
    return obj;
544
878
}
Unexecuted instantiation: odictobject.c:_Py_XNewRef
methodobject.c:_Py_XNewRef
Line
Count
Source
541
289M
{
542
289M
    Py_XINCREF(obj);
543
289M
    return obj;
544
289M
}
Unexecuted instantiation: namespaceobject.c:_Py_XNewRef
Unexecuted instantiation: _contextvars.c:_Py_XNewRef
Unexecuted instantiation: Python-ast.c:_Py_XNewRef
Unexecuted instantiation: Python-tokenize.c:_Py_XNewRef
Unexecuted instantiation: asdl.c:_Py_XNewRef
Unexecuted instantiation: assemble.c:_Py_XNewRef
Unexecuted instantiation: ast.c:_Py_XNewRef
Unexecuted instantiation: ast_preprocess.c:_Py_XNewRef
Unexecuted instantiation: ast_unparse.c:_Py_XNewRef
Unexecuted instantiation: critical_section.c:_Py_XNewRef
Unexecuted instantiation: crossinterp.c:_Py_XNewRef
Unexecuted instantiation: getcopyright.c:_Py_XNewRef
Unexecuted instantiation: getplatform.c:_Py_XNewRef
Unexecuted instantiation: getversion.c:_Py_XNewRef
Unexecuted instantiation: optimizer.c:_Py_XNewRef
Unexecuted instantiation: pathconfig.c:_Py_XNewRef
pegen.c:_Py_XNewRef
Line
Count
Source
541
97.4k
{
542
97.4k
    Py_XINCREF(obj);
543
97.4k
    return obj;
544
97.4k
}
Unexecuted instantiation: pegen_errors.c:_Py_XNewRef
Unexecuted instantiation: parser.c:_Py_XNewRef
Unexecuted instantiation: buffer.c:_Py_XNewRef
Unexecuted instantiation: lexer.c:_Py_XNewRef
Unexecuted instantiation: state.c:_Py_XNewRef
Unexecuted instantiation: readline_tokenizer.c:_Py_XNewRef
Unexecuted instantiation: string_tokenizer.c:_Py_XNewRef
Unexecuted instantiation: utf8_tokenizer.c:_Py_XNewRef
Unexecuted instantiation: getcompiler.c:_Py_XNewRef
Unexecuted instantiation: mystrtoul.c:_Py_XNewRef
Unexecuted instantiation: token.c:_Py_XNewRef
Unexecuted instantiation: action_helpers.c:_Py_XNewRef
Unexecuted instantiation: string_parser.c:_Py_XNewRef
545
546
// Py_NewRef() and Py_XNewRef() are exported as functions for the stable ABI.
547
// Names overridden with macros by static inline functions for best
548
// performances.
549
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
550
6.83G
#  define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj))
551
1.14G
#  define Py_XNewRef(obj) _Py_XNewRef(_PyObject_CAST(obj))
552
#else
553
#  define Py_NewRef(obj) _Py_NewRef(obj)
554
#  define Py_XNewRef(obj) _Py_XNewRef(obj)
555
#endif
556
557
558
#ifdef __cplusplus
559
}
560
#endif
561
#endif   // !_Py_REFCOUNT_H