Coverage Report

Created: 2025-12-07 07:03

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
15.2G
#define _Py_IMMORTAL_INITIAL_REFCNT (3ULL << 30)
47
255
#define _Py_IMMORTAL_MINIMUM_REFCNT (1ULL << 31)
48
260M
#define _Py_STATIC_FLAG_BITS ((Py_ssize_t)(_Py_STATICALLY_ALLOCATED_FLAG | _Py_IMMORTAL_FLAGS))
49
260M
#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.10G
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
1.10G
    #if !defined(Py_GIL_DISABLED)
104
1.10G
        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.10G
    }
bytesobject.c:_Py_REFCNT
Line
Count
Source
102
1.88M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
1.88M
    #if !defined(Py_GIL_DISABLED)
104
1.88M
        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.88M
    }
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
255
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
255
    #if !defined(Py_GIL_DISABLED)
104
255
        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
255
    }
longobject.c:_Py_REFCNT
Line
Count
Source
102
121
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
121
    #if !defined(Py_GIL_DISABLED)
104
121
        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
121
    }
dictobject.c:_Py_REFCNT
Line
Count
Source
102
637M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
637M
    #if !defined(Py_GIL_DISABLED)
104
637M
        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
637M
    }
Unexecuted instantiation: memoryobject.c:_Py_REFCNT
Unexecuted instantiation: moduleobject.c:_Py_REFCNT
object.c:_Py_REFCNT
Line
Count
Source
102
69.0M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
69.0M
    #if !defined(Py_GIL_DISABLED)
104
69.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
69.0M
    }
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.55k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
2.55k
    #if !defined(Py_GIL_DISABLED)
104
2.55k
        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.55k
    }
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
98.4k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
98.4k
    #if !defined(Py_GIL_DISABLED)
104
98.4k
        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
98.4k
    }
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
8.62M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
8.62M
    #if !defined(Py_GIL_DISABLED)
104
8.62M
        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
8.62M
    }
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
73.2M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
73.2M
    #if !defined(Py_GIL_DISABLED)
104
73.2M
        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
73.2M
    }
Unexecuted instantiation: unionobject.c:_Py_REFCNT
weakrefobject.c:_Py_REFCNT
Line
Count
Source
102
50.6M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
50.6M
    #if !defined(Py_GIL_DISABLED)
104
50.6M
        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
50.6M
    }
Unexecuted instantiation: _warnings.c:_Py_REFCNT
bltinmodule.c:_Py_REFCNT
Line
Count
Source
102
25.8M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
25.8M
    #if !defined(Py_GIL_DISABLED)
104
25.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
25.8M
    }
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
45.3M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
45.3M
    #if !defined(Py_GIL_DISABLED)
104
45.3M
        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
45.3M
    }
Unexecuted instantiation: future.c:_Py_REFCNT
gc.c:_Py_REFCNT
Line
Count
Source
102
69.7M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
69.7M
    #if !defined(Py_GIL_DISABLED)
104
69.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
69.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
202k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
202k
    #if !defined(Py_GIL_DISABLED)
104
202k
        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
202k
    }
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: 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
61.4k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
61.4k
    #if !defined(Py_GIL_DISABLED)
104
61.4k
        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
61.4k
    }
Unexecuted instantiation: fileio.c:_Py_REFCNT
bytesio.c:_Py_REFCNT
Line
Count
Source
102
1.81k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
1.81k
    #if !defined(Py_GIL_DISABLED)
104
1.81k
        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.81k
    }
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
135k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
135k
    #if !defined(Py_GIL_DISABLED)
104
135k
        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
135k
    }
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
220k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
220k
    #if !defined(Py_GIL_DISABLED)
104
220k
        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
220k
    }
Unexecuted instantiation: complexobject.c:_Py_REFCNT
Unexecuted instantiation: descrobject.c:_Py_REFCNT
enumobject.c:_Py_REFCNT
Line
Count
Source
102
99.1M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
99.1M
    #if !defined(Py_GIL_DISABLED)
104
99.1M
        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
99.1M
    }
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
28.2M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
28.2M
    #if !defined(Py_GIL_DISABLED)
104
28.2M
        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.2M
    }
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: structmember.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
755M
    #  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
26.3G
{
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
26.3G
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
26.3G
}
bytesobject.c:_Py_IsImmortal
Line
Count
Source
124
4.71M
{
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.71M
    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.71M
}
call.c:_Py_IsImmortal
Line
Count
Source
124
189M
{
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
189M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
189M
}
exceptions.c:_Py_IsImmortal
Line
Count
Source
124
173M
{
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
173M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
173M
}
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
70.8k
{
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
70.8k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
70.8k
}
listobject.c:_Py_IsImmortal
Line
Count
Source
124
1.72G
{
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.72G
    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.72G
}
longobject.c:_Py_IsImmortal
Line
Count
Source
124
38.6M
{
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
38.6M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
38.6M
}
dictobject.c:_Py_IsImmortal
Line
Count
Source
124
1.96G
{
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.96G
    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.96G
}
memoryobject.c:_Py_IsImmortal
Line
Count
Source
124
1.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
1.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
1.51M
}
moduleobject.c:_Py_IsImmortal
Line
Count
Source
124
2.48M
{
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.48M
    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.48M
}
object.c:_Py_IsImmortal
Line
Count
Source
124
928M
{
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
928M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
928M
}
Unexecuted instantiation: obmalloc.c:_Py_IsImmortal
Unexecuted instantiation: picklebufobject.c:_Py_IsImmortal
rangeobject.c:_Py_IsImmortal
Line
Count
Source
124
67.6M
{
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
67.6M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
67.6M
}
setobject.c:_Py_IsImmortal
Line
Count
Source
124
14.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
14.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
14.4M
}
sliceobject.c:_Py_IsImmortal
Line
Count
Source
124
166M
{
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
166M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
166M
}
structseq.c:_Py_IsImmortal
Line
Count
Source
124
7.23M
{
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
7.23M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
7.23M
}
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
5.12G
{
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.12G
    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.12G
}
typeobject.c:_Py_IsImmortal
Line
Count
Source
124
1.23G
{
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.23G
    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.23G
}
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
71.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
71.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
71.4M
}
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
16.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
16.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
16.1M
}
Unexecuted instantiation: unicodectype.c:_Py_IsImmortal
unicodeobject.c:_Py_IsImmortal
Line
Count
Source
124
209M
{
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
209M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
209M
}
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
82.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
82.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
82.1k
}
_warnings.c:_Py_IsImmortal
Line
Count
Source
124
29.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
29.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
29.0M
}
bltinmodule.c:_Py_IsImmortal
Line
Count
Source
124
1.31G
{
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.31G
    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.31G
}
ceval.c:_Py_IsImmortal
Line
Count
Source
124
9.97G
{
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.97G
    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.97G
}
codecs.c:_Py_IsImmortal
Line
Count
Source
124
6.26M
{
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.26M
    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.26M
}
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
754k
{
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
754k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
754k
}
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
91.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
91.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
91.8M
}
flowgraph.c:_Py_IsImmortal
Line
Count
Source
124
87.8k
{
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
87.8k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
87.8k
}
frame.c:_Py_IsImmortal
Line
Count
Source
124
84.3M
{
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
84.3M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
84.3M
}
Unexecuted instantiation: future.c:_Py_IsImmortal
gc.c:_Py_IsImmortal
Line
Count
Source
124
573M
{
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
573M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
573M
}
Unexecuted instantiation: gc_gil.c:_Py_IsImmortal
getargs.c:_Py_IsImmortal
Line
Count
Source
124
5.00M
{
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.00M
    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.00M
}
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
10.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
10.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
10.5M
}
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.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
52.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
52.1k
}
Unexecuted instantiation: legacy_tracing.c:_Py_IsImmortal
Unexecuted instantiation: lock.c:_Py_IsImmortal
marshal.c:_Py_IsImmortal
Line
Count
Source
124
1.53M
{
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.53M
    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.53M
}
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.48M
{
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.48M
    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.48M
}
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
658
{
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
658
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
658
}
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
1.97M
{
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.97M
    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.97M
}
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
3.60M
{
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.60M
    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.60M
}
Unexecuted instantiation: thread.c:_Py_IsImmortal
traceback.c:_Py_IsImmortal
Line
Count
Source
124
126M
{
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
126M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
126M
}
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.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
10.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
10.3k
}
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
3.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
3.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
3.80M
}
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
551
{
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
551
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
551
}
Unexecuted instantiation: _codecsmodule.c:_Py_IsImmortal
_collectionsmodule.c:_Py_IsImmortal
Line
Count
Source
124
111k
{
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
111k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
111k
}
Unexecuted instantiation: errnomodule.c:_Py_IsImmortal
_iomodule.c:_Py_IsImmortal
Line
Count
Source
124
166k
{
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
166k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
166k
}
iobase.c:_Py_IsImmortal
Line
Count
Source
124
316k
{
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
316k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
316k
}
fileio.c:_Py_IsImmortal
Line
Count
Source
124
40.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
40.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
40.1k
}
bytesio.c:_Py_IsImmortal
Line
Count
Source
124
182k
{
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
182k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
182k
}
bufferedio.c:_Py_IsImmortal
Line
Count
Source
124
4.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
4.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
4.51M
}
textio.c:_Py_IsImmortal
Line
Count
Source
124
756k
{
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
756k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
756k
}
stringio.c:_Py_IsImmortal
Line
Count
Source
124
309k
{
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
309k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
309k
}
itertoolsmodule.c:_Py_IsImmortal
Line
Count
Source
124
86.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
86.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
86.4k
}
sre.c:_Py_IsImmortal
Line
Count
Source
124
443M
{
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
443M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
443M
}
Unexecuted instantiation: _sysconfig.c:_Py_IsImmortal
_threadmodule.c:_Py_IsImmortal
Line
Count
Source
124
34.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
34.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
34.7k
}
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
95.8k
{
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.8k
    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.8k
}
_functoolsmodule.c:_Py_IsImmortal
Line
Count
Source
124
536k
{
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
536k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
536k
}
Unexecuted instantiation: _localemodule.c:_Py_IsImmortal
Unexecuted instantiation: _opcode.c:_Py_IsImmortal
_operator.c:_Py_IsImmortal
Line
Count
Source
124
569k
{
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
569k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
569k
}
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.2k
{
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.2k
    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.2k
}
Unexecuted instantiation: myreadline.c:_Py_IsImmortal
abstract.c:_Py_IsImmortal
Line
Count
Source
124
604M
{
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
604M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
604M
}
Unexecuted instantiation: boolobject.c:_Py_IsImmortal
Unexecuted instantiation: bytes_methods.c:_Py_IsImmortal
bytearrayobject.c:_Py_IsImmortal
Line
Count
Source
124
3.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
3.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
3.33M
}
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
453k
{
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
453k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
453k
}
classobject.c:_Py_IsImmortal
Line
Count
Source
124
79.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
79.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
79.8M
}
codeobject.c:_Py_IsImmortal
Line
Count
Source
124
1.25M
{
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.25M
    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.25M
}
Unexecuted instantiation: complexobject.c:_Py_IsImmortal
descrobject.c:_Py_IsImmortal
Line
Count
Source
124
85.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
85.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
85.7M
}
enumobject.c:_Py_IsImmortal
Line
Count
Source
124
260M
{
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
260M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
260M
}
genobject.c:_Py_IsImmortal
Line
Count
Source
124
147M
{
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
147M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
147M
}
fileobject.c:_Py_IsImmortal
Line
Count
Source
124
239k
{
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
239k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
239k
}
frameobject.c:_Py_IsImmortal
Line
Count
Source
124
28.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
28.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
28.9M
}
funcobject.c:_Py_IsImmortal
Line
Count
Source
124
155M
{
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
155M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
155M
}
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
2.48M
{
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.48M
    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.48M
}
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
326M
{
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
326M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
326M
}
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.75M
{
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.75M
    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.75M
}
Unexecuted instantiation: Python-tokenize.c:_Py_IsImmortal
Unexecuted instantiation: asdl.c:_Py_IsImmortal
assemble.c:_Py_IsImmortal
Line
Count
Source
124
59.8k
{
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.8k
    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.8k
}
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
structmember.c:_Py_IsImmortal
Line
Count
Source
124
1.67k
{
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.67k
    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.67k
}
pegen.c:_Py_IsImmortal
Line
Count
Source
124
128k
{
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
128k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
128k
}
pegen_errors.c:_Py_IsImmortal
Line
Count
Source
124
39.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
39.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
39.9k
}
Unexecuted instantiation: parser.c:_Py_IsImmortal
Unexecuted instantiation: buffer.c:_Py_IsImmortal
lexer.c:_Py_IsImmortal
Line
Count
Source
124
12.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
12.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
12.4k
}
state.c:_Py_IsImmortal
Line
Count
Source
124
21.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
21.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
21.3k
}
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
38.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
38.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
38.7k
}
134
28.4G
#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: 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: structmember.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
710M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
710M
    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
