Coverage Report

Created: 2026-01-10 06:41

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
/*
9
Immortalization:
10
11
The following indicates the immortalization strategy depending on the amount
12
of available bits in the reference count field. All strategies are backwards
13
compatible but the specific reference count value or immortalization check
14
might change depending on the specializations for the underlying system.
15
16
Proper deallocation of immortal instances requires distinguishing between
17
statically allocated immortal instances vs those promoted by the runtime to be
18
immortal. The latter should be the only instances that require
19
cleanup during runtime finalization.
20
*/
21
22
#if SIZEOF_VOID_P > 4
23
/*
24
In 64+ bit systems, any object whose 32 bit reference count is >= 2**31
25
will be treated as immortal.
26
27
Using the lower 32 bits makes the value backwards compatible by allowing
28
C-Extensions without the updated checks in Py_INCREF and Py_DECREF to safely
29
increase and decrease the objects reference count.
30
31
In order to offer sufficient resilience to C extensions using the stable ABI
32
compiled against 3.11 or earlier, we set the initial value near the
33
middle of the range (2**31, 2**32). That way the refcount can be
34
off by ~1 billion without affecting immortality.
35
36
Reference count increases will use saturated arithmetic, taking advantage of
37
having all the lower 32 bits set, which will avoid the reference count to go
38
beyond the refcount limit. Immortality checks for reference count decreases will
39
be done by checking the bit sign flag in the lower 32 bits.
40
41
To ensure that once an object becomes immortal, it remains immortal, the threshold
42
for omitting increfs is much higher than for omitting decrefs. Consequently, once
43
the refcount for an object exceeds _Py_IMMORTAL_MINIMUM_REFCNT it will gradually
44
increase over time until it reaches _Py_IMMORTAL_INITIAL_REFCNT.
45
*/
46
20.0G
#define _Py_IMMORTAL_INITIAL_REFCNT (3ULL << 30)
47
320
#define _Py_IMMORTAL_MINIMUM_REFCNT (1ULL << 31)
48
278M
#define _Py_STATIC_FLAG_BITS ((Py_ssize_t)(_Py_STATICALLY_ALLOCATED_FLAG | _Py_IMMORTAL_FLAGS))
49
278M
#define _Py_STATIC_IMMORTAL_INITIAL_REFCNT (((Py_ssize_t)_Py_IMMORTAL_INITIAL_REFCNT) | (_Py_STATIC_FLAG_BITS << 48))
50
51
#else
52
/*
53
In 32 bit systems, an object will be treated as immortal if its reference
54
count equals or exceeds _Py_IMMORTAL_MINIMUM_REFCNT (2**30).
55
56
Using the lower 30 bits makes the value backwards compatible by allowing
57
C-Extensions without the updated checks in Py_INCREF and Py_DECREF to safely
58
increase and decrease the objects reference count. The object would lose its
59
immortality, but the execution would still be correct.
60
61
Reference count increases and decreases will first go through an immortality
62
check by comparing the reference count field to the minimum immortality refcount.
63
*/
64
#define _Py_IMMORTAL_INITIAL_REFCNT ((Py_ssize_t)(5L << 28))
65
#define _Py_IMMORTAL_MINIMUM_REFCNT ((Py_ssize_t)(1L << 30))
66
#define _Py_STATIC_IMMORTAL_INITIAL_REFCNT ((Py_ssize_t)(7L << 28))
67
#define _Py_STATIC_IMMORTAL_MINIMUM_REFCNT ((Py_ssize_t)(6L << 28))
68
#endif
69
70
// Py_GIL_DISABLED builds indicate immortal objects using `ob_ref_local`, which is
71
// always 32-bits.
72
#ifdef Py_GIL_DISABLED
73
#define _Py_IMMORTAL_REFCNT_LOCAL UINT32_MAX
74
#endif
75
76
77
#ifdef Py_GIL_DISABLED
78
   // The shared reference count uses the two least-significant bits to store
79
   // flags. The remaining bits are used to store the reference count.
80
#  define _Py_REF_SHARED_SHIFT        2
81
#  define _Py_REF_SHARED_FLAG_MASK    0x3
82
83
   // The shared flags are initialized to zero.
84
#  define _Py_REF_SHARED_INIT         0x0
85
#  define _Py_REF_MAYBE_WEAKREF       0x1
86
#  define _Py_REF_QUEUED              0x2
87
#  define _Py_REF_MERGED              0x3
88
89
   // Create a shared field from a refcnt and desired flags
90
#  define _Py_REF_SHARED(refcnt, flags) \
91
              (((refcnt) << _Py_REF_SHARED_SHIFT) + (flags))
92
#endif  // Py_GIL_DISABLED
93
94
95
// Py_REFCNT() implementation for the stable ABI
96
PyAPI_FUNC(Py_ssize_t) Py_REFCNT(PyObject *ob);
97
98
#if defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030e0000
99
    // Stable ABI implements Py_REFCNT() as a function call
100
    // on limited C API version 3.14 and newer.
101
#else
102
1.15G
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
1.15G
    #if !defined(Py_GIL_DISABLED)
104
1.15G
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
1.15G
    }
bytesobject.c:_Py_REFCNT
Line
Count
Source
102
2.05M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
2.05M
    #if !defined(Py_GIL_DISABLED)
104
2.05M
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
2.05M
    }
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
102
320
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
320
    #if !defined(Py_GIL_DISABLED)
104
320
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
320
    }
longobject.c:_Py_REFCNT
Line
Count
Source
102
502
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
502
    #if !defined(Py_GIL_DISABLED)
104
502
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
502
    }
dictobject.c:_Py_REFCNT
Line
Count
Source
102
666M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
666M
    #if !defined(Py_GIL_DISABLED)
104
666M
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
666M
    }
Unexecuted instantiation: memoryobject.c:_Py_REFCNT
Unexecuted instantiation: moduleobject.c:_Py_REFCNT
object.c:_Py_REFCNT
Line
Count
Source
102
69.8M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
69.8M
    #if !defined(Py_GIL_DISABLED)
104
69.8M
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
69.8M
    }
Unexecuted instantiation: obmalloc.c:_Py_REFCNT
Unexecuted instantiation: picklebufobject.c:_Py_REFCNT
Unexecuted instantiation: rangeobject.c:_Py_REFCNT
setobject.c:_Py_REFCNT
Line
Count
Source
102
2.56k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
2.56k
    #if !defined(Py_GIL_DISABLED)
104
2.56k
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
2.56k
    }
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
102
107k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
107k
    #if !defined(Py_GIL_DISABLED)
104
107k
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
107k
    }
typeobject.c:_Py_REFCNT
Line
Count
Source
102
78
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
78
    #if !defined(Py_GIL_DISABLED)
104
78
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
78
    }
Unexecuted instantiation: typevarobject.c:_Py_REFCNT
unicode_format.c:_Py_REFCNT
Line
Count
Source
102
10.8M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
10.8M
    #if !defined(Py_GIL_DISABLED)
104
10.8M
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
10.8M
    }
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
102
76.4M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
76.4M
    #if !defined(Py_GIL_DISABLED)
104
76.4M
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
76.4M
    }
Unexecuted instantiation: unionobject.c:_Py_REFCNT
weakrefobject.c:_Py_REFCNT
Line
Count
Source
102
53.9M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
53.9M
    #if !defined(Py_GIL_DISABLED)
104
53.9M
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
53.9M
    }
Unexecuted instantiation: _warnings.c:_Py_REFCNT
bltinmodule.c:_Py_REFCNT
Line
Count
Source
102
26.0M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
26.0M
    #if !defined(Py_GIL_DISABLED)
104
26.0M
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
26.0M
    }
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
102
56.7M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
56.7M
    #if !defined(Py_GIL_DISABLED)
104
56.7M
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
56.7M
    }
Unexecuted instantiation: future.c:_Py_REFCNT
gc.c:_Py_REFCNT
Line
Count
Source
102
67.7M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
67.7M
    #if !defined(Py_GIL_DISABLED)
104
67.7M
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
67.7M
    }
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
102
28
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
28
    #if !defined(Py_GIL_DISABLED)
104
28
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
28
    }
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
102
201k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
201k
    #if !defined(Py_GIL_DISABLED)
104
201k
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
201k
    }
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: structmember.c:_Py_REFCNT
Unexecuted instantiation: symtable.c:_Py_REFCNT
Unexecuted instantiation: sysmodule.c:_Py_REFCNT
Unexecuted instantiation: thread.c:_Py_REFCNT
Unexecuted instantiation: traceback.c:_Py_REFCNT
Unexecuted instantiation: tracemalloc.c:_Py_REFCNT
Unexecuted instantiation: 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: 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
102
139k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
139k
    #if !defined(Py_GIL_DISABLED)
104
139k
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
139k
    }
Unexecuted instantiation: fileio.c:_Py_REFCNT
bytesio.c:_Py_REFCNT
Line
Count
Source
102
2.26k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
2.26k
    #if !defined(Py_GIL_DISABLED)
104
2.26k
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
2.26k
    }
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
102
540
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
540
    #if !defined(Py_GIL_DISABLED)
104
540
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
540
    }
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
102
189k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
189k
    #if !defined(Py_GIL_DISABLED)
104
189k
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
189k
    }
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
102
193k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
193k
    #if !defined(Py_GIL_DISABLED)
104
193k
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
193k
    }
Unexecuted instantiation: complexobject.c:_Py_REFCNT
Unexecuted instantiation: descrobject.c:_Py_REFCNT
enumobject.c:_Py_REFCNT
Line
Count
Source
102
101M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
101M
    #if !defined(Py_GIL_DISABLED)
104
101M
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
101M
    }
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
102
26.8M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
26.8M
    #if !defined(Py_GIL_DISABLED)
104
26.8M
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
26.8M
    }
Unexecuted instantiation: interpolationobject.c:_Py_REFCNT
Unexecuted instantiation: iterobject.c:_Py_REFCNT
Unexecuted instantiation: odictobject.c:_Py_REFCNT
Unexecuted instantiation: methodobject.c:_Py_REFCNT
Unexecuted instantiation: namespaceobject.c:_Py_REFCNT
Unexecuted instantiation: _contextvars.c:_Py_REFCNT
Unexecuted instantiation: 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
115
    #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
116
790M
    #  define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST(ob))
117
    #else
118
    #  define Py_REFCNT(ob) _Py_REFCNT(ob)
119
    #endif
120
#endif
121
122
#ifndef _Py_OPAQUE_PYOBJECT
123
static inline Py_ALWAYS_INLINE int _Py_IsImmortal(PyObject *op)
124
32.4G
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
32.4G
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
32.4G
}
bytesobject.c:_Py_IsImmortal
Line
Count
Source
124
6.15M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
6.15M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
6.15M
}
call.c:_Py_IsImmortal
Line
Count
Source
124
218M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
218M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
218M
}
exceptions.c:_Py_IsImmortal
Line
Count
Source
124
206M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
206M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
206M
}
genericaliasobject.c:_Py_IsImmortal
Line
Count
Source
124
202
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
202
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
202
}
floatobject.c:_Py_IsImmortal
Line
Count
Source
124
151k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
151k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
151k
}
listobject.c:_Py_IsImmortal
Line
Count
Source
124
1.79G
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
1.79G
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
1.79G
}
longobject.c:_Py_IsImmortal
Line
Count
Source
124
49.8M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
49.8M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
49.8M
}
dictobject.c:_Py_IsImmortal
Line
Count
Source
124
2.07G
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
2.07G
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
2.07G
}
memoryobject.c:_Py_IsImmortal
Line
Count
Source
124
2.98M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
2.98M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
2.98M
}
moduleobject.c:_Py_IsImmortal
Line
Count
Source
124
3.14M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
3.14M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
3.14M
}
object.c:_Py_IsImmortal
Line
Count
Source
124
1.06G
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
1.06G
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
1.06G
}
Unexecuted instantiation: obmalloc.c:_Py_IsImmortal
Unexecuted instantiation: picklebufobject.c:_Py_IsImmortal
rangeobject.c:_Py_IsImmortal
Line
Count
Source
124
60.2M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
60.2M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
60.2M
}
setobject.c:_Py_IsImmortal
Line
Count
Source
124
17.7M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
17.7M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
17.7M
}
sliceobject.c:_Py_IsImmortal
Line
Count
Source
124
220M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
220M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
220M
}
structseq.c:_Py_IsImmortal
Line
Count
Source
124
9.51M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
9.51M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
9.51M
}
templateobject.c:_Py_IsImmortal
Line
Count
Source
124
4
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
4
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
4
}
tupleobject.c:_Py_IsImmortal
Line
Count
Source
124
9.09G
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
9.09G
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
9.09G
}
typeobject.c:_Py_IsImmortal
Line
Count
Source
124
1.39G
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
1.39G
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
1.39G
}
typevarobject.c:_Py_IsImmortal
Line
Count
Source
124
300
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
300
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
300
}
unicode_format.c:_Py_IsImmortal
Line
Count
Source
124
79.2M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
79.2M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
79.2M
}
unicode_formatter.c:_Py_IsImmortal
Line
Count
Source
124
256
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
256
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
256
}
unicode_writer.c:_Py_IsImmortal
Line
Count
Source
124
17.1M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
17.1M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
17.1M
}
Unexecuted instantiation: unicodectype.c:_Py_IsImmortal
unicodeobject.c:_Py_IsImmortal
Line
Count
Source
124
215M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
215M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
215M
}
unionobject.c:_Py_IsImmortal
Line
Count
Source
124
1.57k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
1.57k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
1.57k
}
weakrefobject.c:_Py_IsImmortal
Line
Count
Source
124
81.7k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
81.7k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
81.7k
}
_warnings.c:_Py_IsImmortal
Line
Count
Source
124
47.9M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
47.9M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
47.9M
}
bltinmodule.c:_Py_IsImmortal
Line
Count
Source
124
2.29G
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
2.29G
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
2.29G
}
ceval.c:_Py_IsImmortal
Line
Count
Source
124
10.2G
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
10.2G
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
10.2G
}
codecs.c:_Py_IsImmortal
Line
Count
Source
124
10.2M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
10.2M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
10.2M
}
codegen.c:_Py_IsImmortal
Line
Count
Source
124
196k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
196k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
196k
}
compile.c:_Py_IsImmortal
Line
Count
Source
124
752k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
752k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
752k
}
context.c:_Py_IsImmortal
Line
Count
Source
124
56
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
56
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
56
}
errors.c:_Py_IsImmortal
Line
Count
Source
124
102M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
102M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
102M
}
flowgraph.c:_Py_IsImmortal
Line
Count
Source
124
86.5k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
86.5k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
86.5k
}
frame.c:_Py_IsImmortal
Line
Count
Source
124
111M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
111M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
111M
}
Unexecuted instantiation: future.c:_Py_IsImmortal
gc.c:_Py_IsImmortal
Line
Count
Source
124
558M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
558M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
558M
}
Unexecuted instantiation: gc_gil.c:_Py_IsImmortal
getargs.c:_Py_IsImmortal
Line
Count
Source
124
8.36M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
8.36M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
8.36M
}
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
124
13.4M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
13.4M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
13.4M
}
importdl.c:_Py_IsImmortal
Line
Count
Source
124
2.11k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
2.11k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
2.11k
}
initconfig.c:_Py_IsImmortal
Line
Count
Source
124
3.86k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
3.86k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
3.86k
}
instrumentation.c:_Py_IsImmortal
Line
Count
Source
124
672
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
672
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
672
}
instruction_sequence.c:_Py_IsImmortal
Line
Count
Source
124
1
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
1
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
1
}
intrinsics.c:_Py_IsImmortal
Line
Count
Source
124
52.0k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
52.0k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
52.0k
}
Unexecuted instantiation: legacy_tracing.c:_Py_IsImmortal
Unexecuted instantiation: lock.c:_Py_IsImmortal
marshal.c:_Py_IsImmortal
Line
Count
Source
124
1.39M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
1.39M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
1.39M
}
modsupport.c:_Py_IsImmortal
Line
Count
Source
124
29.3k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
29.3k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
29.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
124
4.44M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
4.44M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
4.44M
}
Unexecuted instantiation: pyctype.c:_Py_IsImmortal
Unexecuted instantiation: pyhash.c:_Py_IsImmortal
pylifecycle.c:_Py_IsImmortal
Line
Count
Source
124
1.00k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
1.00k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
1.00k
}
Unexecuted instantiation: pymath.c:_Py_IsImmortal
Unexecuted instantiation: pystate.c:_Py_IsImmortal
pythonrun.c:_Py_IsImmortal
Line
Count
Source
124
664
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
664
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
664
}
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
124
2.33M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
2.33M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
2.33M
}
structmember.c:_Py_IsImmortal
Line
Count
Source
124
1.66k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
1.66k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
1.66k
}
symtable.c:_Py_IsImmortal
Line
Count
Source
124
1.01M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
1.01M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
1.01M
}
sysmodule.c:_Py_IsImmortal
Line
Count
Source
124
4.80M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
4.80M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
4.80M
}
Unexecuted instantiation: thread.c:_Py_IsImmortal
traceback.c:_Py_IsImmortal
Line
Count
Source
124
164M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
164M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
164M
}
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
124
10.1k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
10.1k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
10.1k
}
Unexecuted instantiation: suggestions.c:_Py_IsImmortal
Unexecuted instantiation: perf_trampoline.c:_Py_IsImmortal
Unexecuted instantiation: perf_jit_trampoline.c:_Py_IsImmortal
Unexecuted instantiation: remote_debugging.c:_Py_IsImmortal
Unexecuted instantiation: dynload_shlib.c:_Py_IsImmortal
Unexecuted instantiation: config.c:_Py_IsImmortal
Unexecuted instantiation: gcmodule.c:_Py_IsImmortal
Unexecuted instantiation: _asynciomodule.c:_Py_IsImmortal
atexitmodule.c:_Py_IsImmortal
Line
Count
Source
124
2
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
2
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
2
}
Unexecuted instantiation: faulthandler.c:_Py_IsImmortal
posixmodule.c:_Py_IsImmortal
Line
Count
Source
124
5.13M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
5.13M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
5.13M
}
signalmodule.c:_Py_IsImmortal
Line
Count
Source
124
56
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
56
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
56
}
Unexecuted instantiation: _tracemalloc.c:_Py_IsImmortal
Unexecuted instantiation: _suggestions.c:_Py_IsImmortal
_datetimemodule.c:_Py_IsImmortal
Line
Count
Source
124
656
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
656
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
656
}
Unexecuted instantiation: _codecsmodule.c:_Py_IsImmortal
_collectionsmodule.c:_Py_IsImmortal
Line
Count
Source
124
104k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
104k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
104k
}
Unexecuted instantiation: errnomodule.c:_Py_IsImmortal
_iomodule.c:_Py_IsImmortal
Line
Count
Source
124
2.64M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
2.64M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
2.64M
}
iobase.c:_Py_IsImmortal
Line
Count
Source
124
2.85M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
2.85M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
2.85M
}
fileio.c:_Py_IsImmortal
Line
Count
Source
124
117k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
117k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
117k
}
bytesio.c:_Py_IsImmortal
Line
Count
Source
124
319k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
319k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
319k
}
bufferedio.c:_Py_IsImmortal
Line
Count
Source
124
10.0M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
10.0M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
10.0M
}
textio.c:_Py_IsImmortal
Line
Count
Source
124
971k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
971k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
971k
}
stringio.c:_Py_IsImmortal
Line
Count
Source
124
323k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
323k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
323k
}
itertoolsmodule.c:_Py_IsImmortal
Line
Count
Source
124
92.9k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
92.9k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
92.9k
}
sre.c:_Py_IsImmortal
Line
Count
Source
124
432M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
432M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
432M
}
Unexecuted instantiation: _sysconfig.c:_Py_IsImmortal
_threadmodule.c:_Py_IsImmortal
Line
Count
Source
124
34.4k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
34.4k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
34.4k
}
Unexecuted instantiation: timemodule.c:_Py_IsImmortal
Unexecuted instantiation: _typesmodule.c:_Py_IsImmortal
Unexecuted instantiation: _typingmodule.c:_Py_IsImmortal
Unexecuted instantiation: _weakref.c:_Py_IsImmortal
_abc.c:_Py_IsImmortal
Line
Count
Source
124
102k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
102k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
102k
}
_functoolsmodule.c:_Py_IsImmortal
Line
Count
Source
124
753k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
753k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
753k
}
Unexecuted instantiation: _localemodule.c:_Py_IsImmortal
Unexecuted instantiation: _opcode.c:_Py_IsImmortal
_operator.c:_Py_IsImmortal
Line
Count
Source
124
544k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
544k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
544k
}
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
124
924
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
924
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
924
}
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
124
21.7k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
21.7k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
21.7k
}
Unexecuted instantiation: myreadline.c:_Py_IsImmortal
abstract.c:_Py_IsImmortal
Line
Count
Source
124
711M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
711M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
711M
}
Unexecuted instantiation: boolobject.c:_Py_IsImmortal
Unexecuted instantiation: bytes_methods.c:_Py_IsImmortal
bytearrayobject.c:_Py_IsImmortal
Line
Count
Source
124
3.42M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
3.42M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
3.42M
}
capsule.c:_Py_IsImmortal
Line
Count
Source
124
10
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
10
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
10
}
cellobject.c:_Py_IsImmortal
Line
Count
Source
124
531k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
531k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
531k
}
classobject.c:_Py_IsImmortal
Line
Count
Source
124
95.8M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
95.8M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
95.8M
}
codeobject.c:_Py_IsImmortal
Line
Count
Source
124
1.10M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
1.10M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
1.10M
}
Unexecuted instantiation: complexobject.c:_Py_IsImmortal
descrobject.c:_Py_IsImmortal
Line
Count
Source
124
79.5M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
79.5M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
79.5M
}
enumobject.c:_Py_IsImmortal
Line
Count
Source
124
270M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
270M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
270M
}
genobject.c:_Py_IsImmortal
Line
Count
Source
124
144M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
144M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
144M
}
fileobject.c:_Py_IsImmortal
Line
Count
Source
124
369k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
369k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
369k
}
frameobject.c:_Py_IsImmortal
Line
Count
Source
124
37.9M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
37.9M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
37.9M
}
funcobject.c:_Py_IsImmortal
Line
Count
Source
124
148M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
148M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
148M
}
interpolationobject.c:_Py_IsImmortal
Line
Count
Source
124
28
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
28
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
28
}
iterobject.c:_Py_IsImmortal
Line
Count
Source
124
3.46M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
3.46M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
3.46M
}
odictobject.c:_Py_IsImmortal
Line
Count
Source
124
768
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
768
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
768
}
methodobject.c:_Py_IsImmortal
Line
Count
Source
124
344M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
344M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
344M
}
namespaceobject.c:_Py_IsImmortal
Line
Count
Source
124
28
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
28
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
28
}
Unexecuted instantiation: _contextvars.c:_Py_IsImmortal
Python-ast.c:_Py_IsImmortal
Line
Count
Source
124
2.84M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
2.84M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
2.84M
}
Unexecuted instantiation: Python-tokenize.c:_Py_IsImmortal
Unexecuted instantiation: asdl.c:_Py_IsImmortal
assemble.c:_Py_IsImmortal
Line
Count
Source
124
59.9k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
59.9k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
59.9k
}
Unexecuted instantiation: ast.c:_Py_IsImmortal
ast_preprocess.c:_Py_IsImmortal
Line
Count
Source
124
3
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
3
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
3
}
ast_unparse.c:_Py_IsImmortal
Line
Count
Source
124
8
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
8
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
8
}
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
124
127k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
127k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
127k
}
pegen_errors.c:_Py_IsImmortal
Line
Count
Source
124
41.3k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
41.3k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
41.3k
}
Unexecuted instantiation: parser.c:_Py_IsImmortal
Unexecuted instantiation: buffer.c:_Py_IsImmortal
lexer.c:_Py_IsImmortal
Line
Count
Source
124
12.5k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
12.5k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
12.5k
}
state.c:_Py_IsImmortal
Line
Count
Source
124
21.4k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
21.4k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
21.4k
}
Unexecuted instantiation: readline_tokenizer.c:_Py_IsImmortal
Unexecuted instantiation: string_tokenizer.c:_Py_IsImmortal
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
124
42.6k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
42.6k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
42.6k
}
134
34.6G
#define _Py_IsImmortal(op) _Py_IsImmortal(_PyObject_CAST(op))
135
136
137
static inline Py_ALWAYS_INLINE int _Py_IsStaticImmortal(PyObject *op)
138
0
{
139
0
#if defined(Py_GIL_DISABLED) || SIZEOF_VOID_P > 4
140
0
    return (op->ob_flags & _Py_STATICALLY_ALLOCATED_FLAG) != 0;
141
0
#else
142
0
    return op->ob_refcnt >= _Py_STATIC_IMMORTAL_MINIMUM_REFCNT;
143
0
#endif
144
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: 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: 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: 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: 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
145
#define _Py_IsStaticImmortal(op) _Py_IsStaticImmortal(_PyObject_CAST(op))
146
#endif // !defined(_Py_OPAQUE_PYOBJECT)
147
148
// Py_SET_REFCNT() implementation for stable ABI
149
PyAPI_FUNC(void) _Py_SetRefcnt(PyObject *ob, Py_ssize_t refcnt);
150
151
737M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
737M
    assert(refcnt >= 0);
153
#if defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000
154
    // Stable ABI implements Py_SET_REFCNT() as a function call
155
    // on limited C API version 3.13 and newer.
156
    _Py_SetRefcnt(ob, refcnt);
157
#else
158
    // This immortal check is for code that is unaware of immortal objects.
159
    // The runtime tracks these objects and we should avoid as much
160
    // as possible having extensions inadvertently change the refcnt
161
    // of an immortalized object.
162
737M
    if (_Py_IsImmortal(ob)) {
163
796
        return;
164
796
    }
165
737M
#ifndef Py_GIL_DISABLED
166
737M
#if SIZEOF_VOID_P > 4
167
737M
    ob->ob_refcnt = (PY_UINT32_T)refcnt;
168
#else
169
    ob->ob_refcnt = refcnt;
170
#endif
171
#else
172
    if (_Py_IsOwnedByCurrentThread(ob)) {
173
        if ((size_t)refcnt > (size_t)UINT32_MAX) {
174
            // On overflow, make the object immortal
175
            ob->ob_tid = _Py_UNOWNED_TID;
176
            ob->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
177
            ob->ob_ref_shared = 0;
178
        }
179
        else {
180
            // Set local refcount to desired refcount and shared refcount
181
            // to zero, but preserve the shared refcount flags.
182
            ob->ob_ref_local = _Py_STATIC_CAST(uint32_t, refcnt);
183
            ob->ob_ref_shared &= _Py_REF_SHARED_FLAG_MASK;
184
        }
185
    }
186
    else {
187
        // Set local refcount to zero and shared refcount to desired refcount.
188
        // Mark the object as merged.
189
        ob->ob_tid = _Py_UNOWNED_TID;
190
        ob->ob_ref_local = 0;
191
        ob->ob_ref_shared = _Py_REF_SHARED(refcnt, _Py_REF_MERGED);
192
    }
193
#endif  // Py_GIL_DISABLED
194
737M
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
737M
}
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
151
662M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
662M
    assert(refcnt >= 0);