710M
    if (_Py_IsImmortal(ob)) {
163
796
        return;
164
796
    }
165
710M
#ifndef Py_GIL_DISABLED
166
710M
#if SIZEOF_VOID_P > 4
167
710M
    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
710M
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
710M
}
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
634M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
634M
    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
634M
    if (_Py_IsImmortal(ob)) {
163
0
        return;
164
0
    }
165
634M
#ifndef Py_GIL_DISABLED
166
634M
#if SIZEOF_VOID_P > 4
167
634M
    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
634M
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
634M
}
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.0M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
46.0M
    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.0M
    if (_Py_IsImmortal(ob)) {
163
0
        return;
164
0
    }
165
46.0M
#ifndef Py_GIL_DISABLED
166
46.0M
#if SIZEOF_VOID_P > 4
167
46.0M
    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.0M
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
46.0M
}
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
1.21M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
1.21M
    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
1.21M
    if (_Py_IsImmortal(ob)) {
163
0
        return;
164
0
    }
165
1.21M
#ifndef Py_GIL_DISABLED
166
1.21M
#if SIZEOF_VOID_P > 4
167
1.21M
    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
1.21M
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
1.21M
}
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: 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
220k
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
220k
    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
220k
    if (_Py_IsImmortal(ob)) {
163
0
        return;
164
0
    }
165
220k
#ifndef Py_GIL_DISABLED
166
220k
#if SIZEOF_VOID_P > 4
167
220k
    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
220k
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
220k
}
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
28.2M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
28.2M
    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
28.2M
    if (_Py_IsImmortal(ob)) {
163
0
        return;
164
0
    }
165
28.2M
#ifndef Py_GIL_DISABLED
166
28.2M
#if SIZEOF_VOID_P > 4
167
28.2M
    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
28.2M
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
28.2M
}
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: structmember.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
710M
#  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
15.0G
{
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
15.0G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
15.0G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
6.87G
        _Py_INCREF_IMMORTAL_STAT_INC();
285
6.87G
        return;
286
6.87G
    }
287
8.14G
    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
8.14G
    _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
8.14G
#endif
303
8.14G
}
bytesobject.c:Py_INCREF
Line
Count
Source
252
55.7M
{
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
55.7M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
55.7M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
53.9M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
53.9M
        return;
286
53.9M
    }
287
1.74M
    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.74M
    _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.74M
#endif
303
1.74M
}
call.c:Py_INCREF
Line
Count
Source
252
29.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
29.6M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
29.6M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
10.5M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
10.5M
        return;
286
10.5M
    }
287
19.1M
    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
19.1M
    _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
19.1M
#endif
303
19.1M
}
exceptions.c:Py_INCREF
Line
Count
Source
252
148M
{
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
148M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
148M
    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
102M
    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
102M
    _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
102M
#endif
303
102M
}
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.11M
{
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.11M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.11M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.11M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.11M
        return;
286
1.11M
    }
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.33G
{
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.33G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.33G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
293M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
293M
        return;
286
293M
    }
287
1.04G
    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.04G
    _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.04G
#endif
303
1.04G
}
longobject.c:Py_INCREF
Line
Count
Source
252
158M
{
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
158M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
158M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
158M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
158M
        return;
286
158M
    }
287
40.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
40.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
40.9k
#endif
303
40.9k
}
dictobject.c:Py_INCREF
Line
Count
Source
252
1.94G
{
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.94G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.94G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
525M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
525M
        return;
286
525M
    }
287
1.42G
    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.42G
    _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.42G
#endif
303
1.42G
}
memoryobject.c:Py_INCREF
Line
Count
Source
252
1.36M
{
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.36M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.36M
    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.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
1.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
1.36M
#endif
303
1.36M
}
moduleobject.c:Py_INCREF
Line
Count
Source
252
7.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
7.45k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
7.45k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
6.57k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
6.57k
        return;
286
6.57k
    }
287
874
    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
874
    _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
874
#endif
303
874
}
object.c:Py_INCREF
Line
Count
Source
252
1.03G
{
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.03G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.03G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
715M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
715M
        return;
286
715M
    }
287
315M
    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
315M
    _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
315M
#endif
303
315M
}
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
11.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
11.4M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
11.4M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
891k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
891k
        return;
286
891k
    }
287
10.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
10.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
10.5M
#endif
303
10.5M
}
sliceobject.c:Py_INCREF
Line
Count
Source
252
61.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
61.2M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
61.2M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
61.2M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
61.2M
        return;
286
61.2M
    }
287
1.19k
    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.19k
    _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.19k
#endif
303
1.19k
}
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
4.82G
{
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.82G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
4.82G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
2.14G
        _Py_INCREF_IMMORTAL_STAT_INC();
285
2.14G
        return;
286
2.14G
    }
287
2.68G
    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.68G
    _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.68G
#endif
303
2.68G
}
typeobject.c:Py_INCREF
Line
Count
Source
252
412M
{
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
412M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
412M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
168M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
168M
        return;
286
168M
    }
287
244M
    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
244M
    _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
244M
#endif
303
244M
}
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
54.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
54.9M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
54.9M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
22.6M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
22.6M
        return;
286
22.6M
    }
287
32.3M
    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
32.3M
    _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
32.3M
#endif
303
32.3M
}
Unexecuted instantiation: unicode_formatter.c:Py_INCREF
unicode_writer.c:Py_INCREF
Line
Count
Source
252
10.9k
{
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
10.9k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
10.9k
    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
10.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
10.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
10.9k
#endif
303
10.9k
}
Unexecuted instantiation: unicodectype.c:Py_INCREF
unicodeobject.c:Py_INCREF
Line
Count
Source
252
796M
{
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
796M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
796M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
706M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
706M
        return;
286
706M
    }
287
90.1M
    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
90.1M
    _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
90.1M
#endif
303
90.1M
}
Unexecuted instantiation: unionobject.c:Py_INCREF
weakrefobject.c:Py_INCREF
Line
Count
Source
252
408k
{
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
408k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
408k
    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
405k
    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
405k
    _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
405k
#endif
303
405k
}
_warnings.c:Py_INCREF
Line
Count
Source
252
3.42M
{
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.42M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
3.42M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.72M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.72M
        return;
286
1.72M
    }
287
1.69M
    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.69M
    _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.69M
#endif
303
1.69M
}
bltinmodule.c:Py_INCREF
Line
Count
Source
252
86.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
86.5M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
86.5M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
39.9M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
39.9M
        return;
286
39.9M
    }
287
46.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
46.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
46.6M
#endif
303
46.6M
}
ceval.c:Py_INCREF
Line
Count
Source
252
1.77G
{
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.77G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.77G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
972M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
972M
        return;
286
972M
    }
287
805M
    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
805M
    _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
805M
#endif
303
805M
}
codecs.c:Py_INCREF
Line
Count
Source
252
2.79M
{
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.79M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
2.79M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
317k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
317k
        return;
286
317k
    }
287
2.47M
    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.47M
    _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.47M
#endif
303
2.47M
}
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
138k
{
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
138k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
138k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
59.6k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
59.6k
        return;
286
59.6k
    }
287
78.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
78.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
78.5k
#endif
303
78.5k
}
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
82.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
82.2M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
82.2M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
36.1M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
36.1M
        return;
286
36.1M
    }
287
46.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
46.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
46.0M
#endif
303
46.0M
}
flowgraph.c:Py_INCREF
Line
Count
Source
252
117k
{
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
117k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
117k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
56.9k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
56.9k
        return;
286
56.9k
    }
287
60.1k
    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
60.1k
    _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
60.1k
#endif
303
60.1k
}
frame.c:Py_INCREF
Line
Count
Source
252
38.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
38.5M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
38.5M
    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
38.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
38.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
38.5M
#endif
303
38.5M
}
Unexecuted instantiation: future.c:Py_INCREF
gc.c:Py_INCREF
Line
Count
Source
252
443M
{
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
443M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
443M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
377M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
377M
        return;
286
377M
    }
287
66.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
66.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
66.2M
#endif
303
66.2M
}
Unexecuted instantiation: gc_gil.c:Py_INCREF
getargs.c:Py_INCREF
Line
Count
Source
252
2.27M
{
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.27M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
2.27M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.61M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.61M
        return;
286
1.61M
    }
287
663k
    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
663k
    _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
663k
#endif
303
663k
}
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
7.13M
{
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
7.13M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
7.13M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
2.04M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
2.04M
        return;
286
2.04M
    }
287
5.08M
    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
5.08M
    _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
5.08M
#endif
303
5.08M
}
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
21.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
21.7k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
21.7k
    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
21.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
21.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
21.7k
#endif
303
21.7k
}
Unexecuted instantiation: legacy_tracing.c:Py_INCREF
Unexecuted instantiation: lock.c:Py_INCREF
marshal.c:Py_INCREF
Line
Count
Source
252
1.61M
{
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.61M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.61M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.47M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.47M
        return;
286
1.47M
    }
287
136k
    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
136k
    _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
136k
#endif
303
136k
}
modsupport.c:Py_INCREF
Line
Count
Source
252
2.39M
{
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.39M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
2.39M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
627k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
627k
        return;
286
627k
    }
287
1.76M
    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.76M
    _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.76M
#endif
303
1.76M
}
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
768k
{
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
768k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
768k
    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
768k
    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
768k
    _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
768k
#endif
303
768k
}
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
symtable.c:Py_INCREF
Line
Count
Source
252
351k
{
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
351k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
351k
    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
846
    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
846
    _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
846
#endif
303
846
}
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
63.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
63.4M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
63.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
63.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
63.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
63.4M
#endif
303
63.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
2.72M
{
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.72M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
2.72M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
510k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
510k
        return;
286
510k
    }
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
}
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
219
{
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
219
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
219
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
160
        _Py_INCREF_IMMORTAL_STAT_INC();
285
160
        return;
286
160
    }
287
59
    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
59
    _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
59
#endif
303
59
}
Unexecuted instantiation: _codecsmodule.c:Py_INCREF
_collectionsmodule.c:Py_INCREF
Line
Count
Source
252
23.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
23.8M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
23.8M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
21.1M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
21.1M
        return;
286
21.1M
    }
287
2.71M
    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.71M
    _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.71M
#endif
303
2.71M
}
Unexecuted instantiation: errnomodule.c:Py_INCREF
_iomodule.c:Py_INCREF
Line
Count
Source
252
356
{
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
356
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
356
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
356
        _Py_INCREF_IMMORTAL_STAT_INC();
285
356
        return;
286
356
    }
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
64.2k
{
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
64.2k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
64.2k
    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
64.2k
    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.2k
    _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.2k
#endif
303
64.2k
}
Unexecuted instantiation: fileio.c:Py_INCREF
bytesio.c:Py_INCREF
Line
Count
Source
252
49.2k
{
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
49.2k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
49.2k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
375
        _Py_INCREF_IMMORTAL_STAT_INC();
285
375
        return;
286
375
    }
287
48.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
48.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
48.8k
#endif
303
48.8k
}
bufferedio.c:Py_INCREF
Line
Count
Source
252
26.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
26.1k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
26.1k
    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
26.1k
    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
26.1k
    _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
26.1k
#endif
303
26.1k
}
textio.c:Py_INCREF
Line
Count
Source
252
434k
{
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
434k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
434k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
19.6k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
19.6k
        return;
286
19.6k
    }
287
415k
    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
415k
    _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
415k
#endif
303
415k
}
stringio.c:Py_INCREF
Line
Count
Source
252
21.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
21.1k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
21.1k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
94
        _Py_INCREF_IMMORTAL_STAT_INC();
285
94
        return;
286
94
    }
287
21.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
21.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
21.0k
#endif
303
21.0k
}
itertoolsmodule.c:Py_INCREF
Line
Count
Source
252
37.4k
{
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
37.4k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
37.4k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
36.6k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
36.6k
        return;
286
36.6k
    }
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
246M
{
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
246M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
246M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
73.7M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
73.7M
        return;
286
73.7M
    }
287
172M
    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
172M
    _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
172M
#endif
303
172M
}
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
28.4k
{
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.4k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
28.4k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
28.2k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
28.2k
        return;
286
28.2k
    }
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
271k
{
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
271k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
271k
    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
270k
    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
270k
    _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
270k
#endif
303
270k
}
Unexecuted instantiation: _localemodule.c:Py_INCREF
Unexecuted instantiation: _opcode.c:Py_INCREF
_operator.c:Py_INCREF
Line
Count
Source
252
1.33M
{
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.33M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.33M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.30M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.30M
        return;
286
1.30M
    }
287
31.1k
    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
31.1k
    _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
31.1k
#endif
303
31.1k
}
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
666M
{
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
666M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
666M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
338M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
338M
        return;
286
338M
    }
287
327M
    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
327M
    _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
327M
#endif
303
327M
}
Unexecuted instantiation: boolobject.c:Py_INCREF
Unexecuted instantiation: bytes_methods.c:Py_INCREF
bytearrayobject.c:Py_INCREF
Line
Count
Source
252
282k
{
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
282k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
282k
    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
282k
    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
282k
    _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
282k
#endif
303
282k
}
Unexecuted instantiation: capsule.c:Py_INCREF
cellobject.c:Py_INCREF
Line
Count
Source
252
129k
{
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
129k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
129k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
50.0k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
50.0k
        return;
286
50.0k
    }
287
79.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
79.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
79.0k
#endif
303
79.0k
}
classobject.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
10
        _Py_INCREF_IMMORTAL_STAT_INC();
285
10
        return;
286
10
    }
287
79.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
79.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
79.9M
#endif
303
79.9M
}
codeobject.c:Py_INCREF
Line
Count
Source
252
1.63M
{
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.63M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.63M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
785k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
785k
        return;
286
785k
    }
287
853k
    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
853k
    _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
853k
#endif
303
853k
}
complexobject.c:Py_INCREF
Line
Count
Source
252
3.82k
{
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.82k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
3.82k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
3.82k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
3.82k
        return;
286
3.82k
    }
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
23.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
23.5M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
23.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
23.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
23.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
23.5M
#endif
303
23.5M
}
enumobject.c:Py_INCREF
Line
Count
Source
252
99.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
99.1M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
99.1M
    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
99.1M
    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
99.1M
    _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
99.1M
#endif
303
99.1M
}
genobject.c:Py_INCREF
Line
Count
Source
252
45.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
45.9M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
45.9M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
45.8M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
45.8M
        return;
286
45.8M
    }
287
71.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
71.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
71.8k
#endif
303
71.8k
}
Unexecuted instantiation: fileobject.c:Py_INCREF
frameobject.c:Py_INCREF
Line
Count
Source
252
17.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
17.8M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
17.8M
    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
17.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
17.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
17.8M
#endif
303
17.8M
}
funcobject.c:Py_INCREF
Line
Count
Source
252
90.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
90.4M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
90.4M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
42.4M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
42.4M
        return;
286
42.4M
    }
287
47.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
47.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
47.9M
#endif
303
47.9M
}
Unexecuted instantiation: interpolationobject.c:Py_INCREF
iterobject.c:Py_INCREF
Line
Count
Source
252
2.10M
{
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.10M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
2.10M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
377k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
377k
        return;
286
377k
    }
287
1.72M
    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.72M
    _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.72M
#endif
303
1.72M
}
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
326M
{
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
326M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
326M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
7.24M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
7.24M
        return;
286
7.24M
    }
287
319M
    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
319M
    _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
319M
#endif
303
319M
}
Unexecuted instantiation: namespaceobject.c:Py_INCREF
Unexecuted instantiation: _contextvars.c:Py_INCREF
Python-ast.c:Py_INCREF
Line
Count
Source
252
399k
{
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
399k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
399k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
211k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
211k
        return;
286
211k
    }
287
187k
    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
187k
    _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
187k
#endif
303
187k
}
Unexecuted instantiation: Python-tokenize.c:Py_INCREF
Unexecuted instantiation: asdl.c:Py_INCREF
assemble.c:Py_INCREF
Line
Count
Source
252
57.9k
{
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.9k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
57.9k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
57.8k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
57.8k
        return;
286
57.8k
    }
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
structmember.c:Py_INCREF
Line
Count
Source
252
1.45M
{
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.45M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.45M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
715k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
715k
        return;
286
715k
    }
287
740k
    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
740k
    _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
740k
#endif
303
740k
}
pegen.c:Py_INCREF
Line
Count
Source
252
19.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
19.1k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
19.1k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
357
        _Py_INCREF_IMMORTAL_STAT_INC();
285
357
        return;
286
357
    }
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
15.0G
#  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
14.1G
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
14.1G
    if (_Py_IsImmortal(op)) {
415
6.47G
        _Py_DECREF_IMMORTAL_STAT_INC();
416
6.47G
        return;
417
6.47G
    }
418
7.69G
    _Py_DECREF_STAT_INC();
419
7.69G
    if (--op->ob_refcnt == 0) {
420
1.42G
        _Py_Dealloc(op);
421
1.42G
    }
422
7.69G
}
bytesobject.c:Py_DECREF
Line
Count
Source
411
4.71M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
4.71M
    if (_Py_IsImmortal(op)) {
415
4.48M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
4.48M
        return;
417
4.48M
    }
418
222k
    _Py_DECREF_STAT_INC();
419
222k
    if (--op->ob_refcnt == 0) {
420
143k
        _Py_Dealloc(op);
421
143k
    }
422
222k
}
call.c:Py_DECREF
Line
Count
Source
411
189M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
189M
    if (_Py_IsImmortal(op)) {
415
71.9M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
71.9M
        return;
417
71.9M
    }
418
117M
    _Py_DECREF_STAT_INC();
419
117M
    if (--op->ob_refcnt == 0) {
420
87.9M
        _Py_Dealloc(op);
421
87.9M
    }
422
117M
}
exceptions.c:Py_DECREF
Line
Count
Source
411
173M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
173M
    if (_Py_IsImmortal(op)) {
415
47.4M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
47.4M
        return;
417
47.4M
    }
418
126M
    _Py_DECREF_STAT_INC();
419
126M
    if (--op->ob_refcnt == 0) {
420
90.9M
        _Py_Dealloc(op);
421
90.9M
    }
422
126M
}
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
70.8k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
70.8k
    if (_Py_IsImmortal(op)) {
415
5
        _Py_DECREF_IMMORTAL_STAT_INC();
416
5
        return;
417
5
    }
418
70.8k
    _Py_DECREF_STAT_INC();
419
70.8k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
70.8k
}
listobject.c:Py_DECREF
Line
Count
Source
411
1.72G
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.72G
    if (_Py_IsImmortal(op)) {
415
470M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
470M
        return;
417
470M
    }
418
1.25G
    _Py_DECREF_STAT_INC();
419
1.25G
    if (--op->ob_refcnt == 0) {
420
329M
        _Py_Dealloc(op);
421
329M
    }
422
1.25G
}
longobject.c:Py_DECREF
Line
Count
Source
411
15.8M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
15.8M
    if (_Py_IsImmortal(op)) {
415
8.07M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
8.07M
        return;
417
8.07M
    }
418
7.75M
    _Py_DECREF_STAT_INC();
419
7.75M
    if (--op->ob_refcnt == 0) {
420
5.13M
        _Py_Dealloc(op);
421
5.13M
    }
422
7.75M
}
dictobject.c:Py_DECREF
Line
Count
Source
411
1.31G
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.31G
    if (_Py_IsImmortal(op)) {
415
631M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
631M
        return;
417
631M
    }
418
687M
    _Py_DECREF_STAT_INC();
419
687M
    if (--op->ob_refcnt == 0) {
420
115M
        _Py_Dealloc(op);
421
115M
    }
422
687M
}
memoryobject.c:Py_DECREF
Line
Count
Source
411
1.51M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.51M
    if (_Py_IsImmortal(op)) {
415
88.8k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
88.8k
        return;
417
88.8k
    }
418
1.42M
    _Py_DECREF_STAT_INC();
419
1.42M
    if (--op->ob_refcnt == 0) {
420
653k
        _Py_Dealloc(op);
421
653k
    }
422
1.42M
}
moduleobject.c:Py_DECREF
Line
Count
Source
411
2.48M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2.48M
    if (_Py_IsImmortal(op)) {
415
2.43M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.43M
        return;
417
2.43M
    }
418
45.3k
    _Py_DECREF_STAT_INC();
419
45.3k
    if (--op->ob_refcnt == 0) {
420
5.13k
        _Py_Dealloc(op);
421
5.13k
    }
422
45.3k
}
object.c:Py_DECREF
Line
Count
Source
411
882M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
882M
    if (_Py_IsImmortal(op)) {
415
685M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
685M
        return;
417
685M
    }
418
196M
    _Py_DECREF_STAT_INC();
419
196M
    if (--op->ob_refcnt == 0) {
420
11.5k
        _Py_Dealloc(op);
421
11.5k
    }
422
196M
}
Unexecuted instantiation: obmalloc.c:Py_DECREF
Unexecuted instantiation: picklebufobject.c:Py_DECREF
rangeobject.c:Py_DECREF
Line
Count
Source
411
67.6M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
67.6M
    if (_Py_IsImmortal(op)) {
415
65.7M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
65.7M
        return;
417
65.7M
    }
418
1.91M
    _Py_DECREF_STAT_INC();
419
1.91M
    if (--op->ob_refcnt == 0) {
420
904k
        _Py_Dealloc(op);
421
904k
    }
422
1.91M
}
setobject.c:Py_DECREF
Line
Count
Source
411
14.4M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
14.4M
    if (_Py_IsImmortal(op)) {
415
4.08M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
4.08M
        return;
417
4.08M
    }
418
10.3M
    _Py_DECREF_STAT_INC();
419
10.3M
    if (--op->ob_refcnt == 0) {
420
1.25M
        _Py_Dealloc(op);
421
1.25M
    }
422
10.3M
}
sliceobject.c:Py_DECREF
Line
Count
Source
411
166M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
166M
    if (_Py_IsImmortal(op)) {
415
105M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
105M
        return;
417
105M
    }
418
61.0M
    _Py_DECREF_STAT_INC();
419
61.0M
    if (--op->ob_refcnt == 0) {
420
18.3M
        _Py_Dealloc(op);
421
18.3M
    }
422
61.0M
}
structseq.c:Py_DECREF
Line
Count
Source
411
7.23M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
7.23M
    if (_Py_IsImmortal(op)) {
415
2.13M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.13M
        return;
417
2.13M
    }
418
5.10M
    _Py_DECREF_STAT_INC();
419
5.10M
    if (--op->ob_refcnt == 0) {
420
4.70M
        _Py_Dealloc(op);
421
4.70M
    }
422
5.10M
}
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
5.12G
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
5.12G
    if (_Py_IsImmortal(op)) {
415
2.19G
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.19G
        return;
417
2.19G
    }
418
2.92G
    _Py_DECREF_STAT_INC();
419
2.92G
    if (--op->ob_refcnt == 0) {
420
128M
        _Py_Dealloc(op);
421
128M
    }
422
2.92G
}
typeobject.c:Py_DECREF
Line
Count
Source
411
509M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
509M
    if (_Py_IsImmortal(op)) {
415
84.7M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
84.7M
        return;
417
84.7M
    }
418
425M
    _Py_DECREF_STAT_INC();
419
425M
    if (--op->ob_refcnt == 0) {
420
34.3M
        _Py_Dealloc(op);
421
34.3M
    }
422
425M
}
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
71.4M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
71.4M
    if (_Py_IsImmortal(op)) {
415
22.6M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
22.6M
        return;
417
22.6M
    }