153
#if defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000
154
    // Stable ABI implements Py_SET_REFCNT() as a function call
155
    // on limited C API version 3.13 and newer.
156
    _Py_SetRefcnt(ob, refcnt);
157
#else
158
    // This immortal check is for code that is unaware of immortal objects.
159
    // The runtime tracks these objects and we should avoid as much
160
    // as possible having extensions inadvertently change the refcnt
161
    // of an immortalized object.
162
662M
    if (_Py_IsImmortal(ob)) {
163
0
        return;
164
0
    }
165
662M
#ifndef Py_GIL_DISABLED
166
662M
#if SIZEOF_VOID_P > 4
167
662M
    ob->ob_refcnt = (PY_UINT32_T)refcnt;
168
#else
169
    ob->ob_refcnt = refcnt;
170
#endif
171
#else
172
    if (_Py_IsOwnedByCurrentThread(ob)) {
173
        if ((size_t)refcnt > (size_t)UINT32_MAX) {
174
            // On overflow, make the object immortal
175
            ob->ob_tid = _Py_UNOWNED_TID;
176
            ob->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
177
            ob->ob_ref_shared = 0;
178
        }
179
        else {
180
            // Set local refcount to desired refcount and shared refcount
181
            // to zero, but preserve the shared refcount flags.
182
            ob->ob_ref_local = _Py_STATIC_CAST(uint32_t, refcnt);
183
            ob->ob_ref_shared &= _Py_REF_SHARED_FLAG_MASK;
184
        }
185
    }
186
    else {
187
        // Set local refcount to zero and shared refcount to desired refcount.
188
        // Mark the object as merged.
189
        ob->ob_tid = _Py_UNOWNED_TID;
190
        ob->ob_ref_local = 0;
191
        ob->ob_ref_shared = _Py_REF_SHARED(refcnt, _Py_REF_MERGED);
192
    }
193
#endif  // Py_GIL_DISABLED
194
662M
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
662M
}
Unexecuted instantiation: memoryobject.c:Py_SET_REFCNT
moduleobject.c:Py_SET_REFCNT
Line
Count
Source
151
796
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
796
    assert(refcnt >= 0);
153
#if defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000
154
    // Stable ABI implements Py_SET_REFCNT() as a function call
155
    // on limited C API version 3.13 and newer.
156
    _Py_SetRefcnt(ob, refcnt);
157
#else
158
    // This immortal check is for code that is unaware of immortal objects.
159
    // The runtime tracks these objects and we should avoid as much
160
    // as possible having extensions inadvertently change the refcnt
161
    // of an immortalized object.
162
796
    if (_Py_IsImmortal(ob)) {
163
796
        return;
164
796
    }
165
0
#ifndef Py_GIL_DISABLED
166
0
#if SIZEOF_VOID_P > 4
167
0
    ob->ob_refcnt = (PY_UINT32_T)refcnt;
168
#else
169
    ob->ob_refcnt = refcnt;
170
#endif
171
#else
172
    if (_Py_IsOwnedByCurrentThread(ob)) {
173
        if ((size_t)refcnt > (size_t)UINT32_MAX) {
174
            // On overflow, make the object immortal
175
            ob->ob_tid = _Py_UNOWNED_TID;
176
            ob->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
177
            ob->ob_ref_shared = 0;
178
        }
179
        else {
180
            // Set local refcount to desired refcount and shared refcount
181
            // to zero, but preserve the shared refcount flags.
182
            ob->ob_ref_local = _Py_STATIC_CAST(uint32_t, refcnt);
183
            ob->ob_ref_shared &= _Py_REF_SHARED_FLAG_MASK;
184
        }
185
    }
186
    else {
187
        // Set local refcount to zero and shared refcount to desired refcount.
188
        // Mark the object as merged.
189
        ob->ob_tid = _Py_UNOWNED_TID;
190
        ob->ob_ref_local = 0;
191
        ob->ob_ref_shared = _Py_REF_SHARED(refcnt, _Py_REF_MERGED);
192
    }
193
#endif  // Py_GIL_DISABLED
194
0
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
0
}
object.c:Py_SET_REFCNT
Line
Count
Source
151
46.5M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
46.5M
    assert(refcnt >= 0);
153
#if defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000
154
    // Stable ABI implements Py_SET_REFCNT() as a function call
155
    // on limited C API version 3.13 and newer.
156
    _Py_SetRefcnt(ob, refcnt);
157
#else
158
    // This immortal check is for code that is unaware of immortal objects.
159
    // The runtime tracks these objects and we should avoid as much
160
    // as possible having extensions inadvertently change the refcnt
161
    // of an immortalized object.
162
46.5M
    if (_Py_IsImmortal(ob)) {
163
0
        return;
164
0
    }
165
46.5M
#ifndef Py_GIL_DISABLED
166
46.5M
#if SIZEOF_VOID_P > 4
167
46.5M
    ob->ob_refcnt = (PY_UINT32_T)refcnt;
168
#else
169
    ob->ob_refcnt = refcnt;
170
#endif
171
#else
172
    if (_Py_IsOwnedByCurrentThread(ob)) {
173
        if ((size_t)refcnt > (size_t)UINT32_MAX) {
174
            // On overflow, make the object immortal
175
            ob->ob_tid = _Py_UNOWNED_TID;
176
            ob->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
177
            ob->ob_ref_shared = 0;
178
        }
179
        else {
180
            // Set local refcount to desired refcount and shared refcount
181
            // to zero, but preserve the shared refcount flags.
182
            ob->ob_ref_local = _Py_STATIC_CAST(uint32_t, refcnt);
183
            ob->ob_ref_shared &= _Py_REF_SHARED_FLAG_MASK;
184
        }
185
    }
186
    else {
187
        // Set local refcount to zero and shared refcount to desired refcount.
188
        // Mark the object as merged.
189
        ob->ob_tid = _Py_UNOWNED_TID;
190
        ob->ob_ref_local = 0;
191
        ob->ob_ref_shared = _Py_REF_SHARED(refcnt, _Py_REF_MERGED);
192
    }
193
#endif  // Py_GIL_DISABLED
194
46.5M
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
46.5M
}
Unexecuted instantiation: obmalloc.c:Py_SET_REFCNT
Unexecuted instantiation: picklebufobject.c:Py_SET_REFCNT
Unexecuted instantiation: rangeobject.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
151
881k
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
881k
    assert(refcnt >= 0);
153
#if defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000
154
    // Stable ABI implements Py_SET_REFCNT() as a function call
155
    // on limited C API version 3.13 and newer.
156
    _Py_SetRefcnt(ob, refcnt);
157
#else
158
    // This immortal check is for code that is unaware of immortal objects.
159
    // The runtime tracks these objects and we should avoid as much
160
    // as possible having extensions inadvertently change the refcnt
161
    // of an immortalized object.
162
881k
    if (_Py_IsImmortal(ob)) {
163
0
        return;
164
0
    }
165
881k
#ifndef Py_GIL_DISABLED
166
881k
#if SIZEOF_VOID_P > 4
167
881k
    ob->ob_refcnt = (PY_UINT32_T)refcnt;
168
#else
169
    ob->ob_refcnt = refcnt;
170
#endif
171
#else
172
    if (_Py_IsOwnedByCurrentThread(ob)) {
173
        if ((size_t)refcnt > (size_t)UINT32_MAX) {
174
            // On overflow, make the object immortal
175
            ob->ob_tid = _Py_UNOWNED_TID;
176
            ob->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
177
            ob->ob_ref_shared = 0;
178
        }
179
        else {
180
            // Set local refcount to desired refcount and shared refcount
181
            // to zero, but preserve the shared refcount flags.
182
            ob->ob_ref_local = _Py_STATIC_CAST(uint32_t, refcnt);
183
            ob->ob_ref_shared &= _Py_REF_SHARED_FLAG_MASK;
184
        }
185
    }
186
    else {
187
        // Set local refcount to zero and shared refcount to desired refcount.
188
        // Mark the object as merged.
189
        ob->ob_tid = _Py_UNOWNED_TID;
190
        ob->ob_ref_local = 0;
191
        ob->ob_ref_shared = _Py_REF_SHARED(refcnt, _Py_REF_MERGED);
192
    }
193
#endif  // Py_GIL_DISABLED
194
881k
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
881k
}
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: 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: 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
151
193k
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
193k
    assert(refcnt >= 0);
153
#if defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000
154
    // Stable ABI implements Py_SET_REFCNT() as a function call
155
    // on limited C API version 3.13 and newer.
156
    _Py_SetRefcnt(ob, refcnt);
157
#else
158
    // This immortal check is for code that is unaware of immortal objects.
159
    // The runtime tracks these objects and we should avoid as much
160
    // as possible having extensions inadvertently change the refcnt
161
    // of an immortalized object.
162
193k
    if (_Py_IsImmortal(ob)) {
163
0
        return;
164
0
    }
165
193k
#ifndef Py_GIL_DISABLED
166
193k
#if SIZEOF_VOID_P > 4
167
193k
    ob->ob_refcnt = (PY_UINT32_T)refcnt;
168
#else
169
    ob->ob_refcnt = refcnt;
170
#endif
171
#else
172
    if (_Py_IsOwnedByCurrentThread(ob)) {
173
        if ((size_t)refcnt > (size_t)UINT32_MAX) {
174
            // On overflow, make the object immortal
175
            ob->ob_tid = _Py_UNOWNED_TID;
176
            ob->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
177
            ob->ob_ref_shared = 0;
178
        }
179
        else {
180
            // Set local refcount to desired refcount and shared refcount
181
            // to zero, but preserve the shared refcount flags.
182
            ob->ob_ref_local = _Py_STATIC_CAST(uint32_t, refcnt);
183
            ob->ob_ref_shared &= _Py_REF_SHARED_FLAG_MASK;
184
        }
185
    }
186
    else {
187
        // Set local refcount to zero and shared refcount to desired refcount.
188
        // Mark the object as merged.
189
        ob->ob_tid = _Py_UNOWNED_TID;
190
        ob->ob_ref_local = 0;
191
        ob->ob_ref_shared = _Py_REF_SHARED(refcnt, _Py_REF_MERGED);
192
    }
193
#endif  // Py_GIL_DISABLED
194
193k
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
193k
}
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
151
26.8M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
26.8M
    assert(refcnt >= 0);
153
#if defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000
154
    // Stable ABI implements Py_SET_REFCNT() as a function call
155
    // on limited C API version 3.13 and newer.
156
    _Py_SetRefcnt(ob, refcnt);
157
#else
158
    // This immortal check is for code that is unaware of immortal objects.
159
    // The runtime tracks these objects and we should avoid as much
160
    // as possible having extensions inadvertently change the refcnt
161
    // of an immortalized object.
162
26.8M
    if (_Py_IsImmortal(ob)) {
163
0
        return;
164
0
    }
165
26.8M
#ifndef Py_GIL_DISABLED
166
26.8M
#if SIZEOF_VOID_P > 4
167
26.8M
    ob->ob_refcnt = (PY_UINT32_T)refcnt;
168
#else
169
    ob->ob_refcnt = refcnt;
170
#endif
171
#else
172
    if (_Py_IsOwnedByCurrentThread(ob)) {
173
        if ((size_t)refcnt > (size_t)UINT32_MAX) {
174
            // On overflow, make the object immortal
175
            ob->ob_tid = _Py_UNOWNED_TID;
176
            ob->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
177
            ob->ob_ref_shared = 0;
178
        }
179
        else {
180
            // Set local refcount to desired refcount and shared refcount
181
            // to zero, but preserve the shared refcount flags.
182
            ob->ob_ref_local = _Py_STATIC_CAST(uint32_t, refcnt);
183
            ob->ob_ref_shared &= _Py_REF_SHARED_FLAG_MASK;
184
        }
185
    }
186
    else {
187
        // Set local refcount to zero and shared refcount to desired refcount.
188
        // Mark the object as merged.
189
        ob->ob_tid = _Py_UNOWNED_TID;
190
        ob->ob_ref_local = 0;
191
        ob->ob_ref_shared = _Py_REF_SHARED(refcnt, _Py_REF_MERGED);
192
    }
193
#endif  // Py_GIL_DISABLED
194
26.8M
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
26.8M
}
Unexecuted instantiation: interpolationobject.c:Py_SET_REFCNT
Unexecuted instantiation: iterobject.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
196
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
197
737M
#  define Py_SET_REFCNT(ob, refcnt) Py_SET_REFCNT(_PyObject_CAST(ob), (refcnt))
198
#endif
199
200
201
/*
202
The macros Py_INCREF(op) and Py_DECREF(op) are used to increment or decrement
203
reference counts.  Py_DECREF calls the object's deallocator function when
204
the refcount falls to 0; for
205
objects that don't contain references to other objects or heap memory
206
this can be the standard function free().  Both macros can be used
207
wherever a void expression is allowed.  The argument must not be a
208
NULL pointer.  If it may be NULL, use Py_XINCREF/Py_XDECREF instead.
209
The macro _Py_NewReference(op) initialize reference counts to 1, and
210
in special builds (Py_REF_DEBUG, Py_TRACE_REFS) performs additional
211
bookkeeping appropriate to the special build.
212
213
We assume that the reference count field can never overflow; this can
214
be proven when the size of the field is the same as the pointer size, so
215
we ignore the possibility.  Provided a C int is at least 32 bits (which
216
is implicitly assumed in many parts of this code), that's enough for
217
about 2**31 references to an object.
218
219
XXX The following became out of date in Python 2.2, but I'm not sure
220
XXX what the full truth is now.  Certainly, heap-allocated type objects
221
XXX can and should be deallocated.
222
Type objects should never be deallocated; the type pointer in an object
223
is not considered to be a reference to the type object, to save
224
complications in the deallocation function.  (This is actually a
225
decision that's up to the implementer of each new type so if you want,
226
you can count such references to the type object.)
227
*/
228
229
#if defined(Py_REF_DEBUG) && !defined(Py_LIMITED_API)
230
PyAPI_FUNC(void) _Py_NegativeRefcount(const char *filename, int lineno,
231
                                      PyObject *op);
232
PyAPI_FUNC(void) _Py_INCREF_IncRefTotal(void);
233
PyAPI_FUNC(void) _Py_DECREF_DecRefTotal(void);
234
#endif  // Py_REF_DEBUG && !Py_LIMITED_API
235
236
PyAPI_FUNC(void) _Py_Dealloc(PyObject *);
237
238
239
/*
240
These are provided as conveniences to Python runtime embedders, so that
241
they can have object code that is not dependent on Python compilation flags.
242
*/
243
PyAPI_FUNC(void) Py_IncRef(PyObject *);
244
PyAPI_FUNC(void) Py_DecRef(PyObject *);
245
246
// Similar to Py_IncRef() and Py_DecRef() but the argument must be non-NULL.
247
// Private functions used by Py_INCREF() and Py_DECREF().
248
PyAPI_FUNC(void) _Py_IncRef(PyObject *);
249
PyAPI_FUNC(void) _Py_DecRef(PyObject *);
250
251
static inline Py_ALWAYS_INLINE void Py_INCREF(PyObject *op)
252
19.7G
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
19.7G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
19.7G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
9.55G
        _Py_INCREF_IMMORTAL_STAT_INC();
285
9.55G
        return;
286
9.55G
    }
287
10.1G
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
10.1G
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
10.1G
#endif
303
10.1G
}
bytesobject.c:Py_INCREF
Line
Count
Source
252
90.0M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
90.0M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
90.0M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
87.7M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
87.7M
        return;
286
87.7M
    }
287
2.36M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
2.36M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
2.36M
#endif
303
2.36M
}
call.c:Py_INCREF
Line
Count
Source
252
31.6M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
31.6M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
31.6M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
11.1M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
11.1M
        return;
286
11.1M
    }
287
20.5M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
20.5M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
20.5M
#endif
303
20.5M
}
exceptions.c:Py_INCREF
Line
Count
Source
252
183M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
183M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
183M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
51.4M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
51.4M
        return;
286
51.4M
    }
287
131M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
131M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
131M
#endif
303
131M
}
genericaliasobject.c:Py_INCREF
Line
Count
Source
252
1.45k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
1.45k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.45k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.41k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.41k
        return;
286
1.41k
    }
287
36
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
36
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
36
#endif
303
36
}
floatobject.c:Py_INCREF
Line
Count
Source
252
1.14M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
1.14M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.14M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.14M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.14M
        return;
286
1.14M
    }
287
0
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
0
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
0
#endif
303
0
}
listobject.c:Py_INCREF
Line
Count
Source
252
1.41G
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
1.41G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.41G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
307M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
307M
        return;
286
307M
    }
287
1.11G
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
1.11G
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
1.11G
#endif
303
1.11G
}
longobject.c:Py_INCREF
Line
Count
Source
252
149M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
149M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
149M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
149M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
149M
        return;
286
149M
    }
287
38.4k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
38.4k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
38.4k
#endif
303
38.4k
}
dictobject.c:Py_INCREF
Line
Count
Source
252
1.97G
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
1.97G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.97G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
558M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
558M
        return;
286
558M
    }
287
1.41G
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
1.41G
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
1.41G
#endif
303
1.41G
}
memoryobject.c:Py_INCREF
Line
Count
Source
252
2.83M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
2.83M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
2.83M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
0
        _Py_INCREF_IMMORTAL_STAT_INC();
285
0
        return;
286
0
    }
287
2.83M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
2.83M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
2.83M
#endif
303
2.83M
}
moduleobject.c:Py_INCREF
Line
Count
Source
252
6.75k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
6.75k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
6.75k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
5.85k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
5.85k
        return;
286
5.85k
    }
287
892
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
892
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
892
#endif
303
892
}
object.c:Py_INCREF
Line
Count
Source
252
1.18G
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
1.18G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.18G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
807M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
807M
        return;
286
807M
    }
287
376M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
376M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
376M
#endif
303
376M
}
Unexecuted instantiation: obmalloc.c:Py_INCREF
Unexecuted instantiation: picklebufobject.c:Py_INCREF
rangeobject.c:Py_INCREF
Line
Count
Source
252
112
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
112
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
112
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
84
        _Py_INCREF_IMMORTAL_STAT_INC();
285
84
        return;
286
84
    }
287
28
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
28
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
28
#endif
303
28
}
setobject.c:Py_INCREF
Line
Count
Source
252
12.6M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
12.6M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
12.6M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
966k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
966k
        return;
286
966k
    }
287
11.7M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
11.7M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
11.7M
#endif
303
11.7M
}
sliceobject.c:Py_INCREF
Line
Count
Source
252
79.9M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
79.9M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
79.9M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
79.9M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
79.9M
        return;
286
79.9M
    }
287
1.35k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
1.35k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
1.35k
#endif
303
1.35k
}
Unexecuted instantiation: structseq.c:Py_INCREF
templateobject.c:Py_INCREF
Line
Count
Source
252
4
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
4
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
4
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
2
        _Py_INCREF_IMMORTAL_STAT_INC();
285
2
        return;
286
2
    }
287
2
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
2
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
2
#endif
303
2
}
tupleobject.c:Py_INCREF
Line
Count
Source
252
8.78G
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
8.78G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
8.78G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
4.37G
        _Py_INCREF_IMMORTAL_STAT_INC();
285
4.37G
        return;
286
4.37G
    }
287
4.40G
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
4.40G
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
4.40G
#endif
303
4.40G
}
typeobject.c:Py_INCREF
Line
Count
Source
252
427M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
427M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
427M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
177M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
177M
        return;
286
177M
    }
287
249M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
249M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
249M
#endif
303
249M
}
typevarobject.c:Py_INCREF
Line
Count
Source
252
240
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
240
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
240
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
148
        _Py_INCREF_IMMORTAL_STAT_INC();
285
148
        return;
286
148
    }
287
92
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
92
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
92
#endif
303
92
}
unicode_format.c:Py_INCREF
Line
Count
Source
252
57.1M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
57.1M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
57.1M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
22.1M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
22.1M
        return;
286
22.1M
    }
287
34.9M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
34.9M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
34.9M
#endif
303
34.9M
}
Unexecuted instantiation: unicode_formatter.c:Py_INCREF
unicode_writer.c:Py_INCREF
Line
Count
Source
252
9.16k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
9.16k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
9.16k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
0
        _Py_INCREF_IMMORTAL_STAT_INC();
285
0
        return;
286
0
    }
287
9.16k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
9.16k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
9.16k
#endif
303
9.16k
}
Unexecuted instantiation: unicodectype.c:Py_INCREF
unicodeobject.c:Py_INCREF
Line
Count
Source
252
848M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
848M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
848M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
742M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
742M
        return;
286
742M
    }
287
106M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
106M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
106M
#endif
303
106M
}
Unexecuted instantiation: unionobject.c:Py_INCREF
weakrefobject.c:Py_INCREF
Line
Count
Source
252
373k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
373k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
373k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
2.33k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
2.33k
        return;
286
2.33k
    }
287
370k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
370k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
370k
#endif
303
370k
}
_warnings.c:Py_INCREF
Line
Count
Source
252
4.52M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
4.52M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
4.52M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
2.30M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
2.30M
        return;
286
2.30M
    }
287
2.21M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
2.21M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
2.21M
#endif
303
2.21M
}
bltinmodule.c:Py_INCREF
Line
Count
Source
252
98.0M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
98.0M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
98.0M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
46.1M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
46.1M
        return;
286
46.1M
    }
287
51.8M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
51.8M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
51.8M
#endif
303
51.8M
}
ceval.c:Py_INCREF
Line
Count
Source
252
1.89G
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
1.89G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.89G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.07G
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.07G
        return;
286
1.07G
    }
287
827M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
827M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
827M
#endif
303
827M
}
codecs.c:Py_INCREF
Line
Count
Source
252
4.77M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
4.77M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
4.77M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
340k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
340k
        return;
286
340k
    }
287
4.43M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
4.43M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
4.43M
#endif
303
4.43M
}
codegen.c:Py_INCREF
Line
Count
Source
252
3.49k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
3.49k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
3.49k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
3.48k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
3.48k
        return;
286
3.48k
    }
287
6
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
6
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
6
#endif
303
6
}
compile.c:Py_INCREF
Line
Count
Source
252
137k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
137k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
137k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
59.9k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
59.9k
        return;
286
59.9k
    }
287
77.7k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
77.7k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
77.7k
#endif
303
77.7k
}
context.c:Py_INCREF
Line
Count
Source
252
42
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
42
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
42
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
13
        _Py_INCREF_IMMORTAL_STAT_INC();
285
13
        return;
286
13
    }
287
29
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
29
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
29
#endif
303
29
}
errors.c:Py_INCREF
Line
Count
Source
252
96.5M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
96.5M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
96.5M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
41.8M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
41.8M
        return;
286
41.8M
    }
287
54.7M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
54.7M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
54.7M
#endif
303
54.7M
}
flowgraph.c:Py_INCREF
Line
Count
Source
252
115k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
115k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
115k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
56.7k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
56.7k
        return;
286
56.7k
    }
287
58.4k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
58.4k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
58.4k
#endif
303
58.4k
}
frame.c:Py_INCREF
Line
Count
Source
252
52.6M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
52.6M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
52.6M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
0
        _Py_INCREF_IMMORTAL_STAT_INC();
285
0
        return;
286
0
    }
287
52.6M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
52.6M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
52.6M
#endif
303
52.6M
}
Unexecuted instantiation: future.c:Py_INCREF
gc.c:Py_INCREF
Line
Count
Source
252
464M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
464M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
464M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
402M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
402M
        return;
286
402M
    }
287
62.2M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
62.2M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
62.2M
#endif
303
62.2M
}
Unexecuted instantiation: gc_gil.c:Py_INCREF
getargs.c:Py_INCREF
Line
Count
Source
252
2.75M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
2.75M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
2.75M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
2.08M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
2.08M
        return;
286
2.08M
    }
287
674k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
674k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
674k
#endif
303
674k
}
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
252
9.05M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
9.05M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
9.05M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
2.60M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
2.60M
        return;
286
2.60M
    }
287
6.45M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
6.45M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
6.45M
#endif
303
6.45M
}
importdl.c:Py_INCREF
Line
Count
Source
252
932
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
932
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
932
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
730
        _Py_INCREF_IMMORTAL_STAT_INC();
285
730
        return;
286
730
    }
287
202
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
202
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
202
#endif
303
202
}
initconfig.c:Py_INCREF
Line
Count
Source
252
476
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
476
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
476
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
476
        _Py_INCREF_IMMORTAL_STAT_INC();
285
476
        return;
286
476
    }
287
0
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
0
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
0
#endif
303
0
}
Unexecuted instantiation: instrumentation.c:Py_INCREF
Unexecuted instantiation: instruction_sequence.c:Py_INCREF
intrinsics.c:Py_INCREF
Line
Count
Source
252
27.8k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
27.8k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
27.8k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
0
        _Py_INCREF_IMMORTAL_STAT_INC();
285
0
        return;
286
0
    }
287
27.8k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
27.8k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
27.8k
#endif
303
27.8k
}
Unexecuted instantiation: legacy_tracing.c:Py_INCREF
Unexecuted instantiation: lock.c:Py_INCREF
marshal.c:Py_INCREF
Line
Count
Source
252
1.46M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
1.46M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.46M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.33M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.33M
        return;
286
1.33M
    }
287
127k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
127k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
127k
#endif
303
127k
}
modsupport.c:Py_INCREF
Line
Count
Source
252
3.07M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
3.07M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
3.07M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
867k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
867k
        return;
286
867k
    }
287
2.21M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
2.21M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
2.21M
#endif
303
2.21M
}
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
252
28
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
28
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
28
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
0
        _Py_INCREF_IMMORTAL_STAT_INC();
285
0
        return;
286
0
    }
287
28
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
28
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
28
#endif
303
28
}
Unexecuted instantiation: pymath.c:Py_INCREF
pystate.c:Py_INCREF
Line
Count
Source
252
1.02M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
1.02M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.02M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
0
        _Py_INCREF_IMMORTAL_STAT_INC();
285
0
        return;
286
0
    }
287
1.02M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
1.02M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
1.02M
#endif
303
1.02M
}
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
structmember.c:Py_INCREF
Line
Count
Source
252
2.05M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
2.05M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
2.05M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.00M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.00M
        return;
286
1.00M
    }
287
1.05M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
1.05M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
1.05M
#endif
303
1.05M
}
symtable.c:Py_INCREF
Line
Count
Source
252
352k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
352k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
352k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
351k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
351k
        return;
286
351k
    }
287
840
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
840
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
840
#endif
303
840
}
sysmodule.c:Py_INCREF
Line
Count
Source
252
2.21k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
2.21k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
2.21k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.48k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.48k
        return;
286
1.48k
    }
287
721
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
721
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
721
#endif
303
721
}
Unexecuted instantiation: thread.c:Py_INCREF
traceback.c:Py_INCREF
Line
Count
Source
252
82.4M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
82.4M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
82.4M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
0
        _Py_INCREF_IMMORTAL_STAT_INC();
285
0
        return;
286
0
    }
287
82.4M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
82.4M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
82.4M
#endif
303
82.4M
}
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: 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
252
2
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
2
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
2
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
0
        _Py_INCREF_IMMORTAL_STAT_INC();
285
0
        return;
286
0
    }
287
2
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
2
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
2
#endif
303
2
}
Unexecuted instantiation: faulthandler.c:Py_INCREF
posixmodule.c:Py_INCREF
Line
Count
Source
252
3.76M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
3.76M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
3.76M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
731k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
731k
        return;
286
731k
    }
287
3.03M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
3.03M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
3.03M
#endif
303
3.03M
}
signalmodule.c:Py_INCREF
Line
Count
Source
252
1.79k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
1.79k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.79k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.79k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.79k
        return;
286
1.79k
    }
287
0
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
0
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
0
#endif
303
0
}
Unexecuted instantiation: _tracemalloc.c:Py_INCREF
Unexecuted instantiation: _suggestions.c:Py_INCREF
_datetimemodule.c:Py_INCREF
Line
Count
Source
252
294
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
294
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
294
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
230
        _Py_INCREF_IMMORTAL_STAT_INC();
285
230
        return;
286
230
    }
287
64
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
64
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
64
#endif
303
64
}
Unexecuted instantiation: _codecsmodule.c:Py_INCREF
_collectionsmodule.c:Py_INCREF
Line
Count
Source
252
26.6M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
26.6M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
26.6M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
23.8M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
23.8M
        return;
286
23.8M
    }
287
2.80M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
2.80M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
2.80M
#endif
303
2.80M
}
Unexecuted instantiation: errnomodule.c:Py_INCREF
_iomodule.c:Py_INCREF
Line
Count
Source
252
349
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
349
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
349
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
349
        _Py_INCREF_IMMORTAL_STAT_INC();
285
349
        return;
286
349
    }
287
0
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
0
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
0
#endif
303
0
}
iobase.c:Py_INCREF
Line
Count
Source
252
118k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
118k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
118k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
0
        _Py_INCREF_IMMORTAL_STAT_INC();
285
0
        return;
286
0
    }
287
118k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
118k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
118k
#endif
303
118k
}
Unexecuted instantiation: fileio.c:Py_INCREF
bytesio.c:Py_INCREF
Line
Count
Source
252
59.3k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
59.3k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
59.3k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
419
        _Py_INCREF_IMMORTAL_STAT_INC();
285
419
        return;
286
419
    }
287
58.9k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
58.9k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
58.9k
#endif
303
58.9k
}
bufferedio.c:Py_INCREF
Line
Count
Source
252
51.0k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
51.0k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
51.0k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
3
        _Py_INCREF_IMMORTAL_STAT_INC();
285
3
        return;
286
3
    }
287
51.0k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
51.0k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
51.0k
#endif
303
51.0k
}
textio.c:Py_INCREF
Line
Count
Source
252
542k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
542k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
542k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
20.9k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
20.9k
        return;
286
20.9k
    }
287
521k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
521k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
521k
#endif
303
521k
}
stringio.c:Py_INCREF
Line
Count
Source
252
22.6k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
22.6k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
22.6k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
100
        _Py_INCREF_IMMORTAL_STAT_INC();
285
100
        return;
286
100
    }
287
22.5k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
22.5k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
22.5k
#endif
303
22.5k
}
itertoolsmodule.c:Py_INCREF
Line
Count
Source
252
44.7k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
44.7k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
44.7k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
43.9k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
43.9k
        return;
286
43.9k
    }
287
816
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
816
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
816
#endif
303
816
}
sre.c:Py_INCREF
Line
Count
Source
252
233M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
233M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
233M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
76.3M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
76.3M
        return;
286
76.3M
    }
287
157M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
157M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
157M
#endif
303
157M
}
Unexecuted instantiation: _sysconfig.c:Py_INCREF
_threadmodule.c:Py_INCREF
Line
Count
Source
252
4
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
4
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
4
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
2
        _Py_INCREF_IMMORTAL_STAT_INC();
285
2
        return;
286
2
    }
287
2
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
2
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
2
#endif
303
2
}
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
252
30.1k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
30.1k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
30.1k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
29.9k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
29.9k
        return;
286
29.9k
    }
287
214
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
214
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
214
#endif
303
214
}
_functoolsmodule.c:Py_INCREF
Line
Count
Source
252
380k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
380k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
380k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
295
        _Py_INCREF_IMMORTAL_STAT_INC();
285
295
        return;
286
295
    }
287
379k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
379k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
379k
#endif
303
379k
}
Unexecuted instantiation: _localemodule.c:Py_INCREF
Unexecuted instantiation: _opcode.c:Py_INCREF
_operator.c:Py_INCREF
Line
Count
Source
252
1.32M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
1.32M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.32M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.28M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.28M
        return;
286
1.28M
    }
287
38.4k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
38.4k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
38.4k
#endif
303
38.4k
}
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
252
308
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
308
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
308
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
308
        _Py_INCREF_IMMORTAL_STAT_INC();
285
308
        return;
286
308
    }
287
0
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
0
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
0
#endif
303
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
252
776M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
776M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
776M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
411M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
411M
        return;
286
411M
    }
287
364M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
364M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
364M
#endif
303
364M
}
Unexecuted instantiation: boolobject.c:Py_INCREF
Unexecuted instantiation: bytes_methods.c:Py_INCREF
bytearrayobject.c:Py_INCREF
Line
Count
Source
252
310k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
310k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
310k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
0
        _Py_INCREF_IMMORTAL_STAT_INC();
285
0
        return;
286
0
    }
287
310k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
310k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
310k
#endif
303
310k
}
Unexecuted instantiation: capsule.c:Py_INCREF
cellobject.c:Py_INCREF
Line
Count
Source
252
159k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
159k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
159k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
58.4k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
58.4k
        return;
286
58.4k
    }
287
101k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
101k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
101k
#endif
303
101k
}
classobject.c:Py_INCREF
Line
Count
Source
252
95.8M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
95.8M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
95.8M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
10
        _Py_INCREF_IMMORTAL_STAT_INC();
285
10
        return;
286
10
    }
287
95.8M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
95.8M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
95.8M
#endif
303
95.8M
}
codeobject.c:Py_INCREF
Line
Count
Source
252
1.51M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
1.51M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.51M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
731k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
731k
        return;
286
731k
    }
287
784k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
784k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
784k
#endif
303
784k
}
complexobject.c:Py_INCREF
Line
Count
Source
252
3.00k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
3.00k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
3.00k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
3.00k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
3.00k
        return;
286
3.00k
    }
287
0
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
0
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
0
#endif
303
0
}
descrobject.c:Py_INCREF
Line
Count
Source
252
22.5M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
22.5M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
22.5M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
53.1k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
53.1k
        return;
286
53.1k
    }
287
22.4M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
22.4M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
22.4M
#endif
303
22.4M
}
enumobject.c:Py_INCREF
Line
Count
Source
252
101M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
101M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
101M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
0
        _Py_INCREF_IMMORTAL_STAT_INC();
285
0
        return;
286
0
    }
287
101M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
101M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
101M
#endif
303
101M
}
genobject.c:Py_INCREF
Line
Count
Source
252
46.1M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
46.1M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
46.1M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
46.0M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
46.0M
        return;
286
46.0M
    }
287
74.5k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
74.5k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
74.5k
#endif
303
74.5k
}
Unexecuted instantiation: fileobject.c:Py_INCREF
frameobject.c:Py_INCREF
Line
Count
Source
252
33.0M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
33.0M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
33.0M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
0
        _Py_INCREF_IMMORTAL_STAT_INC();
285
0
        return;
286
0
    }