418
48.8M
    _Py_DECREF_STAT_INC();
419
48.8M
    if (--op->ob_refcnt == 0) {
420
12.5M
        _Py_Dealloc(op);
421
12.5M
    }
422
48.8M
}
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
16.1M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
16.1M
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
16.1M
    _Py_DECREF_STAT_INC();
419
16.1M
    if (--op->ob_refcnt == 0) {
420
16.1M
        _Py_Dealloc(op);
421
16.1M
    }
422
16.1M
}
Unexecuted instantiation: unicodectype.c:Py_DECREF
unicodeobject.c:Py_DECREF
Line
Count
Source
411
202M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
202M
    if (_Py_IsImmortal(op)) {
415
121M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
121M
        return;
417
121M
    }
418
81.0M
    _Py_DECREF_STAT_INC();
419
81.0M
    if (--op->ob_refcnt == 0) {
420
13.1M
        _Py_Dealloc(op);
421
13.1M
    }
422
81.0M
}
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
82.1k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
82.1k
    if (_Py_IsImmortal(op)) {
415
29.8k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
29.8k
        return;
417
29.8k
    }
418
52.3k
    _Py_DECREF_STAT_INC();
419
52.3k
    if (--op->ob_refcnt == 0) {
420
28.2k
        _Py_Dealloc(op);
421
28.2k
    }
422
52.3k
}
_warnings.c:Py_DECREF
Line
Count
Source
411
29.0M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
29.0M
    if (_Py_IsImmortal(op)) {
415
4.04M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
4.04M
        return;
417
4.04M
    }
418
25.0M
    _Py_DECREF_STAT_INC();
419
25.0M
    if (--op->ob_refcnt == 0) {
420
1.56M
        _Py_Dealloc(op);
421
1.56M
    }
422
25.0M
}
bltinmodule.c:Py_DECREF
Line
Count
Source
411
1.31G
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.31G
    if (_Py_IsImmortal(op)) {
415
1.13G
        _Py_DECREF_IMMORTAL_STAT_INC();
416
1.13G
        return;
417
1.13G
    }
418
181M
    _Py_DECREF_STAT_INC();
419
181M
    if (--op->ob_refcnt == 0) {
420
108M
        _Py_Dealloc(op);
421
108M
    }
422
181M
}
ceval.c:Py_DECREF
Line
Count
Source
411
5.47k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
5.47k
    if (_Py_IsImmortal(op)) {
415
594
        _Py_DECREF_IMMORTAL_STAT_INC();
416
594
        return;
417
594
    }
418
4.88k
    _Py_DECREF_STAT_INC();
419
4.88k
    if (--op->ob_refcnt == 0) {
420
683
        _Py_Dealloc(op);
421
683
    }
422
4.88k
}
codecs.c:Py_DECREF
Line
Count
Source
411
6.26M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
6.26M
    if (_Py_IsImmortal(op)) {
415
2.31M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.31M
        return;
417
2.31M
    }
418
3.95M
    _Py_DECREF_STAT_INC();
419
3.95M
    if (--op->ob_refcnt == 0) {
420
1.84M
        _Py_Dealloc(op);
421
1.84M
    }
422
3.95M
}
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
754k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
754k
    if (_Py_IsImmortal(op)) {
415
400k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
400k
        return;
417
400k
    }
418
354k
    _Py_DECREF_STAT_INC();
419
354k
    if (--op->ob_refcnt == 0) {
420
120k
        _Py_Dealloc(op);
421
120k
    }
422
354k
}
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
91.8M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
91.8M
    if (_Py_IsImmortal(op)) {
415
36.1M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
36.1M
        return;
417
36.1M
    }
418
55.6M
    _Py_DECREF_STAT_INC();
419
55.6M
    if (--op->ob_refcnt == 0) {
420
18.1M
        _Py_Dealloc(op);
421
18.1M
    }
422
55.6M
}
flowgraph.c:Py_DECREF
Line
Count
Source
411
87.8k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
87.8k
    if (_Py_IsImmortal(op)) {
415
48.9k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
48.9k
        return;
417
48.9k
    }
418
38.8k
    _Py_DECREF_STAT_INC();
419
38.8k
    if (--op->ob_refcnt == 0) {
420
69
        _Py_Dealloc(op);
421
69
    }
422
38.8k
}
frame.c:Py_DECREF
Line
Count
Source
411
45.3M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
45.3M
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
45.3M
    _Py_DECREF_STAT_INC();
419
45.3M
    if (--op->ob_refcnt == 0) {
420
16.3M
        _Py_Dealloc(op);
421
16.3M
    }
422
45.3M
}
Unexecuted instantiation: future.c:Py_DECREF
gc.c:Py_DECREF
Line
Count
Source
411
784k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
784k
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
784k
    _Py_DECREF_STAT_INC();
419
784k
    if (--op->ob_refcnt == 0) {
420
501k
        _Py_Dealloc(op);
421
501k
    }
422
784k
}
Unexecuted instantiation: gc_gil.c:Py_DECREF
getargs.c:Py_DECREF
Line
Count
Source
411
5.00M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
5.00M
    if (_Py_IsImmortal(op)) {
415
4.26M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
4.26M
        return;
417
4.26M
    }
418
740k
    _Py_DECREF_STAT_INC();
419
740k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
740k
}
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
10.5M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
10.5M
    if (_Py_IsImmortal(op)) {
415
2.04M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.04M
        return;
417
2.04M
    }
418
8.52M
    _Py_DECREF_STAT_INC();
419
8.52M
    if (--op->ob_refcnt == 0) {
420
199k
        _Py_Dealloc(op);
421
199k
    }
422
8.52M
}
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.1k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
52.1k
    if (_Py_IsImmortal(op)) {
415
29.4k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
29.4k
        return;
417
29.4k
    }
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.53M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.53M
    if (_Py_IsImmortal(op)) {
415
638k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
638k
        return;
417
638k
    }
418
900k
    _Py_DECREF_STAT_INC();
419
900k
    if (--op->ob_refcnt == 0) {
420
8.08k
        _Py_Dealloc(op);
421
8.08k
    }
422
900k
}
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.48M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
4.48M
    if (_Py_IsImmortal(op)) {
415
3.77M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
3.77M
        return;
417
3.77M
    }
418
708k
    _Py_DECREF_STAT_INC();
419
708k
    if (--op->ob_refcnt == 0) {
420
20.7k
        _Py_Dealloc(op);
421
20.7k
    }
422
708k
}
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
658
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
658
    if (_Py_IsImmortal(op)) {
415
192
        _Py_DECREF_IMMORTAL_STAT_INC();
416
192
        return;
417
192
    }
418
466
    _Py_DECREF_STAT_INC();
419
466
    if (--op->ob_refcnt == 0) {
420
182
        _Py_Dealloc(op);
421
182
    }
422
466
}
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
1.97M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.97M
    if (_Py_IsImmortal(op)) {
415
1.12M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
1.12M
        return;
417
1.12M
    }
418
854k
    _Py_DECREF_STAT_INC();
419
854k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
854k
}
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
543k
    _Py_DECREF_STAT_INC();
419
543k
    if (--op->ob_refcnt == 0) {
420
251k
        _Py_Dealloc(op);
421
251k
    }
422
543k
}
sysmodule.c:Py_DECREF
Line
Count
Source
411
3.60M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
3.60M
    if (_Py_IsImmortal(op)) {
415
840k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
840k
        return;
417
840k
    }
418
2.76M
    _Py_DECREF_STAT_INC();
419
2.76M
    if (--op->ob_refcnt == 0) {
420
2.04M
        _Py_Dealloc(op);
421
2.04M
    }
422
2.76M
}
Unexecuted instantiation: thread.c:Py_DECREF
traceback.c:Py_DECREF
Line
Count
Source
411
126M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
126M
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
126M
    _Py_DECREF_STAT_INC();
419
126M
    if (--op->ob_refcnt == 0) {
420
36.3M
        _Py_Dealloc(op);
421
36.3M
    }
422
126M
}
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.3k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
10.3k
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
10.3k
    _Py_DECREF_STAT_INC();
419
10.3k
    if (--op->ob_refcnt == 0) {
420
10.3k
        _Py_Dealloc(op);
421
10.3k
    }
422
10.3k
}
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
3.80M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
3.80M
    if (_Py_IsImmortal(op)) {
415
1.34M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
1.34M
        return;
417
1.34M
    }
418
2.45M
    _Py_DECREF_STAT_INC();
419
2.45M
    if (--op->ob_refcnt == 0) {
420
1.04M
        _Py_Dealloc(op);
421
1.04M
    }
422
2.45M
}
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
551
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
551
    if (_Py_IsImmortal(op)) {
415
60
        _Py_DECREF_IMMORTAL_STAT_INC();
416
60
        return;
417
60
    }
418
491
    _Py_DECREF_STAT_INC();
419
491
    if (--op->ob_refcnt == 0) {
420
6
        _Py_Dealloc(op);
421
6
    }
422
491
}
Unexecuted instantiation: _codecsmodule.c:Py_DECREF
_collectionsmodule.c:Py_DECREF
Line
Count
Source
411
111k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
111k
    if (_Py_IsImmortal(op)) {
415
47.5k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
47.5k
        return;
417
47.5k
    }
418
64.3k
    _Py_DECREF_STAT_INC();
419
64.3k
    if (--op->ob_refcnt == 0) {
420
48.7k
        _Py_Dealloc(op);
421
48.7k
    }
422
64.3k
}
_iomodule.c:Py_DECREF
Line
Count
Source
411
166k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
166k
    if (_Py_IsImmortal(op)) {
415
112k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
112k
        return;
417
112k
    }
418
53.9k
    _Py_DECREF_STAT_INC();
419
53.9k
    if (--op->ob_refcnt == 0) {
420
27.0k
        _Py_Dealloc(op);
421
27.0k
    }
422
53.9k
}
iobase.c:Py_DECREF
Line
Count
Source
411
316k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
316k
    if (_Py_IsImmortal(op)) {
415
260k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
260k
        return;
417
260k
    }
418
56.9k
    _Py_DECREF_STAT_INC();
419
56.9k
    if (--op->ob_refcnt == 0) {
420
28.4k
        _Py_Dealloc(op);
421
28.4k
    }
422
56.9k
}
fileio.c:Py_DECREF
Line
Count
Source
411
40.1k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
40.1k
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
40.1k
    _Py_DECREF_STAT_INC();
419
40.1k
    if (--op->ob_refcnt == 0) {
420
26.6k
        _Py_Dealloc(op);
421
26.6k
    }
422
40.1k
}
bytesio.c:Py_DECREF
Line
Count
Source
411
182k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
182k
    if (_Py_IsImmortal(op)) {
415
77.8k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
77.8k
        return;
417
77.8k
    }
418
105k
    _Py_DECREF_STAT_INC();
419
105k
    if (--op->ob_refcnt == 0) {
420
6.64k
        _Py_Dealloc(op);
421
6.64k
    }
422
105k
}
bufferedio.c:Py_DECREF
Line
Count
Source
411
4.51M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
4.51M
    if (_Py_IsImmortal(op)) {
415
4.21M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
4.21M
        return;
417
4.21M
    }
418
293k
    _Py_DECREF_STAT_INC();
419
293k
    if (--op->ob_refcnt == 0) {
420
245k
        _Py_Dealloc(op);
421
245k
    }
422
293k
}
textio.c:Py_DECREF
Line
Count
Source
411
756k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
756k
    if (_Py_IsImmortal(op)) {
415
208k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
208k
        return;
417
208k
    }
418
547k
    _Py_DECREF_STAT_INC();
419
547k
    if (--op->ob_refcnt == 0) {
420
177k
        _Py_Dealloc(op);
421
177k
    }
422
547k
}
stringio.c:Py_DECREF
Line
Count
Source
411
309k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
309k
    if (_Py_IsImmortal(op)) {
415
159k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
159k
        return;
417
159k
    }
418
149k
    _Py_DECREF_STAT_INC();
419
149k
    if (--op->ob_refcnt == 0) {
420
31.1k
        _Py_Dealloc(op);
421
31.1k
    }