287
33.0M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
33.0M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
33.0M
#endif
303
33.0M
}
funcobject.c:Py_INCREF
Line
Count
Source
252
88.2M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
88.2M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
88.2M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
40.3M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
40.3M
        return;
286
40.3M
    }
287
47.8M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
47.8M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
47.8M
#endif
303
47.8M
}
Unexecuted instantiation: interpolationobject.c:Py_INCREF
iterobject.c:Py_INCREF
Line
Count
Source
252
3.07M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
3.07M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
3.07M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
388k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
388k
        return;
286
388k
    }
287
2.68M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
2.68M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
2.68M
#endif
303
2.68M
}
odictobject.c:Py_INCREF
Line
Count
Source
252
376
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
376
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
376
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
352
        _Py_INCREF_IMMORTAL_STAT_INC();
285
352
        return;
286
352
    }
287
24
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
24
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
24
#endif
303
24
}
methodobject.c:Py_INCREF
Line
Count
Source
252
344M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
344M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
344M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
8.50M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
8.50M
        return;
286
8.50M
    }
287
336M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
336M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
336M
#endif
303
336M
}
Unexecuted instantiation: namespaceobject.c:Py_INCREF
Unexecuted instantiation: _contextvars.c:Py_INCREF
Python-ast.c:Py_INCREF
Line
Count
Source
252
412k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
412k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
412k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
208k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
208k
        return;
286
208k
    }
287
203k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
203k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
203k
#endif
303
203k
}
Unexecuted instantiation: Python-tokenize.c:Py_INCREF
Unexecuted instantiation: asdl.c:Py_INCREF
assemble.c:Py_INCREF
Line
Count
Source
252
57.8k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
57.8k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
57.8k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
57.7k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
57.7k
        return;
286
57.7k
    }
287
182
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
182
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
182
#endif
303
182
}
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
252
19.0k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
19.0k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
19.0k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
359
        _Py_INCREF_IMMORTAL_STAT_INC();
285
359
        return;
286
359
    }
287
18.7k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
18.7k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
18.7k
#endif
303
18.7k
}
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
Unexecuted instantiation: readline_tokenizer.c:Py_INCREF
Unexecuted instantiation: string_tokenizer.c:Py_INCREF
Unexecuted instantiation: utf8_tokenizer.c:Py_INCREF
Unexecuted instantiation: getcompiler.c:Py_INCREF
Unexecuted instantiation: mystrtoul.c:Py_INCREF
Unexecuted instantiation: token.c:Py_INCREF
Unexecuted instantiation: action_helpers.c:Py_INCREF
Unexecuted instantiation: string_parser.c:Py_INCREF
304
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
305
19.7G
#  define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op))
306
#endif
307
308
309
#if !defined(Py_LIMITED_API) && defined(Py_GIL_DISABLED)
310
// Implements Py_DECREF on objects not owned by the current thread.
311
PyAPI_FUNC(void) _Py_DecRefShared(PyObject *);
312
PyAPI_FUNC(void) _Py_DecRefSharedDebug(PyObject *, const char *, int);
313
314
// Called from Py_DECREF by the owning thread when the local refcount reaches
315
// zero. The call will deallocate the object if the shared refcount is also
316
// zero. Otherwise, the thread gives up ownership and merges the reference
317
// count fields.
318
PyAPI_FUNC(void) _Py_MergeZeroLocalRefcount(PyObject *);
319
#endif
320
321
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
322
// Stable ABI implements Py_DECREF() as a function call on limited C API
323
// version 3.12 and newer, and on Python built in debug mode. _Py_DecRef() was
324
// added to Python 3.10.0a7, use Py_DecRef() on older Python versions.
325
// Py_DecRef() accepts NULL whereas _Py_DecRef() doesn't.
326
7.70k
static inline void Py_DECREF(PyObject *op) {
327
7.70k
#  if Py_LIMITED_API+0 >= 0x030a00A7
328
7.70k
    _Py_DecRef(op);
329
#  else
330
    Py_DecRef(op);
331
#  endif
332
7.70k
}
errnomodule.c:Py_DECREF
Line
Count
Source
326
7.70k
static inline void Py_DECREF(PyObject *op) {
327
7.70k
#  if Py_LIMITED_API+0 >= 0x030a00A7
328
7.70k
    _Py_DecRef(op);
329
#  else
330
    Py_DecRef(op);
331
#  endif
332
7.70k
}
Unexecuted instantiation: _stat.c:Py_DECREF
333
7.70k
#define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op))
334
335
#elif defined(Py_GIL_DISABLED) && defined(Py_REF_DEBUG)
336
static inline void Py_DECREF(const char *filename, int lineno, PyObject *op)
337
{
338
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
339
    if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
340
        _Py_DECREF_IMMORTAL_STAT_INC();
341
        return;
342
    }
343
    _Py_DECREF_STAT_INC();
344
    _Py_DECREF_DecRefTotal();
345
    if (_Py_IsOwnedByCurrentThread(op)) {
346
        if (local == 0) {
347
            _Py_NegativeRefcount(filename, lineno, op);
348
        }
349
        local--;
350
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, local);
351
        if (local == 0) {
352
            _Py_MergeZeroLocalRefcount(op);
353
        }
354
    }
355
    else {
356
        _Py_DecRefSharedDebug(op, filename, lineno);
357
    }
358
}
359
#define Py_DECREF(op) Py_DECREF(__FILE__, __LINE__, _PyObject_CAST(op))
360
361
#elif defined(Py_GIL_DISABLED)
362
static inline void Py_DECREF(PyObject *op)
363
{
364
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
365
    if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
366
        _Py_DECREF_IMMORTAL_STAT_INC();
367
        return;
368
    }
369
    _Py_DECREF_STAT_INC();
370
    if (_Py_IsOwnedByCurrentThread(op)) {
371
        local--;
372
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, local);
373
        if (local == 0) {
374
            _Py_MergeZeroLocalRefcount(op);
375
        }
376
    }
377
    else {
378
        _Py_DecRefShared(op);
379
    }
380
}
381
#define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op))
382
383
#elif defined(Py_REF_DEBUG)
384
385
static inline void Py_DECREF(const char *filename, int lineno, PyObject *op)
386
{
387
#if SIZEOF_VOID_P > 4
388
    /* If an object has been freed, it will have a negative full refcnt
389
     * If it has not it been freed, will have a very large refcnt */
390
    if (op->ob_refcnt_full <= 0 || op->ob_refcnt > (((PY_UINT32_T)-1) - (1<<20))) {
391
#else
392
    if (op->ob_refcnt <= 0) {
393
#endif
394
        _Py_NegativeRefcount(filename, lineno, op);
395
    }
396
    if (_Py_IsImmortal(op)) {
397
        _Py_DECREF_IMMORTAL_STAT_INC();
398
        return;
399
    }
400
    _Py_DECREF_STAT_INC();
401
    _Py_DECREF_DecRefTotal();
402
    if (--op->ob_refcnt == 0) {
403
        _Py_Dealloc(op);
404
    }
405
}
406
#define Py_DECREF(op) Py_DECREF(__FILE__, __LINE__, _PyObject_CAST(op))
407
408
#else
409
410
static inline Py_ALWAYS_INLINE void Py_DECREF(PyObject *op)
411
19.8G
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
19.8G
    if (_Py_IsImmortal(op)) {
415
10.0G
        _Py_DECREF_IMMORTAL_STAT_INC();
416
10.0G
        return;
417
10.0G
    }
418
9.80G
    _Py_DECREF_STAT_INC();
419
9.80G
    if (--op->ob_refcnt == 0) {
420
1.49G
        _Py_Dealloc(op);
421
1.49G
    }
422
9.80G
}
bytesobject.c:Py_DECREF
Line
Count
Source
411
6.15M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
6.15M
    if (_Py_IsImmortal(op)) {
415
5.89M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
5.89M
        return;
417
5.89M
    }
418
258k
    _Py_DECREF_STAT_INC();
419
258k
    if (--op->ob_refcnt == 0) {
420
182k
        _Py_Dealloc(op);
421
182k
    }
422
258k
}
call.c:Py_DECREF
Line
Count
Source
411
218M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
218M
    if (_Py_IsImmortal(op)) {
415
85.5M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
85.5M
        return;
417
85.5M
    }
418
133M
    _Py_DECREF_STAT_INC();
419
133M
    if (--op->ob_refcnt == 0) {
420
93.8M
        _Py_Dealloc(op);
421
93.8M
    }
422
133M
}
exceptions.c:Py_DECREF
Line
Count
Source
411
206M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
206M
    if (_Py_IsImmortal(op)) {
415
53.4M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
53.4M
        return;
417
53.4M
    }
418
153M
    _Py_DECREF_STAT_INC();
419
153M
    if (--op->ob_refcnt == 0) {
420
103M
        _Py_Dealloc(op);
421
103M
    }
422
153M
}
genericaliasobject.c:Py_DECREF
Line
Count
Source
411
202
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
202
    if (_Py_IsImmortal(op)) {
415
85
        _Py_DECREF_IMMORTAL_STAT_INC();
416
85
        return;
417
85
    }
418
117
    _Py_DECREF_STAT_INC();
419
117
    if (--op->ob_refcnt == 0) {
420
101
        _Py_Dealloc(op);
421
101
    }
422
117
}
floatobject.c:Py_DECREF
Line
Count
Source
411
151k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
151k
    if (_Py_IsImmortal(op)) {
415
5
        _Py_DECREF_IMMORTAL_STAT_INC();
416
5
        return;
417
5
    }
418
151k
    _Py_DECREF_STAT_INC();
419
151k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
151k
}
listobject.c:Py_DECREF
Line
Count
Source
411
1.79G
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.79G
    if (_Py_IsImmortal(op)) {
415
488M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
488M
        return;
417
488M
    }
418
1.30G
    _Py_DECREF_STAT_INC();
419
1.30G
    if (--op->ob_refcnt == 0) {
420
308M
        _Py_Dealloc(op);
421
308M
    }
422
1.30G
}
longobject.c:Py_DECREF
Line
Count
Source
411
20.2M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
20.2M
    if (_Py_IsImmortal(op)) {
415
6.86M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
6.86M
        return;
417
6.86M
    }
418
13.3M
    _Py_DECREF_STAT_INC();
419
13.3M
    if (--op->ob_refcnt == 0) {
420
3.59M
        _Py_Dealloc(op);
421
3.59M
    }
422
13.3M
}
dictobject.c:Py_DECREF
Line
Count
Source
411
1.39G
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.39G
    if (_Py_IsImmortal(op)) {
415
660M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
660M
        return;
417
660M
    }
418
737M
    _Py_DECREF_STAT_INC();
419
737M
    if (--op->ob_refcnt == 0) {
420
130M
        _Py_Dealloc(op);
421
130M
    }
422
737M
}
memoryobject.c:Py_DECREF
Line
Count
Source
411
2.98M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2.98M
    if (_Py_IsImmortal(op)) {
415
106k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
106k
        return;
417
106k
    }
418
2.88M
    _Py_DECREF_STAT_INC();
419
2.88M
    if (--op->ob_refcnt == 0) {
420
1.36M
        _Py_Dealloc(op);
421
1.36M
    }
422
2.88M
}
moduleobject.c:Py_DECREF
Line
Count
Source
411
3.14M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
3.14M
    if (_Py_IsImmortal(op)) {
415
3.09M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
3.09M
        return;
417
3.09M
    }
418
45.5k
    _Py_DECREF_STAT_INC();
419
45.5k
    if (--op->ob_refcnt == 0) {
420
4.43k
        _Py_Dealloc(op);
421
4.43k
    }
422
45.5k
}
object.c:Py_DECREF
Line
Count
Source
411
1.02G
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.02G
    if (_Py_IsImmortal(op)) {
415
770M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
770M
        return;
417
770M
    }
418
249M
    _Py_DECREF_STAT_INC();
419
249M
    if (--op->ob_refcnt == 0) {
420
12.2k
        _Py_Dealloc(op);
421
12.2k
    }
422
249M
}
Unexecuted instantiation: obmalloc.c:Py_DECREF
Unexecuted instantiation: picklebufobject.c:Py_DECREF
rangeobject.c:Py_DECREF
Line
Count
Source
411
60.2M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
60.2M
    if (_Py_IsImmortal(op)) {
415
58.2M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
58.2M
        return;
417
58.2M
    }
418
1.93M
    _Py_DECREF_STAT_INC();
419
1.93M
    if (--op->ob_refcnt == 0) {
420
932k
        _Py_Dealloc(op);
421
932k
    }
422
1.93M
}
setobject.c:Py_DECREF
Line
Count
Source
411
17.7M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
17.7M
    if (_Py_IsImmortal(op)) {
415
6.19M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
6.19M
        return;
417
6.19M
    }
418
11.5M
    _Py_DECREF_STAT_INC();
419
11.5M
    if (--op->ob_refcnt == 0) {
420
1.52M
        _Py_Dealloc(op);
421
1.52M
    }
422
11.5M
}
sliceobject.c:Py_DECREF
Line
Count
Source
411
220M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
220M
    if (_Py_IsImmortal(op)) {
415
153M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
153M
        return;
417
153M
    }
418
67.3M
    _Py_DECREF_STAT_INC();
419
67.3M
    if (--op->ob_refcnt == 0) {
420
22.3M
        _Py_Dealloc(op);
421
22.3M
    }
422
67.3M
}
structseq.c:Py_DECREF
Line
Count
Source
411
9.51M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
9.51M
    if (_Py_IsImmortal(op)) {
415
2.82M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.82M
        return;
417
2.82M
    }
418
6.69M
    _Py_DECREF_STAT_INC();
419
6.69M
    if (--op->ob_refcnt == 0) {
420
6.18M
        _Py_Dealloc(op);
421
6.18M
    }
422
6.69M
}
templateobject.c:Py_DECREF
Line
Count
Source
411
4
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
4
    if (_Py_IsImmortal(op)) {
415
2
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2
        return;
417
2
    }
418
2
    _Py_DECREF_STAT_INC();
419
2
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
2
}
tupleobject.c:Py_DECREF
Line
Count
Source
411
9.09G
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
9.09G
    if (_Py_IsImmortal(op)) {
415
4.44G
        _Py_DECREF_IMMORTAL_STAT_INC();
416
4.44G
        return;
417
4.44G
    }
418
4.64G
    _Py_DECREF_STAT_INC();
419
4.64G
    if (--op->ob_refcnt == 0) {
420
117M
        _Py_Dealloc(op);
421
117M
    }
422
4.64G
}
typeobject.c:Py_DECREF
Line
Count
Source
411
573M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
573M
    if (_Py_IsImmortal(op)) {
415
118M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
118M
        return;
417
118M
    }
418
455M
    _Py_DECREF_STAT_INC();
419
455M
    if (--op->ob_refcnt == 0) {
420
46.9M
        _Py_Dealloc(op);
421
46.9M
    }
422
455M
}
typevarobject.c:Py_DECREF
Line
Count
Source
411
300
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
300
    if (_Py_IsImmortal(op)) {
415
72
        _Py_DECREF_IMMORTAL_STAT_INC();
416
72
        return;
417
72
    }
418
228
    _Py_DECREF_STAT_INC();
419
228
    if (--op->ob_refcnt == 0) {
420
64
        _Py_Dealloc(op);
421
64
    }
422
228
}
unicode_format.c:Py_DECREF
Line
Count
Source
411
79.2M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
79.2M
    if (_Py_IsImmortal(op)) {
415
22.1M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
22.1M
        return;
417
22.1M
    }
418
57.0M
    _Py_DECREF_STAT_INC();
419
57.0M
    if (--op->ob_refcnt == 0) {
420
16.4M
        _Py_Dealloc(op);
421
16.4M
    }
422
57.0M
}
unicode_formatter.c:Py_DECREF
Line
Count
Source
411
256
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
256
    if (_Py_IsImmortal(op)) {
415
192
        _Py_DECREF_IMMORTAL_STAT_INC();
416
192
        return;
417
192
    }
418
64
    _Py_DECREF_STAT_INC();
419
64
    if (--op->ob_refcnt == 0) {
420
64
        _Py_Dealloc(op);
421
64
    }
422
64
}
unicode_writer.c:Py_DECREF
Line
Count
Source
411
17.1M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
17.1M
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
17.1M
    _Py_DECREF_STAT_INC();
419
17.1M
    if (--op->ob_refcnt == 0) {
420
17.1M
        _Py_Dealloc(op);
421
17.1M
    }
422
17.1M
}
Unexecuted instantiation: unicodectype.c:Py_DECREF
unicodeobject.c:Py_DECREF
Line
Count
Source
411
209M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
209M
    if (_Py_IsImmortal(op)) {
415
124M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
124M
        return;
417
124M
    }
418
84.9M
    _Py_DECREF_STAT_INC();
419
84.9M
    if (--op->ob_refcnt == 0) {
420
14.3M
        _Py_Dealloc(op);
421
14.3M
    }
422
84.9M
}
unionobject.c:Py_DECREF
Line
Count
Source
411
1.57k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.57k
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
1.57k
    _Py_DECREF_STAT_INC();
419
1.57k
    if (--op->ob_refcnt == 0) {
420
1.57k
        _Py_Dealloc(op);
421
1.57k
    }
422
1.57k
}
weakrefobject.c:Py_DECREF
Line
Count
Source
411
81.7k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
81.7k
    if (_Py_IsImmortal(op)) {
415
27.5k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
27.5k
        return;
417
27.5k
    }
418
54.2k
    _Py_DECREF_STAT_INC();
419
54.2k
    if (--op->ob_refcnt == 0) {
420
25.9k
        _Py_Dealloc(op);
421
25.9k
    }
422
54.2k
}
_warnings.c:Py_DECREF
Line
Count
Source
411
47.9M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
47.9M
    if (_Py_IsImmortal(op)) {
415
5.39M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
5.39M
        return;
417
5.39M
    }
418
42.5M
    _Py_DECREF_STAT_INC();
419
42.5M
    if (--op->ob_refcnt == 0) {
420
2.08M
        _Py_Dealloc(op);
421
2.08M
    }
422
42.5M
}
bltinmodule.c:Py_DECREF
Line
Count
Source
411
2.29G
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2.29G
    if (_Py_IsImmortal(op)) {
415
2.11G
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.11G
        return;
417
2.11G
    }
418
175M
    _Py_DECREF_STAT_INC();
419
175M
    if (--op->ob_refcnt == 0) {
420
119M
        _Py_Dealloc(op);
421
119M
    }
422
175M
}
ceval.c:Py_DECREF
Line
Count
Source
411
5.38k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
5.38k
    if (_Py_IsImmortal(op)) {
415
565
        _Py_DECREF_IMMORTAL_STAT_INC();
416
565
        return;
417
565
    }
418
4.82k
    _Py_DECREF_STAT_INC();
419
4.82k
    if (--op->ob_refcnt == 0) {
420
817
        _Py_Dealloc(op);
421
817
    }
422
4.82k
}
codecs.c:Py_DECREF
Line
Count
Source
411
10.2M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
10.2M
    if (_Py_IsImmortal(op)) {
415
3.67M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
3.67M
        return;
417
3.67M
    }
418
6.61M
    _Py_DECREF_STAT_INC();
419
6.61M
    if (--op->ob_refcnt == 0) {
420
3.17M
        _Py_Dealloc(op);
421
3.17M
    }
422
6.61M
}
codegen.c:Py_DECREF
Line
Count
Source
411
196k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
196k
    if (_Py_IsImmortal(op)) {
415
175k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
175k
        return;
417
175k
    }
418
21.1k
    _Py_DECREF_STAT_INC();
419
21.1k
    if (--op->ob_refcnt == 0) {
420
1.48k
        _Py_Dealloc(op);
421
1.48k
    }
422
21.1k
}
compile.c:Py_DECREF
Line
Count
Source
411
752k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
752k
    if (_Py_IsImmortal(op)) {
415
399k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
399k
        return;
417
399k
    }
418
352k
    _Py_DECREF_STAT_INC();
419
352k
    if (--op->ob_refcnt == 0) {
420
121k
        _Py_Dealloc(op);
421
121k
    }
422
352k
}
context.c:Py_DECREF
Line
Count
Source
411
56
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
56
    if (_Py_IsImmortal(op)) {
415
28
        _Py_DECREF_IMMORTAL_STAT_INC();
416
28
        return;
417
28
    }
418
28
    _Py_DECREF_STAT_INC();
419
28
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
28
}
errors.c:Py_DECREF
Line
Count
Source
411
102M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
102M
    if (_Py_IsImmortal(op)) {
415
41.8M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
41.8M
        return;
417
41.8M
    }
418
60.2M
    _Py_DECREF_STAT_INC();