422
149k
}
itertoolsmodule.c:Py_DECREF
Line
Count
Source
411
86.4k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
86.4k
    if (_Py_IsImmortal(op)) {
415
4.35k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
4.35k
        return;
417
4.35k
    }
418
82.1k
    _Py_DECREF_STAT_INC();
419
82.1k
    if (--op->ob_refcnt == 0) {
420
27.6k
        _Py_Dealloc(op);
421
27.6k
    }
422
82.1k
}
sre.c:Py_DECREF
Line
Count
Source
411
443M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
443M
    if (_Py_IsImmortal(op)) {
415
146M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
146M
        return;
417
146M
    }
418
297M
    _Py_DECREF_STAT_INC();
419
297M
    if (--op->ob_refcnt == 0) {
420
20.4M
        _Py_Dealloc(op);
421
20.4M
    }
422
297M
}
Unexecuted instantiation: _sysconfig.c:Py_DECREF
_threadmodule.c:Py_DECREF
Line
Count
Source
411
34.7k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
34.7k
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
34.7k
    _Py_DECREF_STAT_INC();
419
34.7k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
34.7k
}
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
95.8k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
95.8k
    if (_Py_IsImmortal(op)) {
415
19.9k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
19.9k
        return;
417
19.9k
    }
418
75.9k
    _Py_DECREF_STAT_INC();
419
75.9k
    if (--op->ob_refcnt == 0) {
420
4.97k
        _Py_Dealloc(op);
421
4.97k
    }
422
75.9k
}
_functoolsmodule.c:Py_DECREF
Line
Count
Source
411
536k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
536k
    if (_Py_IsImmortal(op)) {
415
134k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
134k
        return;
417
134k
    }
418
402k
    _Py_DECREF_STAT_INC();
419
402k
    if (--op->ob_refcnt == 0) {
420
268k
        _Py_Dealloc(op);
421
268k
    }
422
402k
}
Unexecuted instantiation: _localemodule.c:Py_DECREF
Unexecuted instantiation: _opcode.c:Py_DECREF
_operator.c:Py_DECREF
Line
Count
Source
411
569k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
569k
    if (_Py_IsImmortal(op)) {
415
284k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
284k
        return;
417
284k
    }
418
284k
    _Py_DECREF_STAT_INC();
419
284k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
284k
}
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.2k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
21.2k
    if (_Py_IsImmortal(op)) {
415
749
        _Py_DECREF_IMMORTAL_STAT_INC();
416
749
        return;
417
749
    }
418
20.4k
    _Py_DECREF_STAT_INC();
419
20.4k
    if (--op->ob_refcnt == 0) {
420
14.6k
        _Py_Dealloc(op);
421
14.6k
    }
422
20.4k
}
Unexecuted instantiation: myreadline.c:Py_DECREF
abstract.c:Py_DECREF
Line
Count
Source
411
604M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
604M
    if (_Py_IsImmortal(op)) {
415
356M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
356M
        return;
417
356M
    }
418
248M
    _Py_DECREF_STAT_INC();
419
248M
    if (--op->ob_refcnt == 0) {
420
2.25M
        _Py_Dealloc(op);
421
2.25M
    }
422
248M
}
Unexecuted instantiation: boolobject.c:Py_DECREF
Unexecuted instantiation: bytes_methods.c:Py_DECREF
bytearrayobject.c:Py_DECREF
Line
Count
Source
411
3.33M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
3.33M
    if (_Py_IsImmortal(op)) {
415
437k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
437k
        return;
417
437k
    }
418
2.89M
    _Py_DECREF_STAT_INC();
419
2.89M
    if (--op->ob_refcnt == 0) {
420
2.89M
        _Py_Dealloc(op);
421
2.89M
    }
422
2.89M
}
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
453k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
453k
    if (_Py_IsImmortal(op)) {
415
54.7k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
54.7k
        return;
417
54.7k
    }
418
398k
    _Py_DECREF_STAT_INC();
419
398k
    if (--op->ob_refcnt == 0) {
420
277k
        _Py_Dealloc(op);
421
277k
    }
422
398k
}
classobject.c:Py_DECREF
Line
Count
Source
411
79.8M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
79.8M
    if (_Py_IsImmortal(op)) {
415
10
        _Py_DECREF_IMMORTAL_STAT_INC();
416
10
        return;
417
10
    }
418
79.8M
    _Py_DECREF_STAT_INC();
419
79.8M
    if (--op->ob_refcnt == 0) {
420
5.50k
        _Py_Dealloc(op);
421
5.50k
    }
422
79.8M
}
codeobject.c:Py_DECREF
Line
Count
Source
411
1.03M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.03M
    if (_Py_IsImmortal(op)) {
415
458k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
458k
        return;
417
458k
    }
418
574k
    _Py_DECREF_STAT_INC();
419
574k
    if (--op->ob_refcnt == 0) {
420
477k
        _Py_Dealloc(op);
421
477k
    }
422
574k
}
Unexecuted instantiation: complexobject.c:Py_DECREF
descrobject.c:Py_DECREF
Line
Count
Source
411
85.7M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
85.7M
    if (_Py_IsImmortal(op)) {
415
11.2M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
11.2M
        return;
417
11.2M
    }
418
74.5M
    _Py_DECREF_STAT_INC();
419
74.5M
    if (--op->ob_refcnt == 0) {
420
41.0M
        _Py_Dealloc(op);
421
41.0M
    }
422
74.5M
}
enumobject.c:Py_DECREF
Line
Count
Source
411
260M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
260M
    if (_Py_IsImmortal(op)) {
415
95.9M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
95.9M
        return;
417
95.9M
    }
418
164M
    _Py_DECREF_STAT_INC();
419
164M
    if (--op->ob_refcnt == 0) {
420
62.3M
        _Py_Dealloc(op);
421
62.3M
    }
422
164M
}
genobject.c:Py_DECREF
Line
Count
Source
411
59.1M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
59.1M
    if (_Py_IsImmortal(op)) {
415
59.1M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
59.1M
        return;
417
59.1M
    }
418
70.8k
    _Py_DECREF_STAT_INC();
419
70.8k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
70.8k
}
fileobject.c:Py_DECREF
Line
Count
Source
411
239k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
239k
    if (_Py_IsImmortal(op)) {
415
232k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
232k
        return;
417
232k
    }
418
6.50k
    _Py_DECREF_STAT_INC();
419
6.50k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
6.50k
}
frameobject.c:Py_DECREF
Line
Count
Source
411
28.9M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
28.9M
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
28.9M
    _Py_DECREF_STAT_INC();
419
28.9M
    if (--op->ob_refcnt == 0) {
420
5.68M
        _Py_Dealloc(op);
421
5.68M
    }
422
28.9M
}
funcobject.c:Py_DECREF
Line
Count
Source
411
127M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
127M
    if (_Py_IsImmortal(op)) {
415
72.7M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
72.7M
        return;
417
72.7M
    }
418
54.9M
    _Py_DECREF_STAT_INC();
419
54.9M
    if (--op->ob_refcnt == 0) {
420
484k
        _Py_Dealloc(op);
421
484k
    }
422
54.9M
}
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
2.48M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2.48M
    if (_Py_IsImmortal(op)) {
415
755k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
755k
        return;
417
755k
    }
418
1.72M
    _Py_DECREF_STAT_INC();
419
1.72M
    if (--op->ob_refcnt == 0) {
420
377k
        _Py_Dealloc(op);
421
377k
    }
422
1.72M
}
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
326M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
326M
    if (_Py_IsImmortal(op)) {
415
7.23M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
7.23M
        return;
417
7.23M
    }
418
319M
    _Py_DECREF_STAT_INC();
419
319M
    if (--op->ob_refcnt == 0) {
420
240M
        _Py_Dealloc(op);
421
240M
    }
422
319M
}
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.75M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2.75M
    if (_Py_IsImmortal(op)) {
415
1.53M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
1.53M
        return;
417
1.53M
    }
418
1.22M
    _Py_DECREF_STAT_INC();
419
1.22M
    if (--op->ob_refcnt == 0) {
420
342k
        _Py_Dealloc(op);
421
342k
    }
422
1.22M
}
Unexecuted instantiation: Python-tokenize.c:Py_DECREF
Unexecuted instantiation: asdl.c:Py_DECREF
assemble.c:Py_DECREF
Line
Count
Source
411
59.8k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
59.8k
    if (_Py_IsImmortal(op)) {
415
9.83k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
9.83k
        return;
417
9.83k
    }
418
49.9k
    _Py_DECREF_STAT_INC();
419
49.9k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
49.9k
}
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
structmember.c:Py_DECREF
Line
Count
Source
411
1.67k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.67k
    if (_Py_IsImmortal(op)) {
415
1.30k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
1.30k
        return;
417
1.30k
    }
418
370
    _Py_DECREF_STAT_INC();
419
370
    if (--op->ob_refcnt == 0) {
420
30
        _Py_Dealloc(op);
421
30
    }
422
370
}
pegen.c:Py_DECREF
Line
Count
Source
411
128k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
128k
    if (_Py_IsImmortal(op)) {
415
47.4k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
47.4k
        return;
417
47.4k
    }
418
81.4k
    _Py_DECREF_STAT_INC();
419
81.4k
    if (--op->ob_refcnt == 0) {
420
63.0k
        _Py_Dealloc(op);
421
63.0k
    }
422
81.4k
}
pegen_errors.c:Py_DECREF
Line
Count
Source
411
39.9k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
39.9k
    if (_Py_IsImmortal(op)) {
415
1.92k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
1.92k
        return;
417
1.92k
    }
418
38.0k
    _Py_DECREF_STAT_INC();
419
38.0k
    if (--op->ob_refcnt == 0) {
420
2.67k
        _Py_Dealloc(op);
421
2.67k
    }
422
38.0k
}
Unexecuted instantiation: parser.c:Py_DECREF
Unexecuted instantiation: buffer.c:Py_DECREF
lexer.c:Py_DECREF
Line
Count
Source
411
12.4k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
12.4k
    if (_Py_IsImmortal(op)) {
415
645
        _Py_DECREF_IMMORTAL_STAT_INC();
416
645
        return;
417
645
    }
418
11.8k
    _Py_DECREF_STAT_INC();
419
11.8k
    if (--op->ob_refcnt == 0) {
420
11.8k
        _Py_Dealloc(op);
421
11.8k
    }
422
11.8k
}
state.c:Py_DECREF
Line
Count
Source
411
21.3k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
21.3k
    if (_Py_IsImmortal(op)) {
415
391
        _Py_DECREF_IMMORTAL_STAT_INC();
416
391
        return;
417
391
    }
418
20.9k
    _Py_DECREF_STAT_INC();
419
20.9k
    if (--op->ob_refcnt == 0) {
420
2.18k
        _Py_Dealloc(op);
421
2.18k
    }
422
20.9k
}
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
38.7k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
38.7k
    if (_Py_IsImmortal(op)) {
415
2.41k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.41k
        return;
417
2.41k
    }
418
36.3k
    _Py_DECREF_STAT_INC();
419
36.3k
    if (--op->ob_refcnt == 0) {
420
36.3k
        _Py_Dealloc(op);
421
36.3k
    }
422
36.3k
}
423
14.1G
#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.22G
    do { \
478
2.22G
        _Py_TYPEOF(op)* _tmp_op_ptr = &(op); \
479
2.22G
        _Py_TYPEOF(op) _tmp_old_op = (*_tmp_op_ptr); \
480
2.22G
        if (_tmp_old_op != NULL) { \
481
507M
            *_tmp_op_ptr = _Py_NULL; \
482
507M
            Py_DECREF(_tmp_old_op); \
483
507M
        } \
484
2.22G
    } 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