419
60.2M
    if (--op->ob_refcnt == 0) {
420
20.8M
        _Py_Dealloc(op);
421
20.8M
    }
422
60.2M
}
flowgraph.c:Py_DECREF
Line
Count
Source
411
86.5k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
86.5k
    if (_Py_IsImmortal(op)) {
415
48.8k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
48.8k
        return;
417
48.8k
    }
418
37.7k
    _Py_DECREF_STAT_INC();
419
37.7k
    if (--op->ob_refcnt == 0) {
420
68
        _Py_Dealloc(op);
421
68
    }
422
37.7k
}
frame.c:Py_DECREF
Line
Count
Source
411
56.7M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
56.7M
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
56.7M
    _Py_DECREF_STAT_INC();
419
56.7M
    if (--op->ob_refcnt == 0) {
420
18.7M
        _Py_Dealloc(op);
421
18.7M
    }
422
56.7M
}
Unexecuted instantiation: future.c:Py_DECREF
gc.c:Py_DECREF
Line
Count
Source
411
726k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
726k
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
726k
    _Py_DECREF_STAT_INC();
419
726k
    if (--op->ob_refcnt == 0) {
420
480k
        _Py_Dealloc(op);
421
480k
    }
422
726k
}
Unexecuted instantiation: gc_gil.c:Py_DECREF
getargs.c:Py_DECREF
Line
Count
Source
411
8.36M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
8.36M
    if (_Py_IsImmortal(op)) {
415
7.59M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
7.59M
        return;
417
7.59M
    }
418
765k
    _Py_DECREF_STAT_INC();
419
765k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
765k
}
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
411
13.4M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
13.4M
    if (_Py_IsImmortal(op)) {
415
2.60M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.60M
        return;
417
2.60M
    }
418
10.8M
    _Py_DECREF_STAT_INC();
419
10.8M
    if (--op->ob_refcnt == 0) {
420
251k
        _Py_Dealloc(op);
421
251k
    }
422
10.8M
}
importdl.c:Py_DECREF
Line
Count
Source
411
2.11k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2.11k
    if (_Py_IsImmortal(op)) {
415
843
        _Py_DECREF_IMMORTAL_STAT_INC();
416
843
        return;
417
843
    }
418
1.26k
    _Py_DECREF_STAT_INC();
419
1.26k
    if (--op->ob_refcnt == 0) {
420
808
        _Py_Dealloc(op);
421
808
    }
422
1.26k
}
initconfig.c:Py_DECREF
Line
Count
Source
411
3.86k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
3.86k
    if (_Py_IsImmortal(op)) {
415
3.10k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
3.10k
        return;
417
3.10k
    }
418
756
    _Py_DECREF_STAT_INC();
419
756
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
756
}
instrumentation.c:Py_DECREF
Line
Count
Source
411
672
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
672
    if (_Py_IsImmortal(op)) {
415
420
        _Py_DECREF_IMMORTAL_STAT_INC();
416
420
        return;
417
420
    }
418
252
    _Py_DECREF_STAT_INC();
419
252
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
252
}
instruction_sequence.c:Py_DECREF
Line
Count
Source
411
1
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
1
    _Py_DECREF_STAT_INC();
419
1
    if (--op->ob_refcnt == 0) {
420
1
        _Py_Dealloc(op);
421
1
    }
422
1
}
intrinsics.c:Py_DECREF
Line
Count
Source
411
52.0k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
52.0k
    if (_Py_IsImmortal(op)) {
415
29.3k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
29.3k
        return;
417
29.3k
    }
418
22.7k
    _Py_DECREF_STAT_INC();
419
22.7k
    if (--op->ob_refcnt == 0) {
420
232
        _Py_Dealloc(op);
421
232
    }
422
22.7k
}
Unexecuted instantiation: legacy_tracing.c:Py_DECREF
Unexecuted instantiation: lock.c:Py_DECREF
marshal.c:Py_DECREF
Line
Count
Source
411
1.39M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.39M
    if (_Py_IsImmortal(op)) {
415
581k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
581k
        return;
417
581k
    }
418
817k
    _Py_DECREF_STAT_INC();
419
817k
    if (--op->ob_refcnt == 0) {
420
7.38k
        _Py_Dealloc(op);
421
7.38k
    }
422
817k
}
modsupport.c:Py_DECREF
Line
Count
Source
411
29.3k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
29.3k
    if (_Py_IsImmortal(op)) {
415
19.5k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
19.5k
        return;
417
19.5k
    }
418
9.79k
    _Py_DECREF_STAT_INC();
419
9.79k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
9.79k
}
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
411
4.44M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
4.44M
    if (_Py_IsImmortal(op)) {
415
3.74M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
3.74M
        return;
417
3.74M
    }
418
703k
    _Py_DECREF_STAT_INC();
419
703k
    if (--op->ob_refcnt == 0) {
420
21.0k
        _Py_Dealloc(op);
421
21.0k
    }
422
703k
}
Unexecuted instantiation: pyctype.c:Py_DECREF
Unexecuted instantiation: pyhash.c:Py_DECREF
pylifecycle.c:Py_DECREF
Line
Count
Source
411
1.00k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.00k
    if (_Py_IsImmortal(op)) {
415
196
        _Py_DECREF_IMMORTAL_STAT_INC();
416
196
        return;
417
196
    }
418
812
    _Py_DECREF_STAT_INC();
419
812
    if (--op->ob_refcnt == 0) {
420
84
        _Py_Dealloc(op);
421
84
    }
422
812
}
Unexecuted instantiation: pymath.c:Py_DECREF
Unexecuted instantiation: pystate.c:Py_DECREF
pythonrun.c:Py_DECREF
Line
Count
Source
411
664
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
664
    if (_Py_IsImmortal(op)) {
415
196
        _Py_DECREF_IMMORTAL_STAT_INC();
416
196
        return;
417
196
    }
418
468
    _Py_DECREF_STAT_INC();
419
468
    if (--op->ob_refcnt == 0) {
420
184
        _Py_Dealloc(op);
421
184
    }
422
468
}
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
411
2.33M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2.33M
    if (_Py_IsImmortal(op)) {
415
1.40M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
1.40M
        return;
417
1.40M
    }
418
928k
    _Py_DECREF_STAT_INC();
419
928k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
928k
}
structmember.c:Py_DECREF
Line
Count
Source
411
1.66k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.66k
    if (_Py_IsImmortal(op)) {
415
1.29k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
1.29k
        return;
417
1.29k
    }
418
370
    _Py_DECREF_STAT_INC();
419
370
    if (--op->ob_refcnt == 0) {
420
30
        _Py_Dealloc(op);
421
30
    }
422
370
}
symtable.c:Py_DECREF
Line
Count
Source
411
1.01M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.01M
    if (_Py_IsImmortal(op)) {
415
475k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
475k
        return;
417
475k
    }
418
544k
    _Py_DECREF_STAT_INC();
419
544k
    if (--op->ob_refcnt == 0) {
420
252k
        _Py_Dealloc(op);
421
252k
    }
422
544k
}
sysmodule.c:Py_DECREF
Line
Count
Source
411
4.80M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
4.80M
    if (_Py_IsImmortal(op)) {
415
1.11M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
1.11M
        return;
417
1.11M
    }
418
3.69M
    _Py_DECREF_STAT_INC();
419
3.69M
    if (--op->ob_refcnt == 0) {
420
2.74M
        _Py_Dealloc(op);
421
2.74M
    }
422
3.69M
}
Unexecuted instantiation: thread.c:Py_DECREF
traceback.c:Py_DECREF
Line
Count
Source
411
164M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
164M
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
164M
    _Py_DECREF_STAT_INC();
419
164M
    if (--op->ob_refcnt == 0) {
420
49.0M
        _Py_Dealloc(op);
421
49.0M
    }
422
164M
}
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
411
10.1k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
10.1k
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
10.1k
    _Py_DECREF_STAT_INC();
419
10.1k
    if (--op->ob_refcnt == 0) {
420
10.1k
        _Py_Dealloc(op);
421
10.1k
    }
422
10.1k
}
Unexecuted instantiation: suggestions.c:Py_DECREF
Unexecuted instantiation: perf_trampoline.c:Py_DECREF
Unexecuted instantiation: perf_jit_trampoline.c:Py_DECREF
Unexecuted instantiation: remote_debugging.c:Py_DECREF
Unexecuted instantiation: dynload_shlib.c:Py_DECREF
Unexecuted instantiation: config.c:Py_DECREF
Unexecuted instantiation: gcmodule.c:Py_DECREF
Unexecuted instantiation: _asynciomodule.c:Py_DECREF
atexitmodule.c:Py_DECREF
Line
Count
Source
411
2
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
2
    _Py_DECREF_STAT_INC();
419
2
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
2
}
Unexecuted instantiation: faulthandler.c:Py_DECREF
posixmodule.c:Py_DECREF
Line
Count
Source
411
5.13M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
5.13M
    if (_Py_IsImmortal(op)) {
415
1.87M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
1.87M
        return;
417
1.87M
    }
418
3.25M
    _Py_DECREF_STAT_INC();
419
3.25M
    if (--op->ob_refcnt == 0) {
420
1.35M
        _Py_Dealloc(op);
421
1.35M
    }
422
3.25M
}
signalmodule.c:Py_DECREF
Line
Count
Source
411
56
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
56
    if (_Py_IsImmortal(op)) {
415
28
        _Py_DECREF_IMMORTAL_STAT_INC();
416
28
        return;
417
28
    }
418
28
    _Py_DECREF_STAT_INC();
419
28
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
28
}
Unexecuted instantiation: _tracemalloc.c:Py_DECREF
Unexecuted instantiation: _suggestions.c:Py_DECREF
_datetimemodule.c:Py_DECREF
Line
Count
Source
411
656
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
656
    if (_Py_IsImmortal(op)) {
415
121
        _Py_DECREF_IMMORTAL_STAT_INC();
416
121
        return;
417
121
    }
418
535
    _Py_DECREF_STAT_INC();
419
535
    if (--op->ob_refcnt == 0) {
420
19
        _Py_Dealloc(op);
421
19
    }
422
535
}
Unexecuted instantiation: _codecsmodule.c:Py_DECREF
_collectionsmodule.c:Py_DECREF
Line
Count
Source
411
104k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
104k
    if (_Py_IsImmortal(op)) {
415
41.3k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
41.3k
        return;
417
41.3k
    }
418
63.4k
    _Py_DECREF_STAT_INC();
419
63.4k
    if (--op->ob_refcnt == 0) {
420
46.6k
        _Py_Dealloc(op);
421
46.6k
    }
422
63.4k
}
_iomodule.c:Py_DECREF
Line
Count
Source
411
2.64M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2.64M
    if (_Py_IsImmortal(op)) {
415
2.48M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.48M
        return;
417
2.48M
    }
418
160k
    _Py_DECREF_STAT_INC();
419
160k
    if (--op->ob_refcnt == 0) {
420
78.8k
        _Py_Dealloc(op);
421
78.8k
    }
422
160k
}
iobase.c:Py_DECREF
Line
Count
Source
411
2.85M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2.85M
    if (_Py_IsImmortal(op)) {
415
2.74M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.74M
        return;
417
2.74M
    }
418
109k
    _Py_DECREF_STAT_INC();
419
109k
    if (--op->ob_refcnt == 0) {
420
54.7k
        _Py_Dealloc(op);
421
54.7k
    }
422
109k
}
fileio.c:Py_DECREF
Line
Count
Source
411
117k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
117k
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
117k
    _Py_DECREF_STAT_INC();
419
117k
    if (--op->ob_refcnt == 0) {
420
78.4k
        _Py_Dealloc(op);
421
78.4k
    }
422
117k
}
bytesio.c:Py_DECREF
Line
Count
Source
411
319k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
319k
    if (_Py_IsImmortal(op)) {
415
94.6k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
94.6k
        return;
417
94.6k
    }
418
225k
    _Py_DECREF_STAT_INC();
419
225k
    if (--op->ob_refcnt == 0) {
420
8.54k
        _Py_Dealloc(op);
421
8.54k
    }
422
225k
}
bufferedio.c:Py_DECREF
Line
Count
Source
411
10.0M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
10.0M
    if (_Py_IsImmortal(op)) {
415
9.56M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
9.56M
        return;
417
9.56M
    }
418
491k
    _Py_DECREF_STAT_INC();
419
491k
    if (--op->ob_refcnt == 0) {
420
389k
        _Py_Dealloc(op);
421
389k
    }
422
491k
}
textio.c:Py_DECREF
Line
Count
Source
411
971k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
971k
    if (_Py_IsImmortal(op)) {
415
264k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
264k
        return;
417
264k
    }
418
707k
    _Py_DECREF_STAT_INC();
419
707k
    if (--op->ob_refcnt == 0) {
420
230k
        _Py_Dealloc(op);
421
230k
    }
422
707k
}
stringio.c:Py_DECREF
Line
Count
Source
411
323k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
323k
    if (_Py_IsImmortal(op)) {
415
166k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
166k
        return;
417
166k
    }
418
156k
    _Py_DECREF_STAT_INC();
419
156k
    if (--op->ob_refcnt == 0) {
420
33.4k
        _Py_Dealloc(op);
421
33.4k
    }
422
156k
}
itertoolsmodule.c:Py_DECREF
Line
Count
Source
411
92.9k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
92.9k
    if (_Py_IsImmortal(op)) {
415
5.16k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
5.16k
        return;
417
5.16k
    }
418
87.7k
    _Py_DECREF_STAT_INC();
419
87.7k
    if (--op->ob_refcnt == 0) {
420
29.3k
        _Py_Dealloc(op);
421
29.3k
    }
422
87.7k
}
sre.c:Py_DECREF
Line
Count
Source
411
432M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
432M
    if (_Py_IsImmortal(op)) {
415
160M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
160M
        return;
417
160M
    }
418
271M
    _Py_DECREF_STAT_INC();
419
271M
    if (--op->ob_refcnt == 0) {
420
19.8M
        _Py_Dealloc(op);
421
19.8M
    }
422
271M
}
Unexecuted instantiation: _sysconfig.c:Py_DECREF
_threadmodule.c:Py_DECREF
Line
Count
Source
411
34.4k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
34.4k
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
34.4k
    _Py_DECREF_STAT_INC();
419
34.4k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
34.4k
}
Unexecuted instantiation: timemodule.c:Py_DECREF
Unexecuted instantiation: _typesmodule.c:Py_DECREF
Unexecuted instantiation: _typingmodule.c:Py_DECREF
Unexecuted instantiation: _weakref.c:Py_DECREF
_abc.c:Py_DECREF
Line
Count
Source
411
102k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
102k
    if (_Py_IsImmortal(op)) {
415
19.9k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
19.9k
        return;
417
19.9k
    }
418
82.7k
    _Py_DECREF_STAT_INC();
419
82.7k
    if (--op->ob_refcnt == 0) {
420
4.98k
        _Py_Dealloc(op);
421
4.98k
    }
422
82.7k
}
_functoolsmodule.c:Py_DECREF
Line
Count
Source
411
753k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
753k
    if (_Py_IsImmortal(op)) {
415
188k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
188k
        return;
417
188k
    }
418
565k
    _Py_DECREF_STAT_INC();
419
565k
    if (--op->ob_refcnt == 0) {
420
376k
        _Py_Dealloc(op);
421
376k
    }
422
565k
}
Unexecuted instantiation: _localemodule.c:Py_DECREF
Unexecuted instantiation: _opcode.c:Py_DECREF
_operator.c:Py_DECREF
Line
Count
Source
411
544k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
544k
    if (_Py_IsImmortal(op)) {
415
272k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
272k
        return;
417
272k
    }
418
272k
    _Py_DECREF_STAT_INC();
419
272k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
272k
}
Unexecuted instantiation: symtablemodule.c:Py_DECREF
Unexecuted instantiation: pwdmodule.c:Py_DECREF
getpath.c:Py_DECREF
Line
Count
Source
411
924
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
924
    if (_Py_IsImmortal(op)) {
415
336
        _Py_DECREF_IMMORTAL_STAT_INC();
416
336
        return;
417
336
    }
418
588
    _Py_DECREF_STAT_INC();
419
588
    if (--op->ob_refcnt == 0) {
420
28
        _Py_Dealloc(op);
421
28
    }
422
588
}
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
411
21.7k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
21.7k
    if (_Py_IsImmortal(op)) {
415
750
        _Py_DECREF_IMMORTAL_STAT_INC();
416
750
        return;
417
750
    }
418
20.9k
    _Py_DECREF_STAT_INC();
419
20.9k
    if (--op->ob_refcnt == 0) {
420
14.6k
        _Py_Dealloc(op);
421
14.6k
    }
422
20.9k
}
Unexecuted instantiation: myreadline.c:Py_DECREF
abstract.c:Py_DECREF
Line
Count
Source
411
711M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
711M
    if (_Py_IsImmortal(op)) {
415
424M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
424M
        return;
417
424M
    }
418
287M
    _Py_DECREF_STAT_INC();
419
287M
    if (--op->ob_refcnt == 0) {
420
2.32M
        _Py_Dealloc(op);
421
2.32M
    }
422
287M
}
Unexecuted instantiation: boolobject.c:Py_DECREF
Unexecuted instantiation: bytes_methods.c:Py_DECREF
bytearrayobject.c:Py_DECREF
Line
Count
Source
411
3.42M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
3.42M
    if (_Py_IsImmortal(op)) {
415
490k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
490k
        return;
417
490k
    }
418
2.93M
    _Py_DECREF_STAT_INC();
419
2.93M
    if (--op->ob_refcnt == 0) {
420
2.93M
        _Py_Dealloc(op);
421
2.93M
    }
422
2.93M
}
capsule.c:Py_DECREF
Line
Count
Source
411
10
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
10
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
10
    _Py_DECREF_STAT_INC();
419
10
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
10
}
cellobject.c:Py_DECREF
Line
Count
Source
411
531k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
531k
    if (_Py_IsImmortal(op)) {
415
63.8k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
63.8k
        return;
417
63.8k
    }
418
467k
    _Py_DECREF_STAT_INC();
419
467k
    if (--op->ob_refcnt == 0) {
420
321k
        _Py_Dealloc(op);
421
321k
    }
422
467k
}
classobject.c:Py_DECREF
Line
Count
Source
411
95.8M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
95.8M
    if (_Py_IsImmortal(op)) {
415
10
        _Py_DECREF_IMMORTAL_STAT_INC();
416
10
        return;
417
10
    }
418
95.8M
    _Py_DECREF_STAT_INC();
419
95.8M
    if (--op->ob_refcnt == 0) {
420
5.84k
        _Py_Dealloc(op);
421
5.84k
    }
422
95.8M
}
codeobject.c:Py_DECREF
Line
Count
Source
411
912k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
912k
    if (_Py_IsImmortal(op)) {
415
404k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
404k
        return;
417
404k
    }
418
508k
    _Py_DECREF_STAT_INC();
419
508k
    if (--op->ob_refcnt == 0) {
420
418k
        _Py_Dealloc(op);
421
418k
    }
422
508k
}
Unexecuted instantiation: complexobject.c:Py_DECREF
descrobject.c:Py_DECREF
Line
Count
Source
411
79.5M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
79.5M
    if (_Py_IsImmortal(op)) {
415
11.0M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
11.0M
        return;
417
11.0M
    }
418
68.5M
    _Py_DECREF_STAT_INC();
419
68.5M
    if (--op->ob_refcnt == 0) {
420
36.4M
        _Py_Dealloc(op);
421
36.4M
    }
422
68.5M
}
enumobject.c:Py_DECREF
Line
Count
Source
411
270M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
270M
    if (_Py_IsImmortal(op)) {
415
98.9M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
98.9M
        return;
417
98.9M
    }
418
171M
    _Py_DECREF_STAT_INC();
419
171M
    if (--op->ob_refcnt == 0) {
420
67.4M
        _Py_Dealloc(op);
421
67.4M
    }
422
171M
}
genobject.c:Py_DECREF
Line
Count
Source
411
58.5M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
58.5M
    if (_Py_IsImmortal(op)) {
415
58.5M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
58.5M
        return;
417
58.5M
    }
418
73.1k
    _Py_DECREF_STAT_INC();
419
73.1k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
73.1k
}
fileobject.c:Py_DECREF
Line
Count
Source
411
369k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
369k
    if (_Py_IsImmortal(op)) {
415
363k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
363k
        return;
417
363k
    }
418
5.80k
    _Py_DECREF_STAT_INC();
419
5.80k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
5.80k
}
frameobject.c:Py_DECREF
Line
Count
Source
411
37.9M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
37.9M
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
37.9M
    _Py_DECREF_STAT_INC();
419
37.9M
    if (--op->ob_refcnt == 0) {
420
8.33M
        _Py_Dealloc(op);
421
8.33M
    }
422
37.9M
}
funcobject.c:Py_DECREF
Line
Count
Source
411
121M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
121M
    if (_Py_IsImmortal(op)) {
415
69.3M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
69.3M
        return;
417
69.3M
    }
418
52.1M
    _Py_DECREF_STAT_INC();
419
52.1M
    if (--op->ob_refcnt == 0) {
420
568k
        _Py_Dealloc(op);
421
568k
    }
422
52.1M
}
interpolationobject.c:Py_DECREF
Line
Count
Source
411
28
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
28
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
28
    _Py_DECREF_STAT_INC();
419
28
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
28
}
iterobject.c:Py_DECREF
Line
Count
Source
411
3.46M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
3.46M
    if (_Py_IsImmortal(op)) {
415
776k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
776k
        return;
417
776k
    }
418
2.68M
    _Py_DECREF_STAT_INC();
419
2.68M
    if (--op->ob_refcnt == 0) {
420
388k
        _Py_Dealloc(op);
421
388k
    }
422
2.68M
}
odictobject.c:Py_DECREF
Line
Count
Source
411
768
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
768
    if (_Py_IsImmortal(op)) {
415
460
        _Py_DECREF_IMMORTAL_STAT_INC();
416
460
        return;
417
460
    }
418
308
    _Py_DECREF_STAT_INC();
419
308
    if (--op->ob_refcnt == 0) {
420
184
        _Py_Dealloc(op);
421
184
    }
422
308
}
methodobject.c:Py_DECREF
Line
Count
Source
411
344M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
344M
    if (_Py_IsImmortal(op)) {
415
8.48M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
8.48M
        return;
417
8.48M
    }
418
336M
    _Py_DECREF_STAT_INC();
419
336M
    if (--op->ob_refcnt == 0) {
420
250M
        _Py_Dealloc(op);
421
250M
    }
422
336M
}
namespaceobject.c:Py_DECREF
Line
Count
Source
411
28
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
28
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
28
    _Py_DECREF_STAT_INC();
419
28
    if (--op->ob_refcnt == 0) {
420
28
        _Py_Dealloc(op);
421
28
    }
422
28
}
Unexecuted instantiation: _contextvars.c:Py_DECREF
Python-ast.c:Py_DECREF
Line
Count
Source
411
2.84M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2.84M
    if (_Py_IsImmortal(op)) {
415
1.54M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
1.54M
        return;
417
1.54M
    }
418
1.30M
    _Py_DECREF_STAT_INC();
419
1.30M
    if (--op->ob_refcnt == 0) {
420
353k
        _Py_Dealloc(op);
421
353k
    }
422
1.30M
}
Unexecuted instantiation: Python-tokenize.c:Py_DECREF
Unexecuted instantiation: asdl.c:Py_DECREF
assemble.c:Py_DECREF
Line
Count
Source
411
59.9k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
59.9k
    if (_Py_IsImmortal(op)) {
415
9.90k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
9.90k
        return;
417
9.90k
    }
418
50.0k
    _Py_DECREF_STAT_INC();
419
50.0k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
50.0k
}
Unexecuted instantiation: ast.c:Py_DECREF
ast_preprocess.c:Py_DECREF
Line
Count
Source
411
3
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
3
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
3
    _Py_DECREF_STAT_INC();
419
3
    if (--op->ob_refcnt == 0) {
420
3
        _Py_Dealloc(op);
421
3
    }
422
3
}
ast_unparse.c:Py_DECREF
Line
Count
Source
411
8
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
8
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
8
    _Py_DECREF_STAT_INC();
419
8
    if (--op->ob_refcnt == 0) {
420
8
        _Py_Dealloc(op);
421
8
    }
422
8
}
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
411
127k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
127k
    if (_Py_IsImmortal(op)) {
415
48.9k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
48.9k
        return;
417
48.9k
    }
418
78.8k
    _Py_DECREF_STAT_INC();
419
78.8k
    if (--op->ob_refcnt == 0) {
420
57.9k
        _Py_Dealloc(op);
421
57.9k
    }
422
78.8k
}
pegen_errors.c:Py_DECREF
Line
Count
Source
411
41.3k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
41.3k
    if (_Py_IsImmortal(op)) {
415
2.32k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.32k
        return;
417
2.32k
    }
418
38.9k
    _Py_DECREF_STAT_INC();
419
38.9k
    if (--op->ob_refcnt == 0) {
420
3.17k
        _Py_Dealloc(op);
421
3.17k
    }
422
38.9k
}
Unexecuted instantiation: parser.c:Py_DECREF
Unexecuted instantiation: buffer.c:Py_DECREF
lexer.c:Py_DECREF
Line
Count
Source
411
12.5k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
12.5k
    if (_Py_IsImmortal(op)) {
415
901
        _Py_DECREF_IMMORTAL_STAT_INC();
416
901
        return;
417
901
    }
418
11.6k
    _Py_DECREF_STAT_INC();
419
11.6k
    if (--op->ob_refcnt == 0) {
420
11.6k
        _Py_Dealloc(op);
421
11.6k
    }
422
11.6k
}
state.c:Py_DECREF
Line
Count
Source
411
21.4k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
21.4k
    if (_Py_IsImmortal(op)) {
415
395
        _Py_DECREF_IMMORTAL_STAT_INC();
416
395
        return;
417
395
    }
418
21.0k
    _Py_DECREF_STAT_INC();
419
21.0k
    if (--op->ob_refcnt == 0) {
420
2.32k
        _Py_Dealloc(op);
421
2.32k
    }
422
21.0k
}
Unexecuted instantiation: readline_tokenizer.c:Py_DECREF
Unexecuted instantiation: string_tokenizer.c:Py_DECREF
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
411
42.6k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
42.6k
    if (_Py_IsImmortal(op)) {
415
2.65k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.65k
        return;
417
2.65k
    }
418
39.9k
    _Py_DECREF_STAT_INC();
419
39.9k
    if (--op->ob_refcnt == 0) {
420
39.9k
        _Py_Dealloc(op);
421
39.9k
    }
422
39.9k
}
423
19.8G
#define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op))
424
#endif
425
426
427
/* Safely decref `op` and set `op` to NULL, especially useful in tp_clear
428
 * and tp_dealloc implementations.
429
 *
430
 * Note that "the obvious" code can be deadly:
431
 *
432
 *     Py_XDECREF(op);
433
 *     op = NULL;
434
 *
435
 * Typically, `op` is something like self->containee, and `self` is done
436
 * using its `containee` member.  In the code sequence above, suppose
437
 * `containee` is non-NULL with a refcount of 1.  Its refcount falls to
438
 * 0 on the first line, which can trigger an arbitrary amount of code,
439
 * possibly including finalizers (like __del__ methods or weakref callbacks)
440
 * coded in Python, which in turn can release the GIL and allow other threads
441
 * to run, etc.  Such code may even invoke methods of `self` again, or cause
442
 * cyclic gc to trigger, but-- oops! --self->containee still points to the
443
 * object being torn down, and it may be in an insane state while being torn
444
 * down.  This has in fact been a rich historic source of miserable (rare &
445
 * hard-to-diagnose) segfaulting (and other) bugs.
446
 *
447
 * The safe way is:
448
 *
449
 *      Py_CLEAR(op);
450
 *
451
 * That arranges to set `op` to NULL _before_ decref'ing, so that any code
452
 * triggered as a side-effect of `op` getting torn down no longer believes
453
 * `op` points to a valid object.
454
 *
455
 * There are cases where it's safe to use the naive code, but they're brittle.
456
 * For example, if `op` points to a Python integer, you know that destroying
457
 * one of those can't cause problems -- but in part that relies on that
458
 * Python integers aren't currently weakly referencable.  Best practice is
459
 * to use Py_CLEAR() even if you can't think of a reason for why you need to.
460
 *
461
 * gh-98724: Use a temporary variable to only evaluate the macro argument once,
462
 * to avoid the duplication of side effects if the argument has side effects.
463
 *
464
 * gh-99701: If the PyObject* type is used with casting arguments to PyObject*,
465
 * the code can be miscompiled with strict aliasing because of type punning.
466
 * With strict aliasing, a compiler considers that two pointers of different
467
 * types cannot read or write the same memory which enables optimization
468
 * opportunities.
469
 *
470
 * If available, use _Py_TYPEOF() to use the 'op' type for temporary variables,
471
 * and so avoid type punning. Otherwise, use memcpy() which causes type erasure
472
 * and so prevents the compiler to reuse an old cached 'op' value after
473
 * Py_CLEAR().
474
 */
475
#ifdef _Py_TYPEOF
476
#define Py_CLEAR(op) \
477
2.40G
    do { \
478
2.40G
        _Py_TYPEOF(op)* _tmp_op_ptr = &(op); \
479
2.40G
        _Py_TYPEOF(op) _tmp_old_op = (*_tmp_op_ptr); \
480
2.40G
        if (_tmp_old_op != NULL) { \
481
544M
            *_tmp_op_ptr = _Py_NULL; \
482
544M
            Py_DECREF(_tmp_old_op); \
483
544M
        } \
484
2.40G
    } while (0)
485
#else
486
#define Py_CLEAR(op) \
487
    do { \
488
        PyObject **_tmp_op_ptr = _Py_CAST(PyObject**, &(op)); \
489
        PyObject *_tmp_old_op = (*_tmp_op_ptr); \
490
        if (_tmp_old_op != NULL) { \
491
            PyObject *_null_ptr = _Py_NULL; \
492
            memcpy(_tmp_op_ptr, &_null_ptr, sizeof(PyObject*)); \
493
            Py_DECREF(_tmp_old_op); \
494
        } \
495
    } while (0)