1.95G
{
502
1.95G
    if (op != _Py_NULL) {
503
846M
        Py_INCREF(op);
504
846M
    }
505
1.95G
}
Unexecuted instantiation: bytesobject.c:Py_XINCREF
Unexecuted instantiation: call.c:Py_XINCREF
exceptions.c:Py_XINCREF
Line
Count
Source
501
96.2M
{
502
96.2M
    if (op != _Py_NULL) {
503
14.4M
        Py_INCREF(op);
504
14.4M
    }
505
96.2M
}
Unexecuted instantiation: genericaliasobject.c:Py_XINCREF
Unexecuted instantiation: floatobject.c:Py_XINCREF
listobject.c:Py_XINCREF
Line
Count
Source
501
5.33M
{
502
5.33M
    if (op != _Py_NULL) {
503
5.33M
        Py_INCREF(op);
504
5.33M
    }
505
5.33M
}
Unexecuted instantiation: longobject.c:Py_XINCREF
dictobject.c:Py_XINCREF
Line
Count
Source
501
686M
{
502
686M
    if (op != _Py_NULL) {
503
229M
        Py_INCREF(op);
504
229M
    }
505
686M
}
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
57.1M
{
502
57.1M
    if (op != _Py_NULL) {
503
56.8M
        Py_INCREF(op);
504
56.8M
    }
505
57.1M
}
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
334k
{
502
334k
    if (op != _Py_NULL) {
503
33.6k
        Py_INCREF(op);
504
33.6k
    }
505
334k
}
Unexecuted instantiation: _warnings.c:Py_XINCREF
bltinmodule.c:Py_XINCREF
Line
Count
Source
501
589
{
502
589
    if (op != _Py_NULL) {
503
589
        Py_INCREF(op);
504
589
    }
505
589
}
ceval.c:Py_XINCREF
Line
Count
Source
501
287M
{
502
287M
    if (op != _Py_NULL) {
503
86.6M
        Py_INCREF(op);
504
86.6M
    }
505
287M
}
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.14k
        Py_INCREF(op);
504
6.14k
    }
505
12.2k
}
context.c:Py_XINCREF
Line
Count
Source
501
197k
{
502
197k
    if (op != _Py_NULL) {
503
0
        Py_INCREF(op);
504
0
    }
505
197k
}
errors.c:Py_XINCREF
Line
Count
Source
501
39.3M
{
502
39.3M
    if (op != _Py_NULL) {
503
39.2M
        Py_INCREF(op);
504
39.2M
    }
505
39.3M
}
Unexecuted instantiation: flowgraph.c:Py_XINCREF
Unexecuted instantiation: frame.c:Py_XINCREF
Unexecuted instantiation: future.c:Py_XINCREF
Unexecuted instantiation: gc.c:Py_XINCREF
Unexecuted instantiation: gc_gil.c:Py_XINCREF
Unexecuted instantiation: getargs.c:Py_XINCREF
Unexecuted instantiation: ceval_gil.c:Py_XINCREF
Unexecuted instantiation: hamt.c:Py_XINCREF
Unexecuted instantiation: hashtable.c:Py_XINCREF
import.c:Py_XINCREF
Line
Count
Source
501
38.8k
{
502
38.8k
    if (op != _Py_NULL) {
503
32.2k
        Py_INCREF(op);
504
32.2k
    }
505
38.8k
}
Unexecuted instantiation: importdl.c:Py_XINCREF
Unexecuted instantiation: initconfig.c:Py_XINCREF
Unexecuted instantiation: instrumentation.c:Py_XINCREF
Unexecuted instantiation: instruction_sequence.c:Py_XINCREF
Unexecuted instantiation: intrinsics.c:Py_XINCREF
Unexecuted instantiation: legacy_tracing.c:Py_XINCREF
Unexecuted instantiation: lock.c:Py_XINCREF
Unexecuted instantiation: marshal.c:Py_XINCREF
Unexecuted instantiation: modsupport.c:Py_XINCREF
Unexecuted instantiation: mysnprintf.c:Py_XINCREF
Unexecuted instantiation: parking_lot.c:Py_XINCREF
Unexecuted instantiation: preconfig.c:Py_XINCREF
Unexecuted instantiation: pyarena.c:Py_XINCREF
Unexecuted instantiation: pyctype.c:Py_XINCREF
Unexecuted instantiation: pyhash.c:Py_XINCREF
Unexecuted instantiation: pylifecycle.c:Py_XINCREF
Unexecuted instantiation: pymath.c:Py_XINCREF
pystate.c:Py_XINCREF
Line
Count
Source
501
768k
{
502
768k
    if (op != _Py_NULL) {
503
768k
        Py_INCREF(op);
504
768k
    }
505
768k
}
Unexecuted instantiation: pythonrun.c:Py_XINCREF
Unexecuted instantiation: pytime.c:Py_XINCREF
Unexecuted instantiation: qsbr.c:Py_XINCREF
Unexecuted instantiation: bootstrap_hash.c:Py_XINCREF
Unexecuted instantiation: specialize.c:Py_XINCREF
Unexecuted instantiation: 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
100M
{
502
100M
    if (op != _Py_NULL) {
503
63.4M
        Py_INCREF(op);
504
63.4M
    }
505
100M
}
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
153k
{
502
153k
    if (op != _Py_NULL) {
503
153k
        Py_INCREF(op);
504
153k
    }
505
153k
}
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
6.50k
{
502
6.50k
    if (op != _Py_NULL) {
503
6.50k
        Py_INCREF(op);
504
6.50k
    }
505
6.50k
}
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
22.7M
{
502
22.7M
    if (op != _Py_NULL) {
503
22.1M
        Py_INCREF(op);
504
22.1M
    }
505
22.7M
}
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
8.08M
{
502
8.08M
    if (op != _Py_NULL) {
503
129k
        Py_INCREF(op);
504
129k
    }
505
8.08M
}
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.6k
{
502
79.6k
    if (op != _Py_NULL) {
503
76.8k
        Py_INCREF(op);
504
76.8k
    }
505
79.6k
}
Unexecuted instantiation: enumobject.c:Py_XINCREF
genobject.c:Py_XINCREF
Line
Count
Source
501
1.90k
{
502
1.90k
    if (op != _Py_NULL) {
503
0
        Py_INCREF(op);
504
0
    }
505
1.90k
}
Unexecuted instantiation: fileobject.c:Py_XINCREF
frameobject.c:Py_XINCREF
Line
Count
Source
501
8.52M
{
502
8.52M
    if (op != _Py_NULL) {
503
8.52M
        Py_INCREF(op);
504
8.52M
    }
505
8.52M
}
funcobject.c:Py_XINCREF
Line
Count
Source
501
20.5k
{
502
20.5k
    if (op != _Py_NULL) {
503
16
        Py_INCREF(op);
504
16
    }
505
20.5k
}
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
635M
{
502
635M
    if (op != _Py_NULL) {
503
317M
        Py_INCREF(op);
504
317M
    }
505
635M
}
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
structmember.c:Py_XINCREF
Line
Count
Source
501
2.03M
{
502
2.03M
    if (op != _Py_NULL) {
503
1.37M
        Py_INCREF(op);
504
1.37M
    }
505
2.03M
}
pegen.c:Py_XINCREF
Line
Count
Source
501
18.7k
{
502
18.7k
    if (op != _Py_NULL) {
503
454
        Py_INCREF(op);
504
454
    }
505
18.7k
}
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
1.95G
#  define Py_XINCREF(op) Py_XINCREF(_PyObject_CAST(op))
508
#endif
509
510
static inline void Py_XDECREF(PyObject *op)
511
9.53G
{
512
9.53G
    if (op != _Py_NULL) {
513
8.42G
        Py_DECREF(op);
514
8.42G
    }
515
9.53G
}
bytesobject.c:Py_XDECREF
Line
Count
Source
511
8.81M
{
512
8.81M
    if (op != _Py_NULL) {
513
77.2k
        Py_DECREF(op);
514
77.2k
    }
515
8.81M
}
Unexecuted instantiation: call.c:Py_XDECREF
exceptions.c:Py_XDECREF
Line
Count
Source
511
94.2M
{
512
94.2M
    if (op != _Py_NULL) {
513
47.6M
        Py_DECREF(op);
514
47.6M
    }
515
94.2M
}
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
771k
{
512
771k
    if (op != _Py_NULL) {
513
70.8k
        Py_DECREF(op);
514
70.8k
    }
515
771k
}
listobject.c:Py_XDECREF
Line
Count
Source
511
1.65G
{
512
1.65G
    if (op != _Py_NULL) {
513
1.62G
        Py_DECREF(op);
514
1.62G
    }
515
1.65G
}
longobject.c:Py_XDECREF
Line
Count
Source
511
11.3M
{
512
11.3M
    if (op != _Py_NULL) {
513
4.27M
        Py_DECREF(op);
514
4.27M
    }
515
11.3M
}
dictobject.c:Py_XDECREF
Line
Count
Source
511
859M
{
512
859M
    if (op != _Py_NULL) {
513
852M
        Py_DECREF(op);
514
852M
    }
515
859M
}
Unexecuted instantiation: memoryobject.c:Py_XDECREF
moduleobject.c:Py_XDECREF
Line
Count
Source
511
23.8k
{
512
23.8k
    if (op != _Py_NULL) {
513
16.0k
        Py_DECREF(op);
514
16.0k
    }
515
23.8k
}
object.c:Py_XDECREF
Line
Count
Source
511
4.00M
{
512
4.00M
    if (op != _Py_NULL) {
513
22.0k
        Py_DECREF(op);
514
22.0k
    }
515
4.00M
}
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
270k
{
512
270k
    if (op != _Py_NULL) {
513
28
        Py_DECREF(op);
514
28
    }
515
270k
}
Unexecuted instantiation: sliceobject.c:Py_XDECREF
structseq.c:Py_XDECREF
Line
Count
Source
511
6.87M
{
512
6.87M
    if (op != _Py_NULL) {
513
6.87M
        Py_DECREF(op);
514
6.87M
    }
515
6.87M
}
Unexecuted instantiation: templateobject.c:Py_XDECREF
tupleobject.c:Py_XDECREF
Line
Count
Source
511
5.12G
{
512
5.12G
    if (op != _Py_NULL) {
513
5.11G
        Py_DECREF(op);
514
5.11G
    }
515
5.12G
}
typeobject.c:Py_XDECREF
Line
Count
Source
511
34.5M
{
512
34.5M
    if (op != _Py_NULL) {
513
22.1M
        Py_DECREF(op);
514
22.1M
    }
515
34.5M
}
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
556
{
512
556
    if (op != _Py_NULL) {
513
256
        Py_DECREF(op);
514
256
    }
515
556
}
Unexecuted instantiation: unicode_writer.c:Py_XDECREF
Unexecuted instantiation: unicodectype.c:Py_XDECREF
unicodeobject.c:Py_XDECREF
Line
Count
Source
511
105M
{
512
105M
    if (op != _Py_NULL) {
513
77.3M
        Py_DECREF(op);
514
77.3M
    }
515
105M
}
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
343k
{
512
343k
    if (op != _Py_NULL) {
513
4.32k
        Py_DECREF(op);
514
4.32k
    }
515
343k
}
_warnings.c:Py_XDECREF
Line
Count
Source
511
4.68M
{
512
4.68M
    if (op != _Py_NULL) {
513
4.09M
        Py_DECREF(op);
514
4.09M
    }
515
4.68M
}
bltinmodule.c:Py_XDECREF
Line
Count
Source
511
12.6M
{
512
12.6M
    if (op != _Py_NULL) {
513
679k
        Py_DECREF(op);
514
679k
    }
515
12.6M
}
ceval.c:Py_XDECREF
Line
Count
Source
511
332k
{
512
332k
    if (op != _Py_NULL) {
513
5.47k
        Py_DECREF(op);
514
5.47k
    }
515
332k
}
codecs.c:Py_XDECREF
Line
Count
Source
511
251k
{
512
251k
    if (op != _Py_NULL) {
513
167k
        Py_DECREF(op);
514
167k
    }
515
251k
}
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
235M
{
512
235M
    if (op != _Py_NULL) {
513
33.4M
        Py_DECREF(op);
514
33.4M
    }
515
235M
}
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
169k
{
512
169k
    if (op != _Py_NULL) {
513
0
        Py_DECREF(op);
514
0
    }
515
169k
}
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.99M
{
512
6.99M
    if (op != _Py_NULL) {
513
4.91M
        Py_DECREF(op);
514
4.91M
    }
515
6.99M
}
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.0k
{
512
17.0k
    if (op != _Py_NULL) {
513
0
        Py_DECREF(op);
514
0
    }
515
17.0k
}
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.51M
{
512
1.51M
    if (op != _Py_NULL) {
513
1.51M
        Py_DECREF(op);
514
1.51M
    }
515
1.51M
}
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
546
{
512
546
    if (op != _Py_NULL) {
513
364
        Py_DECREF(op);
514
364
    }
515
546
}
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
3.24M
{
512
3.24M
    if (op != _Py_NULL) {
513
1.97M
        Py_DECREF(op);
514
1.97M
    }
515
3.24M
}
symtable.c:Py_XDECREF
Line
Count
Source
511
208k
{
512
208k
    if (op != _Py_NULL) {
513
163k
        Py_DECREF(op);
514
163k
    }
515
208k
}
sysmodule.c:Py_XDECREF
Line
Count
Source
511
2.75M
{
512
2.75M
    if (op != _Py_NULL) {
513
2.07M
        Py_DECREF(op);
514
2.07M
    }
515
2.75M
}
Unexecuted instantiation: thread.c:Py_XDECREF
traceback.c:Py_XDECREF
Line
Count
Source
511
201M
{
512
201M
    if (op != _Py_NULL) {
513
126M
        Py_DECREF(op);
514
126M
    }
515
201M
}
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.13M
{
512
1.13M
    if (op != _Py_NULL) {
513
971k
        Py_DECREF(op);
514
971k
    }
515
1.13M
}
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
25
{
512
25
    if (op != _Py_NULL) {
513
12
        Py_DECREF(op);
514
12
    }
515
25
}
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
33.2k
{
512
33.2k
    if (op != _Py_NULL) {
513
33.2k
        Py_DECREF(op);
514
33.2k
    }
515
33.2k
}
bufferedio.c:Py_XDECREF
Line
Count
Source
511
39.1k
{
512
39.1k
    if (op != _Py_NULL) {
513
6.50k
        Py_DECREF(op);
514
6.50k
    }
515
39.1k
}
textio.c:Py_XDECREF
Line
Count
Source
511
31.3k
{
512
31.3k
    if (op != _Py_NULL) {
513
56
        Py_DECREF(op);
514
56
    }
515
31.3k
}
Unexecuted instantiation: stringio.c:Py_XDECREF
itertoolsmodule.c:Py_XDECREF
Line
Count
Source
511
29.9k
{
512
29.9k
    if (op != _Py_NULL) {
513
4.44k
        Py_DECREF(op);
514
4.44k
    }
515
29.9k
}
sre.c:Py_XDECREF
Line
Count
Source
511
87.9M
{
512
87.9M
    if (op != _Py_NULL) {
513
87.9M
        Py_DECREF(op);
514
87.9M
    }
515
87.9M
}
Unexecuted instantiation: _sysconfig.c:Py_XDECREF
Unexecuted instantiation: _threadmodule.c:Py_XDECREF
Unexecuted instantiation: timemodule.c:Py_XDECREF
Unexecuted instantiation: _typesmodule.c:Py_XDECREF
Unexecuted instantiation: _typingmodule.c:Py_XDECREF
Unexecuted instantiation: _weakref.c:Py_XDECREF
_abc.c:Py_XDECREF
Line
Count
Source
511
26.1k
{
512
26.1k
    if (op != _Py_NULL) {
513
24.4k
        Py_DECREF(op);
514
24.4k
    }
515
26.1k
}
_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
2.88k
{
512
2.88k
    if (op != _Py_NULL) {
513
2.88k
        Py_DECREF(op);
514
2.88k
    }
515
2.88k
}
Unexecuted instantiation: myreadline.c:Py_XDECREF
abstract.c:Py_XDECREF
Line
Count
Source
511
336k
{
512
336k
    if (op != _Py_NULL) {
513
177k
        Py_DECREF(op);
514
177k
    }
515
336k
}
Unexecuted instantiation: boolobject.c:Py_XDECREF
Unexecuted instantiation: bytes_methods.c:Py_XDECREF
bytearrayobject.c:Py_XDECREF
Line
Count
Source
511
3.33M
{
512
3.33M
    if (op != _Py_NULL) {
513
3.33M
        Py_DECREF(op);
514
3.33M
    }
515
3.33M
}
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
8.08M
{
512
8.08M
    if (op != _Py_NULL) {
513
453k
        Py_DECREF(op);
514
453k
    }
515
8.08M
}
classobject.c:Py_XDECREF
Line
Count
Source
511
39.9M
{
512
39.9M
    if (op != _Py_NULL) {
513
39.9M
        Py_DECREF(op);
514
39.9M
    }
515
39.9M
}
codeobject.c:Py_XDECREF
Line
Count
Source
511
1.15M
{
512
1.15M
    if (op != _Py_NULL) {
513
996k
        Py_DECREF(op);
514
996k
    }
515
1.15M
}
Unexecuted instantiation: complexobject.c:Py_XDECREF
descrobject.c:Py_XDECREF
Line
Count
Source
511
32.8M
{
512
32.8M
    if (op != _Py_NULL) {
513
23.4M
        Py_DECREF(op);
514
23.4M
    }
515
32.8M
}
enumobject.c:Py_XDECREF
Line
Count
Source
511
24.6M
{
512
24.6M
    if (op != _Py_NULL) {
513
16.4M
        Py_DECREF(op);
514
16.4M
    }
515
24.6M
}
genobject.c:Py_XDECREF
Line
Count
Source
511
951
{
512
951
    if (op != _Py_NULL) {
513
0
        Py_DECREF(op);
514
0
    }
515
951
}
Unexecuted instantiation: fileobject.c:Py_XDECREF
Unexecuted instantiation: frameobject.c:Py_XDECREF
funcobject.c:Py_XDECREF
Line
Count
Source
511
4.84k
{
512
4.84k
    if (op != _Py_NULL) {
513
1.68k
        Py_DECREF(op);
514
1.68k
    }
515
4.84k
}
Unexecuted instantiation: interpolationobject.c:Py_XDECREF
iterobject.c:Py_XDECREF
Line
Count
Source
511
2.48M
{
512
2.48M
    if (op != _Py_NULL) {
513
377k
        Py_DECREF(op);
514
377k
    }
515
2.48M
}
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
953M
{
512
953M
    if (op != _Py_NULL) {
513
326M
        Py_DECREF(op);
514
326M
    }
515
953M
}
Unexecuted instantiation: namespaceobject.c:Py_XDECREF
Unexecuted instantiation: _contextvars.c:Py_XDECREF
Python-ast.c:Py_XDECREF
Line
Count
Source
511
282
{
512
282
    if (op != _Py_NULL) {
513
188
        Py_DECREF(op);
514
188
    }
515
282
}
Unexecuted instantiation: Python-tokenize.c:Py_XDECREF
Unexecuted instantiation: asdl.c:Py_XDECREF
assemble.c:Py_XDECREF
Line
Count
Source
511
59.8k
{
512
59.8k
    if (op != _Py_NULL) {
513
59.8k
        Py_DECREF(op);
514
59.8k
    }
515
59.8k
}
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
structmember.c:Py_XDECREF
Line
Count
Source
511
1.36M
{
512
1.36M
    if (op != _Py_NULL) {
513
1.67k
        Py_DECREF(op);
514
1.67k
    }
515
1.36M
}
pegen.c:Py_XDECREF
Line
Count
Source
511
30.7k
{
512
30.7k
    if (op != _Py_NULL) {
513
1.43k
        Py_DECREF(op);
514
1.43k
    }
515
30.7k
}
pegen_errors.c:Py_XDECREF
Line
Count
Source
511
8.72k
{
512
8.72k
    if (op != _Py_NULL) {
513
7.45k
        Py_DECREF(op);
514
7.45k
    }
515
8.72k
}
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
112k
{
512
112k
    if (op != _Py_NULL) {
513
21.3k
        Py_DECREF(op);
514
21.3k
    }
515
112k
}
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
30.4k
{
512
30.4k
    if (op != _Py_NULL) {
513
30.4k
        Py_DECREF(op);
514
30.4k
    }
515
30.4k
}
516
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
517
9.53G
#  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
11.1G
{
529
11.1G
    Py_INCREF(obj);
530
11.1G
    return obj;
531
11.1G
}
bytesobject.c:_Py_NewRef
Line
Count
Source
528
432k
{
529
432k
    Py_INCREF(obj);
530
432k
    return obj;
531
432k
}
call.c:_Py_NewRef
Line
Count
Source
528
29.6M
{
529
29.6M
    Py_INCREF(obj);
530
29.6M
    return obj;
531
29.6M
}
exceptions.c:_Py_NewRef
Line
Count
Source
528
132M
{
529
132M
    Py_INCREF(obj);
530
132M
    return obj;
531
132M
}
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.31G
{
529
1.31G
    Py_INCREF(obj);
530
1.31G
    return obj;
531
1.31G
}
longobject.c:_Py_NewRef
Line
Count
Source
528
8.56M
{
529
8.56M
    Py_INCREF(obj);
530
8.56M
    return obj;
531
8.56M
}
dictobject.c:_Py_NewRef
Line
Count
Source
528
1.50G
{
529
1.50G
    Py_INCREF(obj);
530
1.50G
    return obj;
531
1.50G
}
memoryobject.c:_Py_NewRef
Line
Count
Source
528
1.36M
{
529
1.36M
    Py_INCREF(obj);
530
1.36M
    return obj;
531
1.36M
}
moduleobject.c:_Py_NewRef
Line
Count
Source
528
7.45k
{
529
7.45k
    Py_INCREF(obj);
530
7.45k
    return obj;
531
7.45k
}
object.c:_Py_NewRef
Line
Count
Source
528
155M
{
529
155M
    Py_INCREF(obj);
530
155M
    return obj;
531
155M
}
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
7.33M
{
529
7.33M
    Py_INCREF(obj);
530
7.33M
    return obj;
531
7.33M
}
sliceobject.c:_Py_NewRef
Line
Count
Source
528
61.2M
{
529
61.2M
    Py_INCREF(obj);
530
61.2M
    return obj;
531
61.2M
}
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
4.82G
{
529
4.82G
    Py_INCREF(obj);
530
4.82G
    return obj;
531
4.82G
}
typeobject.c:_Py_NewRef
Line
Count
Source
528
142M
{
529
142M
    Py_INCREF(obj);
530
142M
    return obj;
531
142M
}
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
54.9M
{
529
54.9M
    Py_INCREF(obj);
530
54.9M
    return obj;
531
54.9M
}
Unexecuted instantiation: unicode_formatter.c:_Py_NewRef
unicode_writer.c:_Py_NewRef
Line
Count
Source
528
10.9k
{
529
10.9k
    Py_INCREF(obj);
530
10.9k
    return obj;
531
10.9k
}
Unexecuted instantiation: unicodectype.c:_Py_NewRef
unicodeobject.c:_Py_NewRef
Line
Count
Source
528
187M
{
529
187M
    Py_INCREF(obj);
530
187M
    return obj;
531
187M
}
Unexecuted instantiation: unionobject.c:_Py_NewRef
Unexecuted instantiation: weakrefobject.c:_Py_NewRef
_warnings.c:_Py_NewRef
Line
Count
Source
528
1.72M
{
529
1.72M
    Py_INCREF(obj);
530
1.72M
    return obj;
531
1.72M
}
bltinmodule.c:_Py_NewRef
Line
Count
Source
528
26.9M
{
529
26.9M
    Py_INCREF(obj);
530
26.9M
    return obj;
531
26.9M
}
ceval.c:_Py_NewRef
Line
Count
Source
528
1.51G
{
529
1.51G
    Py_INCREF(obj);
530
1.51G
    return obj;
531
1.51G
}
codecs.c:_Py_NewRef
Line
Count
Source
528
2.79M
{
529
2.79M
    Py_INCREF(obj);
530
2.79M
    return obj;
531
2.79M
}
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
132k
{
529
132k
    Py_INCREF(obj);
530
132k
    return obj;
531
132k
}
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
39.3M
{
529
39.3M
    Py_INCREF(obj);
530
39.3M
    return obj;
531
39.3M
}
flowgraph.c:_Py_NewRef
Line
Count
Source
528
117k
{
529
117k
    Py_INCREF(obj);
530
117k
    return obj;
531
117k
}
frame.c:_Py_NewRef
Line
Count
Source
528
28.9M
{
529
28.9M
    Py_INCREF(obj);
530
28.9M
    return obj;
531
28.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.27M
{
529
2.27M
    Py_INCREF(obj);
530
2.27M
    return obj;
531
2.27M
}
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
4.10M
{
529
4.10M
    Py_INCREF(obj);
530
4.10M
    return obj;
531
4.10M
}
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
21.7k
{
529
21.7k
    Py_INCREF(obj);
530
21.7k
    return obj;
531
21.7k
}
Unexecuted instantiation: legacy_tracing.c:_Py_NewRef
Unexecuted instantiation: lock.c:_Py_NewRef
marshal.c:_Py_NewRef
Line
Count
Source
528
1.61M
{
529
1.61M
    Py_INCREF(obj);
530
1.61M
    return obj;
531
1.61M
}
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
symtable.c:_Py_NewRef
Line
Count
Source
528
351k
{
529
351k
    Py_INCREF(obj);
530
351k
    return obj;
531
351k
}
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
1.46M
{
529
1.46M
    Py_INCREF(obj);
530
1.46M
    return obj;
531
1.46M
}
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
81
{
529
81
    Py_INCREF(obj);
530
81
    return obj;
531
81
}
Unexecuted instantiation: _codecsmodule.c:_Py_NewRef
_collectionsmodule.c:_Py_NewRef
Line
Count
Source
528
23.8M
{
529
23.8M
    Py_INCREF(obj);
530
23.8M
    return obj;
531
23.8M
}
Unexecuted instantiation: errnomodule.c:_Py_NewRef
_iomodule.c:_Py_NewRef
Line
Count
Source
528
356
{
529
356
    Py_INCREF(obj);
530
356
    return obj;
531
356
}
iobase.c:_Py_NewRef
Line
Count
Source
528
64.2k
{
529
64.2k
    Py_INCREF(obj);
530
64.2k
    return obj;
531
64.2k
}
Unexecuted instantiation: fileio.c:_Py_NewRef
bytesio.c:_Py_NewRef
Line
Count
Source
528
49.2k
{
529
49.2k
    Py_INCREF(obj);
530
49.2k
    return obj;
531
49.2k
}
bufferedio.c:_Py_NewRef
Line
Count
Source
528
12.6k
{
529
12.6k
    Py_INCREF(obj);
530
12.6k
    return obj;
531
12.6k
}
textio.c:_Py_NewRef
Line
Count
Source
528
257k
{
529
257k
    Py_INCREF(obj);
530
257k
    return obj;
531
257k
}
stringio.c:_Py_NewRef
Line
Count
Source
528
21.1k
{
529
21.1k
    Py_INCREF(obj);
530
21.1k
    return obj;
531
21.1k
}
itertoolsmodule.c:_Py_NewRef
Line
Count
Source
528
36.4k
{
529
36.4k
    Py_INCREF(obj);
530
36.4k
    return obj;
531
36.4k
}
sre.c:_Py_NewRef
Line
Count
Source
528
181M
{
529
181M
    Py_INCREF(obj);
530
181M
    return obj;
531
181M
}
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
10.9k
{
529
10.9k
    Py_INCREF(obj);
530
10.9k
    return obj;
531
10.9k
}
_functoolsmodule.c:_Py_NewRef
Line
Count
Source
528
271k
{
529
271k
    Py_INCREF(obj);
530
271k
    return obj;
531
271k
}
Unexecuted instantiation: _localemodule.c:_Py_NewRef
Unexecuted instantiation: _opcode.c:_Py_NewRef
_operator.c:_Py_NewRef
Line
Count
Source
528
1.33M
{
529
1.33M
    Py_INCREF(obj);
530
1.33M
    return obj;
531
1.33M
}
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
644M
{
529
644M
    Py_INCREF(obj);
530
644M
    return obj;
531
644M
}
Unexecuted instantiation: boolobject.c:_Py_NewRef
Unexecuted instantiation: bytes_methods.c:_Py_NewRef
bytearrayobject.c:_Py_NewRef
Line
Count
Source
528
282k
{
529
282k
    Py_INCREF(obj);
530
282k
    return obj;
531
282k
}
Unexecuted instantiation: capsule.c:_Py_NewRef
Unexecuted instantiation: cellobject.c:_Py_NewRef
classobject.c:_Py_NewRef
Line
Count
Source
528
79.9M
{
529
79.9M
    Py_INCREF(obj);
530
79.9M
    return obj;
531
79.9M
}
codeobject.c:_Py_NewRef
Line
Count
Source
528
1.63M
{
529
1.63M
    Py_INCREF(obj);
530
1.63M
    return obj;
531
1.63M
}
Unexecuted instantiation: complexobject.c:_Py_NewRef
descrobject.c:_Py_NewRef
Line
Count
Source
528
23.5M
{
529
23.5M
    Py_INCREF(obj);
530
23.5M
    return obj;
531
23.5M
}
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
45.9M
{
529
45.9M
    Py_INCREF(obj);
530
45.9M
    return obj;
531
45.9M
}
Unexecuted instantiation: fileobject.c:_Py_NewRef
frameobject.c:_Py_NewRef
Line
Count
Source
528
9.33M
{
529
9.33M
    Py_INCREF(obj);
530
9.33M
    return obj;
531
9.33M
}
funcobject.c:_Py_NewRef
Line
Count
Source
528
33.7M
{
529
33.7M
    Py_INCREF(obj);
530
33.7M
    return obj;
531
33.7M
}
Unexecuted instantiation: interpolationobject.c:_Py_NewRef
iterobject.c:_Py_NewRef
Line
Count
Source
528
2.10M
{
529
2.10M
    Py_INCREF(obj);
530
2.10M
    return obj;
531
2.10M
}
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
8.71M
{
529
8.71M
    Py_INCREF(obj);
530
8.71M
    return obj;
531
8.71M
}
Unexecuted instantiation: namespaceobject.c:_Py_NewRef
Unexecuted instantiation: _contextvars.c:_Py_NewRef
Python-ast.c:_Py_NewRef
Line
Count
Source
528
397k
{
529
397k
    Py_INCREF(obj);
530
397k
    return obj;
531
397k
}
Unexecuted instantiation: Python-tokenize.c:_Py_NewRef
Unexecuted instantiation: asdl.c:_Py_NewRef
assemble.c:_Py_NewRef
Line
Count
Source
528
57.9k
{
529
57.9k
    Py_INCREF(obj);
530
57.9k
    return obj;
531
57.9k
}
Unexecuted instantiation: ast.c:_Py_NewRef
Unexecuted instantiation: ast_preprocess.c:_Py_NewRef
Unexecuted instantiation: ast_unparse.c:_Py_NewRef
Unexecuted instantiation: critical_section.c:_Py_NewRef
Unexecuted instantiation: crossinterp.c:_Py_NewRef
Unexecuted instantiation: getcopyright.c:_Py_NewRef
Unexecuted instantiation: getplatform.c:_Py_NewRef
Unexecuted instantiation: getversion.c:_Py_NewRef
Unexecuted instantiation: optimizer.c:_Py_NewRef
Unexecuted instantiation: pathconfig.c:_Py_NewRef
Unexecuted instantiation: structmember.c:_Py_NewRef
pegen.c:_Py_NewRef
Line
Count
Source
528
18.7k
{
529
18.7k
    Py_INCREF(obj);
530
18.7k
    return obj;
531
18.7k
}
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.65G
{
535
1.65G
    Py_XINCREF(obj);
536
1.65G
    return obj;
537
1.65G
}
Unexecuted instantiation: bytesobject.c:_Py_XNewRef
Unexecuted instantiation: call.c:_Py_XNewRef
exceptions.c:_Py_XNewRef
Line
Count
Source
534
96.2M
{
535
96.2M
    Py_XINCREF(obj);
536
96.2M
    return obj;
537
96.2M
}
Unexecuted instantiation: genericaliasobject.c:_Py_XNewRef
Unexecuted instantiation: floatobject.c:_Py_XNewRef
listobject.c:_Py_XNewRef
Line
Count
Source
534
5.33M
{
535
5.33M
    Py_XINCREF(obj);
536
5.33M
    return obj;
537
5.33M
}
Unexecuted instantiation: longobject.c:_Py_XNewRef
dictobject.c:_Py_XNewRef
Line
Count
Source
534
686M
{
535
686M
    Py_XINCREF(obj);
536
686M
    return obj;
537
686M
}
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
304k
{
535
304k
    Py_XINCREF(obj);
536
304k
    return obj;
537
304k
}
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
334k
{
535
334k
    Py_XINCREF(obj);
536
334k
    return obj;
537
334k
}
Unexecuted instantiation: _warnings.c:_Py_XNewRef
bltinmodule.c:_Py_XNewRef
Line
Count
Source
534
589
{
535
589
    Py_XINCREF(obj);
536
589
    return obj;
537
589
}
ceval.c:_Py_XNewRef
Line
Count
Source
534
86.6M
{
535
86.6M
    Py_XINCREF(obj);
536
86.6M
    return obj;
537
86.6M
}
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
38.8k
{
535
38.8k
    Py_XINCREF(obj);
536
38.8k
    return obj;
537
38.8k
}
Unexecuted instantiation: importdl.c:_Py_XNewRef
Unexecuted instantiation: initconfig.c:_Py_XNewRef
Unexecuted instantiation: instrumentation.c:_Py_XNewRef
Unexecuted instantiation: instruction_sequence.c:_Py_XNewRef
Unexecuted instantiation: intrinsics.c:_Py_XNewRef
Unexecuted instantiation: legacy_tracing.c:_Py_XNewRef
Unexecuted instantiation: lock.c:_Py_XNewRef
Unexecuted instantiation: marshal.c:_Py_XNewRef
Unexecuted instantiation: modsupport.c:_Py_XNewRef
Unexecuted instantiation: mysnprintf.c:_Py_XNewRef
Unexecuted instantiation: parking_lot.c:_Py_XNewRef
Unexecuted instantiation: preconfig.c:_Py_XNewRef
Unexecuted instantiation: pyarena.c:_Py_XNewRef
Unexecuted instantiation: pyctype.c:_Py_XNewRef
Unexecuted instantiation: pyhash.c:_Py_XNewRef
Unexecuted instantiation: pylifecycle.c:_Py_XNewRef
Unexecuted instantiation: pymath.c:_Py_XNewRef
pystate.c:_Py_XNewRef
Line
Count
Source
534
768k
{
535
768k
    Py_XINCREF(obj);
536
768k
    return obj;
537
768k
}
Unexecuted instantiation: pythonrun.c:_Py_XNewRef
Unexecuted instantiation: pytime.c:_Py_XNewRef
Unexecuted instantiation: qsbr.c:_Py_XNewRef
Unexecuted instantiation: bootstrap_hash.c:_Py_XNewRef
Unexecuted instantiation: specialize.c:_Py_XNewRef
Unexecuted instantiation: 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
100M
{
535
100M
    Py_XINCREF(obj);
536
100M
    return obj;
537
100M
}
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
153k
{
535
153k
    Py_XINCREF(obj);
536
153k
    return obj;
537
153k
}
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
22.7M
{
535
22.7M
    Py_XINCREF(obj);
536
22.7M
    return obj;
537
22.7M
}
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
8.08M
{
535
8.08M
    Py_XINCREF(obj);
536
8.08M
    return obj;
537
8.08M
}
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.6k
{
535
79.6k
    Py_XINCREF(obj);
536
79.6k
    return obj;
537
79.6k
}
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
8.52M
{
535
8.52M
    Py_XINCREF(obj);
536
8.52M
    return obj;
537
8.52M
}
funcobject.c:_Py_XNewRef
Line
Count
Source
534
20.5k
{
535
20.5k
    Py_XINCREF(obj);
536
20.5k
    return obj;
537
20.5k
}
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
635M
{
535
635M
    Py_XINCREF(obj);
536
635M
    return obj;
537
635M
}
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
structmember.c:_Py_XNewRef
Line
Count
Source
534
1.36M
{
535
1.36M
    Py_XINCREF(obj);
536
1.36M
    return obj;
537
1.36M
}
pegen.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: 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
10.9G
#  define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj))
544
1.62G
#  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