496
#endif
497
498
499
/* Function to use in case the object pointer can be NULL: */
500
static inline void Py_XINCREF(PyObject *op)
501
2.14G
{
502
2.14G
    if (op != _Py_NULL) {
503
932M
        Py_INCREF(op);
504
932M
    }
505
2.14G
}
Unexecuted instantiation: bytesobject.c:Py_XINCREF
Unexecuted instantiation: call.c:Py_XINCREF
exceptions.c:Py_XINCREF
Line
Count
Source
501
117M
{
502
117M
    if (op != _Py_NULL) {
503
21.0M
        Py_INCREF(op);
504
21.0M
    }
505
117M
}
Unexecuted instantiation: genericaliasobject.c:Py_XINCREF
Unexecuted instantiation: floatobject.c:Py_XINCREF
listobject.c:Py_XINCREF
Line
Count
Source
501
6.24M
{
502
6.24M
    if (op != _Py_NULL) {
503
6.24M
        Py_INCREF(op);
504
6.24M
    }
505
6.24M
}
Unexecuted instantiation: longobject.c:Py_XINCREF
dictobject.c:Py_XINCREF
Line
Count
Source
501
734M
{
502
734M
    if (op != _Py_NULL) {
503
229M
        Py_INCREF(op);
504
229M
    }
505
734M
}
Unexecuted instantiation: memoryobject.c:Py_XINCREF
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
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
501
58.7M
{
502
58.7M
    if (op != _Py_NULL) {
503
58.4M
        Py_INCREF(op);
504
58.4M
    }
505
58.7M
}
typevarobject.c:Py_XINCREF
Line
Count
Source
501
296
{
502
296
    if (op != _Py_NULL) {
503
52
        Py_INCREF(op);
504
52
    }
505
296
}
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
501
295k
{
502
295k
    if (op != _Py_NULL) {
503
32.2k
        Py_INCREF(op);
504
32.2k
    }
505
295k
}
Unexecuted instantiation: _warnings.c:Py_XINCREF
bltinmodule.c:Py_XINCREF
Line
Count
Source
501
561
{
502
561
    if (op != _Py_NULL) {
503
561
        Py_INCREF(op);
504
561
    }
505
561
}
ceval.c:Py_XINCREF
Line
Count
Source
501
314M
{
502
314M
    if (op != _Py_NULL) {
503
88.8M
        Py_INCREF(op);
504
88.8M
    }
505
314M
}
Unexecuted instantiation: codecs.c:Py_XINCREF
Unexecuted instantiation: codegen.c:Py_XINCREF
compile.c:Py_XINCREF
Line
Count
Source
501
12.2k
{
502
12.2k
    if (op != _Py_NULL) {
503
6.13k
        Py_INCREF(op);
504
6.13k
    }
505
12.2k
}
context.c:Py_XINCREF
Line
Count
Source
501
250k
{
502
250k
    if (op != _Py_NULL) {
503
0
        Py_INCREF(op);
504
0
    }
505
250k
}
errors.c:Py_XINCREF
Line
Count
Source
501
45.7M
{
502
45.7M
    if (op != _Py_NULL) {
503
45.6M
        Py_INCREF(op);
504
45.6M
    }
505
45.7M
}
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
501
34.4k
{
502
34.4k
    if (op != _Py_NULL) {
503
28.3k
        Py_INCREF(op);
504
28.3k
    }
505
34.4k
}
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
501
1.02M
{
502
1.02M
    if (op != _Py_NULL) {
503
1.02M
        Py_INCREF(op);
504
1.02M
    }
505
1.02M
}
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
structmember.c:Py_XINCREF
Line
Count
Source
501
2.91M
{
502
2.91M
    if (op != _Py_NULL) {
503
1.96M
        Py_INCREF(op);
504
1.96M
    }
505
2.91M
}
Unexecuted instantiation: symtable.c:Py_XINCREF
sysmodule.c:Py_XINCREF
Line
Count
Source
501
28
{
502
28
    if (op != _Py_NULL) {
503
28
        Py_INCREF(op);
504
28
    }
505
28
}
Unexecuted instantiation: thread.c:Py_XINCREF
traceback.c:Py_XINCREF
Line
Count
Source
501
126M
{
502
126M
    if (op != _Py_NULL) {
503
82.4M
        Py_INCREF(op);
504
82.4M
    }
505
126M
}
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: 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
501
197k
{
502
197k
    if (op != _Py_NULL) {
503
197k
        Py_INCREF(op);
504
197k
    }
505
197k
}
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
501
56
{
502
56
    if (op != _Py_NULL) {
503
0
        Py_INCREF(op);
504
0
    }
505
56
}
Unexecuted instantiation: _codecsmodule.c:Py_XINCREF
_collectionsmodule.c:Py_XINCREF
Line
Count
Source
501
4
{
502
4
    if (op != _Py_NULL) {
503
4
        Py_INCREF(op);
504
4
    }
505
4
}
Unexecuted instantiation: errnomodule.c:Py_XINCREF
Unexecuted instantiation: _iomodule.c:Py_XINCREF
Unexecuted instantiation: iobase.c:Py_XINCREF
Unexecuted instantiation: fileio.c:Py_XINCREF
Unexecuted instantiation: bytesio.c:Py_XINCREF
bufferedio.c:Py_XINCREF
Line
Count
Source
501
5.79k
{
502
5.79k
    if (op != _Py_NULL) {
503
5.79k
        Py_INCREF(op);
504
5.79k
    }
505
5.79k
}
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
501
4
{
502
4
    if (op != _Py_NULL) {
503
2
        Py_INCREF(op);
504
2
    }
505
4
}
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
501
1.13k
{
502
1.13k
    if (op != _Py_NULL) {
503
1.13k
        Py_INCREF(op);
504
1.13k
    }
505
1.13k
}
Unexecuted instantiation: _functoolsmodule.c:Py_XINCREF
Unexecuted instantiation: _localemodule.c:Py_XINCREF
Unexecuted instantiation: _opcode.c:Py_XINCREF
Unexecuted instantiation: _operator.c:Py_XINCREF
Unexecuted instantiation: _stat.c:Py_XINCREF
Unexecuted instantiation: symtablemodule.c:Py_XINCREF
Unexecuted instantiation: pwdmodule.c:Py_XINCREF
getpath.c:Py_XINCREF
Line
Count
Source
501
84
{
502
84
    if (op != _Py_NULL) {
503
84
        Py_INCREF(op);
504
84
    }
505
84
}
Unexecuted instantiation: frozen.c:Py_XINCREF
Unexecuted instantiation: getbuildinfo.c:Py_XINCREF
Unexecuted instantiation: peg_api.c:Py_XINCREF
Unexecuted instantiation: file_tokenizer.c:Py_XINCREF
Unexecuted instantiation: helpers.c:Py_XINCREF
Unexecuted instantiation: myreadline.c:Py_XINCREF
abstract.c:Py_XINCREF
Line
Count
Source
501
47.1M
{
502
47.1M
    if (op != _Py_NULL) {
503
45.8M
        Py_INCREF(op);
504
45.8M
    }
505
47.1M
}
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
501
9.06M
{
502
9.06M
    if (op != _Py_NULL) {
503
159k
        Py_INCREF(op);
504
159k
    }
505
9.06M
}
Unexecuted instantiation: classobject.c:Py_XINCREF
codeobject.c:Py_XINCREF
Line
Count
Source
501
8.04k
{
502
8.04k
    if (op != _Py_NULL) {
503
8.04k
        Py_INCREF(op);
504
8.04k
    }
505
8.04k
}
Unexecuted instantiation: complexobject.c:Py_XINCREF
descrobject.c:Py_XINCREF
Line
Count
Source
501
79.7k
{
502
79.7k
    if (op != _Py_NULL) {
503
76.8k
        Py_INCREF(op);
504
76.8k
    }
505
79.7k
}
Unexecuted instantiation: enumobject.c:Py_XINCREF
genobject.c:Py_XINCREF
Line
Count
Source
501
2.79k
{
502
2.79k
    if (op != _Py_NULL) {
503
0
        Py_INCREF(op);
504
0
    }
505
2.79k
}
Unexecuted instantiation: fileobject.c:Py_XINCREF
frameobject.c:Py_XINCREF
Line
Count
Source
501
16.0M
{
502
16.0M
    if (op != _Py_NULL) {
503
16.0M
        Py_INCREF(op);
504
16.0M
    }
505
16.0M
}
funcobject.c:Py_XINCREF
Line
Count
Source
501
18.7k
{
502
18.7k
    if (op != _Py_NULL) {
503
18
        Py_INCREF(op);
504
18
    }
505
18.7k
}
Unexecuted instantiation: interpolationobject.c:Py_XINCREF
Unexecuted instantiation: iterobject.c:Py_XINCREF
Unexecuted instantiation: odictobject.c:Py_XINCREF
methodobject.c:Py_XINCREF
Line
Count
Source
501
669M
{
502
669M
    if (op != _Py_NULL) {
503
334M
        Py_INCREF(op);
504
334M
    }
505
669M
}
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
501
18.6k
{
502
18.6k
    if (op != _Py_NULL) {
503
449
        Py_INCREF(op);
504
449
    }
505
18.6k
}
Unexecuted instantiation: pegen_errors.c:Py_XINCREF
Unexecuted instantiation: parser.c:Py_XINCREF
Unexecuted instantiation: buffer.c:Py_XINCREF
Unexecuted instantiation: lexer.c:Py_XINCREF
Unexecuted instantiation: 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
506
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
507
2.14G
#  define Py_XINCREF(op) Py_XINCREF(_PyObject_CAST(op))
508
#endif
509
510
static inline void Py_XDECREF(PyObject *op)
511
13.8G
{
512
13.8G
    if (op != _Py_NULL) {
513
12.5G
        Py_DECREF(op);
514
12.5G
    }
515
13.8G
}
bytesobject.c:Py_XDECREF
Line
Count
Source
511
9.64M
{
512
9.64M
    if (op != _Py_NULL) {
513
101k
        Py_DECREF(op);
514
101k
    }
515
9.64M
}
Unexecuted instantiation: call.c:Py_XDECREF
exceptions.c:Py_XDECREF
Line
Count
Source
511
118M
{
512
118M
    if (op != _Py_NULL) {
513
59.1M
        Py_DECREF(op);
514
59.1M
    }
515
118M
}
genericaliasobject.c:Py_XDECREF
Line
Count
Source
511
303
{
512
303
    if (op != _Py_NULL) {
513
202
        Py_DECREF(op);
514
202
    }
515
303
}
floatobject.c:Py_XDECREF
Line
Count
Source
511
710k
{
512
710k
    if (op != _Py_NULL) {
513
151k
        Py_DECREF(op);
514
151k
    }
515
710k
}
listobject.c:Py_XDECREF
Line
Count
Source
511
1.72G
{
512
1.72G
    if (op != _Py_NULL) {
513
1.69G
        Py_DECREF(op);
514
1.69G
    }
515
1.72G
}
longobject.c:Py_XDECREF
Line
Count
Source
511
7.78M
{
512
7.78M
    if (op != _Py_NULL) {
513
2.37M
        Py_DECREF(op);
514
2.37M
    }
515
7.78M
}
dictobject.c:Py_XDECREF
Line
Count
Source
511
891M
{
512
891M
    if (op != _Py_NULL) {
513
883M
        Py_DECREF(op);
514
883M
    }
515
891M
}
Unexecuted instantiation: memoryobject.c:Py_XDECREF
moduleobject.c:Py_XDECREF
Line
Count
Source
511
21.8k
{
512
21.8k
    if (op != _Py_NULL) {
513
14.8k
        Py_DECREF(op);
514
14.8k
    }
515
21.8k
}
object.c:Py_XDECREF
Line
Count
Source
511
11.6M
{
512
11.6M
    if (op != _Py_NULL) {
513
47.7k
        Py_DECREF(op);
514
47.7k
    }
515
11.6M
}
Unexecuted instantiation: obmalloc.c:Py_XDECREF
Unexecuted instantiation: picklebufobject.c:Py_XDECREF
rangeobject.c:Py_XDECREF
Line
Count
Source
511
84
{
512
84
    if (op != _Py_NULL) {
513
84
        Py_DECREF(op);
514
84
    }
515
84
}
setobject.c:Py_XDECREF
Line
Count
Source
511
322k
{
512
322k
    if (op != _Py_NULL) {
513
28
        Py_DECREF(op);
514
28
    }
515
322k
}
Unexecuted instantiation: sliceobject.c:Py_XDECREF
structseq.c:Py_XDECREF
Line
Count
Source
511
9.03M
{
512
9.03M
    if (op != _Py_NULL) {
513
9.03M
        Py_DECREF(op);
514
9.03M
    }
515
9.03M
}
Unexecuted instantiation: templateobject.c:Py_XDECREF
tupleobject.c:Py_XDECREF
Line
Count
Source
511
9.09G
{
512
9.09G
    if (op != _Py_NULL) {
513
9.08G
        Py_DECREF(op);
514
9.08G
    }
515
9.09G
}
typeobject.c:Py_XDECREF
Line
Count
Source
511
40.7M
{
512
40.7M
    if (op != _Py_NULL) {
513
23.1M
        Py_DECREF(op);
514
23.1M
    }
515
40.7M
}
typevarobject.c:Py_XDECREF
Line
Count
Source
511
108
{
512
108
    if (op != _Py_NULL) {
513
76
        Py_DECREF(op);
514
76
    }
515
108
}
Unexecuted instantiation: unicode_format.c:Py_XDECREF
unicode_formatter.c:Py_XDECREF
Line
Count
Source
511
573
{
512
573
    if (op != _Py_NULL) {
513
256
        Py_DECREF(op);
514
256
    }
515
573
}
Unexecuted instantiation: unicode_writer.c:Py_XDECREF
Unexecuted instantiation: unicodectype.c:Py_XDECREF
unicodeobject.c:Py_XDECREF
Line
Count
Source
511
110M
{
512
110M
    if (op != _Py_NULL) {
513
79.4M
        Py_DECREF(op);
514
79.4M
    }
515
110M
}
unionobject.c:Py_XDECREF
Line
Count
Source
511
858
{
512
858
    if (op != _Py_NULL) {
513
48
        Py_DECREF(op);
514
48
    }
515
858
}
weakrefobject.c:Py_XDECREF
Line
Count
Source
511
301k
{
512
301k
    if (op != _Py_NULL) {
513
5.13k
        Py_DECREF(op);
514
5.13k
    }
515
301k
}
_warnings.c:Py_XDECREF
Line
Count
Source
511
6.24M
{
512
6.24M
    if (op != _Py_NULL) {
513
5.45M
        Py_DECREF(op);
514
5.45M
    }
515
6.24M
}
bltinmodule.c:Py_XDECREF
Line
Count
Source
511
15.6M
{
512
15.6M
    if (op != _Py_NULL) {
513
765k
        Py_DECREF(op);
514
765k
    }
515
15.6M
}
ceval.c:Py_XDECREF
Line
Count
Source
511
379k
{
512
379k
    if (op != _Py_NULL) {
513
5.38k
        Py_DECREF(op);
514
5.38k
    }
515
379k
}
codecs.c:Py_XDECREF
Line
Count
Source
511
187k
{
512
187k
    if (op != _Py_NULL) {
513
124k
        Py_DECREF(op);
514
124k
    }
515
187k
}
Unexecuted instantiation: codegen.c:Py_XDECREF
compile.c:Py_XDECREF
Line
Count
Source
511
34.2k
{
512
34.2k
    if (op != _Py_NULL) {
513
10.4k
        Py_DECREF(op);
514
10.4k
    }
515
34.2k
}
Unexecuted instantiation: context.c:Py_XDECREF
errors.c:Py_XDECREF
Line
Count
Source
511
279M
{
512
279M
    if (op != _Py_NULL) {
513
36.4M
        Py_DECREF(op);
514
36.4M
    }
515
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
511
165k
{
512
165k
    if (op != _Py_NULL) {
513
0
        Py_DECREF(op);
514
0
    }
515
165k
}
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
511
6.25M
{
512
6.25M
    if (op != _Py_NULL) {
513
6.22M
        Py_DECREF(op);
514
6.22M
    }
515
6.25M
}
Unexecuted instantiation: importdl.c:Py_XDECREF
Unexecuted instantiation: initconfig.c:Py_XDECREF
Unexecuted instantiation: instrumentation.c:Py_XDECREF
instruction_sequence.c:Py_XDECREF
Line
Count
Source
511
17.1k
{
512
17.1k
    if (op != _Py_NULL) {
513
0
        Py_DECREF(op);
514
0
    }
515
17.1k
}
intrinsics.c:Py_XDECREF
Line
Count
Source
511
24.8k
{
512
24.8k
    if (op != _Py_NULL) {
513
24.8k
        Py_DECREF(op);
514
24.8k
    }
515
24.8k
}
Unexecuted instantiation: legacy_tracing.c:Py_XDECREF
Unexecuted instantiation: lock.c:Py_XDECREF
marshal.c:Py_XDECREF
Line
Count
Source
511
1.37M
{
512
1.37M
    if (op != _Py_NULL) {
513
1.37M
        Py_DECREF(op);
514
1.37M
    }
515
1.37M
}
modsupport.c:Py_XDECREF
Line
Count
Source
511
11.2k
{
512
11.2k
    if (op != _Py_NULL) {
513
11.2k
        Py_DECREF(op);
514
11.2k
    }
515
11.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
511
168
{
512
168
    if (op != _Py_NULL) {
513
168
        Py_DECREF(op);
514
168
    }
515
168
}
Unexecuted instantiation: pymath.c:Py_XDECREF
Unexecuted instantiation: pystate.c:Py_XDECREF
pythonrun.c:Py_XDECREF
Line
Count
Source
511
552
{
512
552
    if (op != _Py_NULL) {
513
368
        Py_DECREF(op);
514
368
    }
515
552
}
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
511
4.13M
{
512
4.13M
    if (op != _Py_NULL) {
513
2.33M
        Py_DECREF(op);
514
2.33M
    }
515
4.13M
}
structmember.c:Py_XDECREF
Line
Count
Source
511
1.93M
{
512
1.93M
    if (op != _Py_NULL) {
513
1.66k
        Py_DECREF(op);
514
1.66k
    }
515
1.93M
}
symtable.c:Py_XDECREF
Line
Count
Source
511
208k
{
512
208k
    if (op != _Py_NULL) {
513
164k
        Py_DECREF(op);
514
164k
    }
515
208k
}
sysmodule.c:Py_XDECREF
Line
Count
Source
511
3.68M
{
512
3.68M
    if (op != _Py_NULL) {
513
2.76M
        Py_DECREF(op);
514
2.76M
    }
515
3.68M
}
Unexecuted instantiation: thread.c:Py_XDECREF
traceback.c:Py_XDECREF
Line
Count
Source
511
252M
{
512
252M
    if (op != _Py_NULL) {
513
164M
        Py_DECREF(op);
514
164M
    }
515
252M
}
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: 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
511
1.63M
{
512
1.63M
    if (op != _Py_NULL) {
513
1.37M
        Py_DECREF(op);
514
1.37M
    }
515
1.63M
}
signalmodule.c:Py_XDECREF
Line
Count
Source
511
1.79k
{
512
1.79k
    if (op != _Py_NULL) {
513
0
        Py_DECREF(op);
514
0
    }
515
1.79k
}
Unexecuted instantiation: _tracemalloc.c:Py_XDECREF
Unexecuted instantiation: _suggestions.c:Py_XDECREF
_datetimemodule.c:Py_XDECREF
Line
Count
Source
511
42
{
512
42
    if (op != _Py_NULL) {
513
26
        Py_DECREF(op);
514
26
    }
515
42
}
Unexecuted instantiation: _codecsmodule.c:Py_XDECREF
_collectionsmodule.c:Py_XDECREF
Line
Count
Source
511
4
{
512
4
    if (op != _Py_NULL) {
513
0
        Py_DECREF(op);
514
0
    }
515
4
}
Unexecuted instantiation: errnomodule.c:Py_XDECREF
Unexecuted instantiation: _iomodule.c:Py_XDECREF
Unexecuted instantiation: iobase.c:Py_XDECREF
Unexecuted instantiation: fileio.c:Py_XDECREF
bytesio.c:Py_XDECREF
Line
Count
Source
511
39.7k
{
512
39.7k
    if (op != _Py_NULL) {
513
39.7k
        Py_DECREF(op);
514
39.7k
    }
515
39.7k
}
bufferedio.c:Py_XDECREF
Line
Count
Source
511
62.6k
{
512
62.6k
    if (op != _Py_NULL) {
513
5.79k
        Py_DECREF(op);
514
5.79k
    }
515
62.6k
}
textio.c:Py_XDECREF
Line
Count
Source
511
33.6k
{
512
33.6k
    if (op != _Py_NULL) {
513
56
        Py_DECREF(op);
514
56
    }
515
33.6k
}
Unexecuted instantiation: stringio.c:Py_XDECREF
itertoolsmodule.c:Py_XDECREF
Line
Count
Source
511
32.4k
{
512
32.4k
    if (op != _Py_NULL) {
513
5.26k
        Py_DECREF(op);
514
5.26k
    }
515
32.4k
}
sre.c:Py_XDECREF
Line
Count
Source
511
86.8M
{
512
86.8M
    if (op != _Py_NULL) {
513
86.8M
        Py_DECREF(op);
514
86.8M
    }
515
86.8M
}
Unexecuted instantiation: _sysconfig.c:Py_XDECREF
Unexecuted instantiation: _threadmodule.c:Py_XDECREF
Unexecuted instantiation: timemodule.c:Py_XDECREF
Unexecuted instantiation: _typesmodule.c:Py_XDECREF
Unexecuted instantiation: _typingmodule.c:Py_XDECREF
Unexecuted instantiation: _weakref.c:Py_XDECREF
_abc.c:Py_XDECREF
Line
Count
Source
511
29.5k
{
512
29.5k
    if (op != _Py_NULL) {
513
27.7k
        Py_DECREF(op);
514
27.7k
    }
515
29.5k
}
_functoolsmodule.c:Py_XDECREF
Line
Count
Source
511
77
{
512
77
    if (op != _Py_NULL) {
513
0
        Py_DECREF(op);
514
0
    }
515
77
}
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
511
3.14k
{
512
3.14k
    if (op != _Py_NULL) {
513
3.14k
        Py_DECREF(op);
514
3.14k
    }
515
3.14k
}
Unexecuted instantiation: myreadline.c:Py_XDECREF
abstract.c:Py_XDECREF
Line
Count
Source
511
376k
{
512
376k
    if (op != _Py_NULL) {
513
231k
        Py_DECREF(op);
514
231k
    }
515
376k
}
Unexecuted instantiation: boolobject.c:Py_XDECREF
Unexecuted instantiation: bytes_methods.c:Py_XDECREF
bytearrayobject.c:Py_XDECREF
Line
Count
Source
511
3.42M
{
512
3.42M
    if (op != _Py_NULL) {
513
3.42M
        Py_DECREF(op);
514
3.42M
    }
515
3.42M
}
capsule.c:Py_XDECREF
Line
Count
Source
511
5
{
512
5
    if (op != _Py_NULL) {
513
5
        Py_DECREF(op);
514
5
    }
515
5
}
cellobject.c:Py_XDECREF
Line
Count
Source
511
9.06M
{
512
9.06M
    if (op != _Py_NULL) {
513
531k
        Py_DECREF(op);
514
531k
    }
515
9.06M
}
classobject.c:Py_XDECREF
Line
Count
Source
511
47.9M
{
512
47.9M
    if (op != _Py_NULL) {
513
47.9M
        Py_DECREF(op);
514
47.9M
    }
515
47.9M
}
codeobject.c:Py_XDECREF
Line
Count
Source
511
1.02M
{
512
1.02M
    if (op != _Py_NULL) {
513
876k
        Py_DECREF(op);
514
876k
    }
515
1.02M
}
Unexecuted instantiation: complexobject.c:Py_XDECREF
descrobject.c:Py_XDECREF
Line
Count
Source
511
31.7M
{
512
31.7M
    if (op != _Py_NULL) {
513
22.3M
        Py_DECREF(op);
514
22.3M
    }
515
31.7M
}
enumobject.c:Py_XDECREF
Line
Count
Source
511
27.4M
{
512
27.4M
    if (op != _Py_NULL) {
513
18.3M
        Py_DECREF(op);
514
18.3M
    }
515
27.4M
}
genobject.c:Py_XDECREF
Line
Count
Source
511
1.39k
{
512
1.39k
    if (op != _Py_NULL) {
513
0
        Py_DECREF(op);
514
0
    }
515
1.39k
}
Unexecuted instantiation: fileobject.c:Py_XDECREF
Unexecuted instantiation: frameobject.c:Py_XDECREF
funcobject.c:Py_XDECREF
Line
Count
Source
511
4.76k
{
512
4.76k
    if (op != _Py_NULL) {
513
1.64k
        Py_DECREF(op);
514
1.64k
    }
515
4.76k
}
Unexecuted instantiation: interpolationobject.c:Py_XDECREF
iterobject.c:Py_XDECREF
Line
Count
Source
511
3.46M
{
512
3.46M
    if (op != _Py_NULL) {
513
388k
        Py_DECREF(op);
514
388k
    }
515
3.46M
}
odictobject.c:Py_XDECREF
Line
Count
Source
511
324
{
512
324
    if (op != _Py_NULL) {
513
276
        Py_DECREF(op);
514
276
    }
515
324
}
methodobject.c:Py_XDECREF
Line
Count
Source
511
1.00G
{
512
1.00G
    if (op != _Py_NULL) {
513
344M
        Py_DECREF(op);
514
344M
    }
515
1.00G
}
Unexecuted instantiation: namespaceobject.c:Py_XDECREF
Unexecuted instantiation: _contextvars.c:Py_XDECREF
Python-ast.c:Py_XDECREF
Line
Count
Source
511
312
{
512
312
    if (op != _Py_NULL) {
513
208
        Py_DECREF(op);
514
208
    }
515
312
}
Unexecuted instantiation: Python-tokenize.c:Py_XDECREF
Unexecuted instantiation: asdl.c:Py_XDECREF
assemble.c:Py_XDECREF
Line
Count
Source
511
59.9k
{
512
59.9k
    if (op != _Py_NULL) {
513
59.9k
        Py_DECREF(op);
514
59.9k
    }
515
59.9k
}
Unexecuted instantiation: ast.c:Py_XDECREF
Unexecuted instantiation: ast_preprocess.c:Py_XDECREF
Unexecuted instantiation: ast_unparse.c:Py_XDECREF
Unexecuted instantiation: critical_section.c:Py_XDECREF
Unexecuted instantiation: crossinterp.c:Py_XDECREF
Unexecuted instantiation: getcopyright.c:Py_XDECREF
Unexecuted instantiation: getplatform.c:Py_XDECREF
Unexecuted instantiation: getversion.c:Py_XDECREF
Unexecuted instantiation: optimizer.c:Py_XDECREF
Unexecuted instantiation: pathconfig.c:Py_XDECREF
pegen.c:Py_XDECREF
Line
Count
Source
511
30.7k
{
512
30.7k
    if (op != _Py_NULL) {
513
1.48k
        Py_DECREF(op);
514
1.48k
    }
515
30.7k
}
pegen_errors.c:Py_XDECREF
Line
Count
Source
511
10.5k
{
512
10.5k
    if (op != _Py_NULL) {
513
8.90k
        Py_DECREF(op);
514
8.90k
    }
515
10.5k
}
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
511
113k
{
512
113k
    if (op != _Py_NULL) {
513
21.4k
        Py_DECREF(op);
514
21.4k
    }
515
113k
}
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
511
32.5k
{
512
32.5k
    if (op != _Py_NULL) {
513
32.5k
        Py_DECREF(op);
514
32.5k
    }
515
32.5k
}
516
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
517
13.8G
#  define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op))
518
#endif
519
520
// Create a new strong reference to an object:
521
// increment the reference count of the object and return the object.
522
PyAPI_FUNC(PyObject*) Py_NewRef(PyObject *obj);
523
524
// Similar to Py_NewRef(), but the object can be NULL.
525
PyAPI_FUNC(PyObject*) Py_XNewRef(PyObject *obj);
526
527
static inline PyObject* _Py_NewRef(PyObject *obj)
528
15.4G
{
529
15.4G
    Py_INCREF(obj);
530
15.4G
    return obj;
531
15.4G
}
bytesobject.c:_Py_NewRef
Line
Count
Source
528
538k
{
529
538k
    Py_INCREF(obj);
530
538k
    return obj;
531
538k
}
call.c:_Py_NewRef
Line
Count
Source
528
31.6M
{
529
31.6M
    Py_INCREF(obj);
530
31.6M
    return obj;
531
31.6M
}
exceptions.c:_Py_NewRef
Line
Count
Source
528
159M
{
529
159M
    Py_INCREF(obj);
530
159M
    return obj;
531
159M
}
genericaliasobject.c:_Py_NewRef
Line
Count
Source
528
1.43k
{
529
1.43k
    Py_INCREF(obj);
530
1.43k
    return obj;
531
1.43k
}
Unexecuted instantiation: floatobject.c:_Py_NewRef
listobject.c:_Py_NewRef
Line
Count
Source
528
1.39G
{
529
1.39G
    Py_INCREF(obj);
530
1.39G
    return obj;
531
1.39G
}
longobject.c:_Py_NewRef
Line
Count
Source
528
7.25M
{
529
7.25M
    Py_INCREF(obj);
530
7.25M
    return obj;
531
7.25M
}
dictobject.c:_Py_NewRef
Line
Count
Source
528
1.51G
{
529
1.51G
    Py_INCREF(obj);
530
1.51G
    return obj;
531
1.51G
}
memoryobject.c:_Py_NewRef
Line
Count
Source
528
2.83M
{
529
2.83M
    Py_INCREF(obj);
530
2.83M
    return obj;
531
2.83M
}
moduleobject.c:_Py_NewRef
Line
Count
Source
528
6.75k
{
529
6.75k
    Py_INCREF(obj);
530
6.75k
    return obj;
531
6.75k
}
object.c:_Py_NewRef
Line
Count
Source
528
169M
{
529
169M
    Py_INCREF(obj);
530
169M
    return obj;
531
169M
}
Unexecuted instantiation: obmalloc.c:_Py_NewRef
Unexecuted instantiation: picklebufobject.c:_Py_NewRef
rangeobject.c:_Py_NewRef
Line
Count
Source
528
84
{
529
84
    Py_INCREF(obj);
530
84
    return obj;
531
84
}
setobject.c:_Py_NewRef
Line
Count
Source
528
8.21M
{
529
8.21M
    Py_INCREF(obj);
530
8.21M
    return obj;
531
8.21M
}
sliceobject.c:_Py_NewRef
Line
Count
Source
528
79.9M
{
529
79.9M
    Py_INCREF(obj);
530
79.9M
    return obj;
531
79.9M
}
Unexecuted instantiation: structseq.c:_Py_NewRef
templateobject.c:_Py_NewRef
Line
Count
Source
528
4
{
529
4
    Py_INCREF(obj);
530
4
    return obj;
531
4
}
tupleobject.c:_Py_NewRef
Line
Count
Source
528
8.78G
{
529
8.78G
    Py_INCREF(obj);
530
8.78G
    return obj;
531
8.78G
}
typeobject.c:_Py_NewRef
Line
Count
Source
528
143M
{
529
143M
    Py_INCREF(obj);
530
143M
    return obj;
531
143M
}
typevarobject.c:_Py_NewRef
Line
Count
Source
528
188
{
529
188
    Py_INCREF(obj);
530
188
    return obj;
531
188
}
unicode_format.c:_Py_NewRef
Line
Count
Source
528
57.1M
{
529
57.1M
    Py_INCREF(obj);
530
57.1M
    return obj;
531
57.1M
}
Unexecuted instantiation: unicode_formatter.c:_Py_NewRef
unicode_writer.c:_Py_NewRef
Line
Count
Source
528
9.16k
{
529
9.16k
    Py_INCREF(obj);
530
9.16k
    return obj;
531
9.16k
}
Unexecuted instantiation: unicodectype.c:_Py_NewRef
unicodeobject.c:_Py_NewRef
Line
Count
Source
528
203M
{
529
203M
    Py_INCREF(obj);
530
203M
    return obj;
531
203M
}
Unexecuted instantiation: unionobject.c:_Py_NewRef
Unexecuted instantiation: weakrefobject.c:_Py_NewRef
_warnings.c:_Py_NewRef
Line
Count
Source
528
2.30M
{
529
2.30M
    Py_INCREF(obj);
530
2.30M
    return obj;
531
2.30M
}
bltinmodule.c:_Py_NewRef
Line
Count
Source
528
33.3M
{
529
33.3M
    Py_INCREF(obj);
530
33.3M
    return obj;
531
33.3M
}
ceval.c:_Py_NewRef
Line
Count
Source
528
1.62G
{
529
1.62G
    Py_INCREF(obj);
530
1.62G
    return obj;
531
1.62G
}
codecs.c:_Py_NewRef
Line
Count
Source
528
4.77M
{
529
4.77M
    Py_INCREF(obj);
530
4.77M
    return obj;
531
4.77M
}
codegen.c:_Py_NewRef
Line
Count
Source
528
3.41k
{
529
3.41k
    Py_INCREF(obj);
530
3.41k
    return obj;
531
3.41k
}
compile.c:_Py_NewRef
Line
Count
Source
528
131k
{
529
131k
    Py_INCREF(obj);
530
131k
    return obj;
531
131k
}
context.c:_Py_NewRef
Line
Count
Source
528
42
{
529
42
    Py_INCREF(obj);
530
42
    return obj;
531
42
}
errors.c:_Py_NewRef
Line
Count
Source
528
45.7M
{
529
45.7M
    Py_INCREF(obj);
530
45.7M
    return obj;
531
45.7M
}
flowgraph.c:_Py_NewRef
Line
Count
Source
528
115k
{
529
115k
    Py_INCREF(obj);
530
115k
    return obj;
531
115k
}
frame.c:_Py_NewRef
Line
Count
Source
528
37.9M
{
529
37.9M
    Py_INCREF(obj);
530
37.9M
    return obj;
531
37.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
528
2.75M
{
529
2.75M
    Py_INCREF(obj);
530
2.75M
    return obj;
531
2.75M
}
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
528
5.21M
{
529
5.21M
    Py_INCREF(obj);
530
5.21M
    return obj;
531
5.21M
}
importdl.c:_Py_NewRef
Line
Count
Source
528
808
{
529
808
    Py_INCREF(obj);
530
808
    return obj;
531
808
}
initconfig.c:_Py_NewRef
Line
Count
Source
528
476
{
529
476
    Py_INCREF(obj);
530
476
    return obj;
531
476
}
Unexecuted instantiation: instrumentation.c:_Py_NewRef
Unexecuted instantiation: instruction_sequence.c:_Py_NewRef
intrinsics.c:_Py_NewRef
Line
Count
Source
528
27.8k
{
529
27.8k
    Py_INCREF(obj);
530
27.8k
    return obj;
531
27.8k
}
Unexecuted instantiation: legacy_tracing.c:_Py_NewRef
Unexecuted instantiation: lock.c:_Py_NewRef
marshal.c:_Py_NewRef
Line
Count
Source
528
1.46M
{
529
1.46M
    Py_INCREF(obj);
530
1.46M
    return obj;
531
1.46M
}
Unexecuted instantiation: modsupport.c:_Py_NewRef
Unexecuted instantiation: mysnprintf.c:_Py_NewRef
Unexecuted instantiation: parking_lot.c:_Py_NewRef
Unexecuted instantiation: preconfig.c:_Py_NewRef
Unexecuted instantiation: pyarena.c:_Py_NewRef
Unexecuted instantiation: pyctype.c:_Py_NewRef
Unexecuted instantiation: pyhash.c:_Py_NewRef
pylifecycle.c:_Py_NewRef
Line
Count
Source
528
28
{
529
28
    Py_INCREF(obj);
530
28
    return obj;
531
28
}
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: structmember.c:_Py_NewRef
symtable.c:_Py_NewRef
Line
Count
Source
528
352k
{
529
352k
    Py_INCREF(obj);
530
352k
    return obj;
531
352k
}
sysmodule.c:_Py_NewRef
Line
Count
Source
528
1.34k
{
529
1.34k
    Py_INCREF(obj);
530
1.34k
    return obj;
531
1.34k
}
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: 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
528
2
{
529
2
    Py_INCREF(obj);
530
2
    return obj;
531
2
}
Unexecuted instantiation: faulthandler.c:_Py_NewRef
posixmodule.c:_Py_NewRef
Line
Count
Source
528
2.08M
{
529
2.08M
    Py_INCREF(obj);
530
2.08M
    return obj;
531
2.08M
}
signalmodule.c:_Py_NewRef
Line
Count
Source
528
1.79k
{
529
1.79k
    Py_INCREF(obj);
530
1.79k
    return obj;
531
1.79k
}
Unexecuted instantiation: _tracemalloc.c:_Py_NewRef
Unexecuted instantiation: _suggestions.c:_Py_NewRef
_datetimemodule.c:_Py_NewRef
Line
Count
Source
528
98
{
529
98
    Py_INCREF(obj);
530
98
    return obj;
531
98
}
Unexecuted instantiation: _codecsmodule.c:_Py_NewRef
_collectionsmodule.c:_Py_NewRef
Line
Count
Source
528
26.6M
{
529
26.6M
    Py_INCREF(obj);
530
26.6M
    return obj;
531
26.6M
}
Unexecuted instantiation: errnomodule.c:_Py_NewRef
_iomodule.c:_Py_NewRef
Line
Count
Source
528
349
{
529
349
    Py_INCREF(obj);
530
349
    return obj;
531
349
}
iobase.c:_Py_NewRef
Line
Count
Source
528
118k
{
529
118k
    Py_INCREF(obj);
530
118k
    return obj;
531
118k
}
Unexecuted instantiation: fileio.c:_Py_NewRef
bytesio.c:_Py_NewRef
Line
Count
Source
528
59.3k
{
529
59.3k
    Py_INCREF(obj);
530
59.3k
    return obj;
531
59.3k
}
bufferedio.c:_Py_NewRef
Line
Count
Source
528
11.6k
{
529
11.6k
    Py_INCREF(obj);
530
11.6k
    return obj;
531
11.6k
}
textio.c:_Py_NewRef
Line
Count
Source
528
312k
{
529
312k
    Py_INCREF(obj);
530
312k
    return obj;
531
312k
}
stringio.c:_Py_NewRef
Line
Count
Source
528
22.6k
{
529
22.6k
    Py_INCREF(obj);
530
22.6k
    return obj;
531
22.6k
}
itertoolsmodule.c:_Py_NewRef
Line
Count
Source
528
43.7k
{
529
43.7k
    Py_INCREF(obj);
530
43.7k
    return obj;
531
43.7k
}
sre.c:_Py_NewRef
Line
Count
Source
528
172M
{
529
172M
    Py_INCREF(obj);
530
172M
    return obj;
531
172M
}
Unexecuted instantiation: _sysconfig.c:_Py_NewRef
_threadmodule.c:_Py_NewRef
Line
Count
Source
528
2
{
529
2
    Py_INCREF(obj);
530
2
    return obj;
531
2
}
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
528
12.6k
{
529
12.6k
    Py_INCREF(obj);
530
12.6k
    return obj;
531
12.6k
}
_functoolsmodule.c:_Py_NewRef
Line
Count
Source
528
380k
{
529
380k
    Py_INCREF(obj);
530
380k
    return obj;
531
380k
}
Unexecuted instantiation: _localemodule.c:_Py_NewRef
Unexecuted instantiation: _opcode.c:_Py_NewRef
_operator.c:_Py_NewRef
Line
Count
Source
528
1.32M
{
529
1.32M
    Py_INCREF(obj);
530
1.32M
    return obj;
531
1.32M
}
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
528
224
{
529
224
    Py_INCREF(obj);
530
224
    return obj;
531
224
}
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
528
730M
{
529
730M
    Py_INCREF(obj);
530
730M
    return obj;
531
730M
}
Unexecuted instantiation: boolobject.c:_Py_NewRef
Unexecuted instantiation: bytes_methods.c:_Py_NewRef
bytearrayobject.c:_Py_NewRef
Line
Count
Source
528
310k
{
529
310k
    Py_INCREF(obj);
530
310k
    return obj;
531
310k
}
Unexecuted instantiation: capsule.c:_Py_NewRef
Unexecuted instantiation: cellobject.c:_Py_NewRef
classobject.c:_Py_NewRef
Line
Count
Source
528
95.8M
{
529
95.8M
    Py_INCREF(obj);
530
95.8M
    return obj;
531
95.8M
}
codeobject.c:_Py_NewRef
Line
Count
Source
528
1.50M
{
529
1.50M
    Py_INCREF(obj);
530
1.50M
    return obj;
531
1.50M
}
Unexecuted instantiation: complexobject.c:_Py_NewRef
descrobject.c:_Py_NewRef
Line
Count
Source
528
22.4M
{
529
22.4M
    Py_INCREF(obj);
530
22.4M
    return obj;
531
22.4M
}
enumobject.c:_Py_NewRef
Line
Count
Source
528
20
{
529
20
    Py_INCREF(obj);
530
20
    return obj;
531
20
}
genobject.c:_Py_NewRef
Line
Count
Source
528
46.1M
{
529
46.1M
    Py_INCREF(obj);
530
46.1M
    return obj;
531
46.1M
}
Unexecuted instantiation: fileobject.c:_Py_NewRef
frameobject.c:_Py_NewRef
Line
Count
Source
528
17.0M
{
529
17.0M
    Py_INCREF(obj);
530
17.0M
    return obj;
531
17.0M
}
funcobject.c:_Py_NewRef
Line
Count
Source
528
34.3M
{
529
34.3M
    Py_INCREF(obj);
530
34.3M
    return obj;
531
34.3M
}
Unexecuted instantiation: interpolationobject.c:_Py_NewRef
iterobject.c:_Py_NewRef
Line
Count
Source
528
3.07M
{
529
3.07M
    Py_INCREF(obj);
530
3.07M
    return obj;
531
3.07M
}
odictobject.c:_Py_NewRef
Line
Count
Source
528
192
{
529
192
    Py_INCREF(obj);
530
192
    return obj;
531
192
}
methodobject.c:_Py_NewRef
Line
Count
Source
528
9.93M
{
529
9.93M
    Py_INCREF(obj);
530
9.93M
    return obj;
531
9.93M
}
Unexecuted instantiation: namespaceobject.c:_Py_NewRef
Unexecuted instantiation: _contextvars.c:_Py_NewRef
Python-ast.c:_Py_NewRef
Line
Count
Source
528
410k
{
529
410k
    Py_INCREF(obj);
530
410k
    return obj;
531
410k
}
Unexecuted instantiation: Python-tokenize.c:_Py_NewRef
Unexecuted instantiation: asdl.c:_Py_NewRef
assemble.c:_Py_NewRef
Line
Count
Source
528
57.8k
{
529
57.8k
    Py_INCREF(obj);
530
57.8k
    return obj;
531
57.8k
}
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
528
18.6k
{
529
18.6k
    Py_INCREF(obj);
530
18.6k
    return obj;
531
18.6k
}
Unexecuted instantiation: pegen_errors.c:_Py_NewRef
Unexecuted instantiation: parser.c:_Py_NewRef
Unexecuted instantiation: buffer.c:_Py_NewRef
Unexecuted instantiation: lexer.c:_Py_NewRef
Unexecuted instantiation: 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
532
533
static inline PyObject* _Py_XNewRef(PyObject *obj)
534
1.81G
{
535
1.81G
    Py_XINCREF(obj);
536
1.81G
    return obj;
537
1.81G
}
Unexecuted instantiation: bytesobject.c:_Py_XNewRef
Unexecuted instantiation: call.c:_Py_XNewRef
exceptions.c:_Py_XNewRef
Line
Count
Source
534
117M
{
535
117M
    Py_XINCREF(obj);
536
117M
    return obj;
537
117M
}
Unexecuted instantiation: genericaliasobject.c:_Py_XNewRef
Unexecuted instantiation: floatobject.c:_Py_XNewRef
listobject.c:_Py_XNewRef
Line
Count
Source
534
6.24M
{
535
6.24M
    Py_XINCREF(obj);
536
6.24M
    return obj;
537
6.24M
}
Unexecuted instantiation: longobject.c:_Py_XNewRef
dictobject.c:_Py_XNewRef
Line
Count
Source
534
733M
{
535
733M
    Py_XINCREF(obj);
536
733M
    return obj;
537
733M
}
Unexecuted instantiation: memoryobject.c:_Py_XNewRef
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
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
534
267k
{
535
267k
    Py_XINCREF(obj);
536
267k
    return obj;
537
267k
}
typevarobject.c:_Py_XNewRef
Line
Count
Source
534
296
{
535
296
    Py_XINCREF(obj);
536
296
    return obj;
537
296
}
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
534
295k
{
535
295k
    Py_XINCREF(obj);
536
295k
    return obj;
537
295k
}
Unexecuted instantiation: _warnings.c:_Py_XNewRef
bltinmodule.c:_Py_XNewRef
Line
Count
Source
534
561
{
535
561
    Py_XINCREF(obj);
536
561
    return obj;
537
561
}
ceval.c:_Py_XNewRef
Line
Count
Source
534
88.8M
{
535
88.8M
    Py_XINCREF(obj);
536
88.8M
    return obj;
537
88.8M
}
Unexecuted instantiation: codecs.c:_Py_XNewRef
Unexecuted instantiation: codegen.c:_Py_XNewRef
compile.c:_Py_XNewRef
Line
Count
Source
534
12.2k
{
535
12.2k
    Py_XINCREF(obj);
536
12.2k
    return obj;
537
12.2k
}
context.c:_Py_XNewRef
Line
Count
Source
534
42
{
535
42
    Py_XINCREF(obj);
536
42
    return obj;
537
42
}
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
534
34.4k
{
535
34.4k
    Py_XINCREF(obj);
536
34.4k
    return obj;
537
34.4k
}
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
534
1.02M
{
535
1.02M
    Py_XINCREF(obj);
536
1.02M
    return obj;
537
1.02M
}
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
structmember.c:_Py_XNewRef
Line
Count
Source
534
1.93M
{
535
1.93M
    Py_XINCREF(obj);
536
1.93M
    return obj;
537
1.93M
}
Unexecuted instantiation: symtable.c:_Py_XNewRef
sysmodule.c:_Py_XNewRef
Line
Count
Source
534
28
{
535
28
    Py_XINCREF(obj);
536
28
    return obj;
537
28
}
Unexecuted instantiation: thread.c:_Py_XNewRef
traceback.c:_Py_XNewRef
Line
Count
Source
534
126M
{
535
126M
    Py_XINCREF(obj);
536
126M
    return obj;
537
126M
}
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: 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
534
197k
{
535
197k
    Py_XINCREF(obj);
536
197k
    return obj;
537
197k
}
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
534
56
{
535
56
    Py_XINCREF(obj);
536
56
    return obj;
537
56
}
Unexecuted instantiation: _codecsmodule.c:_Py_XNewRef
_collectionsmodule.c:_Py_XNewRef
Line
Count
Source
534
4
{
535
4
    Py_XINCREF(obj);
536
4
    return obj;
537
4
}
Unexecuted instantiation: errnomodule.c:_Py_XNewRef
Unexecuted instantiation: _iomodule.c:_Py_XNewRef
Unexecuted instantiation: iobase.c:_Py_XNewRef
Unexecuted instantiation: fileio.c:_Py_XNewRef
Unexecuted instantiation: bytesio.c:_Py_XNewRef
Unexecuted instantiation: bufferedio.c:_Py_XNewRef
Unexecuted instantiation: textio.c:_Py_XNewRef
Unexecuted instantiation: stringio.c:_Py_XNewRef
Unexecuted instantiation: itertoolsmodule.c:_Py_XNewRef
Unexecuted instantiation: sre.c:_Py_XNewRef
Unexecuted instantiation: _sysconfig.c:_Py_XNewRef
_threadmodule.c:_Py_XNewRef
Line
Count
Source
534
4
{
535
4
    Py_XINCREF(obj);
536
4
    return obj;
537
4
}
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
534
1.13k
{
535
1.13k
    Py_XINCREF(obj);
536
1.13k
    return obj;
537
1.13k
}
Unexecuted instantiation: _functoolsmodule.c:_Py_XNewRef
Unexecuted instantiation: _localemodule.c:_Py_XNewRef
Unexecuted instantiation: _opcode.c:_Py_XNewRef
Unexecuted instantiation: _operator.c:_Py_XNewRef
Unexecuted instantiation: _stat.c:_Py_XNewRef
Unexecuted instantiation: symtablemodule.c:_Py_XNewRef
Unexecuted instantiation: pwdmodule.c:_Py_XNewRef
getpath.c:_Py_XNewRef
Line
Count
Source
534
84
{
535
84
    Py_XINCREF(obj);
536
84
    return obj;
537
84
}
Unexecuted instantiation: frozen.c:_Py_XNewRef
Unexecuted instantiation: getbuildinfo.c:_Py_XNewRef
Unexecuted instantiation: peg_api.c:_Py_XNewRef
Unexecuted instantiation: file_tokenizer.c:_Py_XNewRef
Unexecuted instantiation: helpers.c:_Py_XNewRef
Unexecuted instantiation: myreadline.c:_Py_XNewRef
abstract.c:_Py_XNewRef
Line
Count
Source
534
47.1M
{
535
47.1M
    Py_XINCREF(obj);
536
47.1M
    return obj;
537
47.1M
}
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
534
9.06M
{
535
9.06M
    Py_XINCREF(obj);
536
9.06M
    return obj;
537
9.06M
}
Unexecuted instantiation: classobject.c:_Py_XNewRef
codeobject.c:_Py_XNewRef
Line
Count
Source
534
8.04k
{
535
8.04k
    Py_XINCREF(obj);
536
8.04k
    return obj;
537
8.04k
}
Unexecuted instantiation: complexobject.c:_Py_XNewRef
descrobject.c:_Py_XNewRef
Line
Count
Source
534
79.7k
{
535
79.7k
    Py_XINCREF(obj);
536
79.7k
    return obj;
537
79.7k
}
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
534
16.0M
{
535
16.0M
    Py_XINCREF(obj);
536
16.0M
    return obj;
537
16.0M
}
funcobject.c:_Py_XNewRef
Line
Count
Source
534
18.7k
{
535
18.7k
    Py_XINCREF(obj);
536
18.7k
    return obj;
537
18.7k
}
Unexecuted instantiation: interpolationobject.c:_Py_XNewRef
Unexecuted instantiation: iterobject.c:_Py_XNewRef
Unexecuted instantiation: odictobject.c:_Py_XNewRef
methodobject.c:_Py_XNewRef
Line
Count
Source
534
669M
{
535
669M
    Py_XINCREF(obj);
536
669M
    return obj;
537
669M
}
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
534
18.6k
{
535
18.6k
    Py_XINCREF(obj);
536
18.6k
    return obj;
537
18.6k
}
Unexecuted instantiation: pegen_errors.c:_Py_XNewRef
Unexecuted instantiation: parser.c:_Py_XNewRef
Unexecuted instantiation: buffer.c:_Py_XNewRef
Unexecuted instantiation: lexer.c:_Py_XNewRef
Unexecuted instantiation: 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
538
539
// Py_NewRef() and Py_XNewRef() are exported as functions for the stable ABI.
540
// Names overridden with macros by static inline functions for best
541
// performances.
542
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
543
15.2G
#  define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj))
544
1.79G
#  define Py_XNewRef(obj) _Py_XNewRef(_PyObject_CAST(obj))
545
#else
546
#  define Py_NewRef(obj) _Py_NewRef(obj)
547
#  define Py_XNewRef(obj) _Py_XNewRef(obj)
548
#endif
549
550
551
#ifdef __cplusplus
552
}
553
#endif
554
#endif   // !_Py_REFCOUNT_H