Coverage Report

Created: 2026-01-09 06:26

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/cpython/Include/refcount.h
Line
Count
Source
1
#ifndef _Py_REFCOUNT_H
2
#define _Py_REFCOUNT_H
3
#ifdef __cplusplus
4
extern "C" {
5
#endif
6
7
8
/*
9
Immortalization:
10
11
The following indicates the immortalization strategy depending on the amount
12
of available bits in the reference count field. All strategies are backwards
13
compatible but the specific reference count value or immortalization check
14
might change depending on the specializations for the underlying system.
15
16
Proper deallocation of immortal instances requires distinguishing between
17
statically allocated immortal instances vs those promoted by the runtime to be
18
immortal. The latter should be the only instances that require
19
cleanup during runtime finalization.
20
*/
21
22
#if SIZEOF_VOID_P > 4
23
/*
24
In 64+ bit systems, any object whose 32 bit reference count is >= 2**31
25
will be treated as immortal.
26
27
Using the lower 32 bits makes the value backwards compatible by allowing
28
C-Extensions without the updated checks in Py_INCREF and Py_DECREF to safely
29
increase and decrease the objects reference count.
30
31
In order to offer sufficient resilience to C extensions using the stable ABI
32
compiled against 3.11 or earlier, we set the initial value near the
33
middle of the range (2**31, 2**32). That way the refcount can be
34
off by ~1 billion without affecting immortality.
35
36
Reference count increases will use saturated arithmetic, taking advantage of
37
having all the lower 32 bits set, which will avoid the reference count to go
38
beyond the refcount limit. Immortality checks for reference count decreases will
39
be done by checking the bit sign flag in the lower 32 bits.
40
41
To ensure that once an object becomes immortal, it remains immortal, the threshold
42
for omitting increfs is much higher than for omitting decrefs. Consequently, once
43
the refcount for an object exceeds _Py_IMMORTAL_MINIMUM_REFCNT it will gradually
44
increase over time until it reaches _Py_IMMORTAL_INITIAL_REFCNT.
45
*/
46
20.2G
#define _Py_IMMORTAL_INITIAL_REFCNT (3ULL << 30)
47
326
#define _Py_IMMORTAL_MINIMUM_REFCNT (1ULL << 31)
48
279M
#define _Py_STATIC_FLAG_BITS ((Py_ssize_t)(_Py_STATICALLY_ALLOCATED_FLAG | _Py_IMMORTAL_FLAGS))
49
279M
#define _Py_STATIC_IMMORTAL_INITIAL_REFCNT (((Py_ssize_t)_Py_IMMORTAL_INITIAL_REFCNT) | (_Py_STATIC_FLAG_BITS << 48))
50
51
#else
52
/*
53
In 32 bit systems, an object will be treated as immortal if its reference
54
count equals or exceeds _Py_IMMORTAL_MINIMUM_REFCNT (2**30).
55
56
Using the lower 30 bits makes the value backwards compatible by allowing
57
C-Extensions without the updated checks in Py_INCREF and Py_DECREF to safely
58
increase and decrease the objects reference count. The object would lose its
59
immortality, but the execution would still be correct.
60
61
Reference count increases and decreases will first go through an immortality
62
check by comparing the reference count field to the minimum immortality refcount.
63
*/
64
#define _Py_IMMORTAL_INITIAL_REFCNT ((Py_ssize_t)(5L << 28))
65
#define _Py_IMMORTAL_MINIMUM_REFCNT ((Py_ssize_t)(1L << 30))
66
#define _Py_STATIC_IMMORTAL_INITIAL_REFCNT ((Py_ssize_t)(7L << 28))
67
#define _Py_STATIC_IMMORTAL_MINIMUM_REFCNT ((Py_ssize_t)(6L << 28))
68
#endif
69
70
// Py_GIL_DISABLED builds indicate immortal objects using `ob_ref_local`, which is
71
// always 32-bits.
72
#ifdef Py_GIL_DISABLED
73
#define _Py_IMMORTAL_REFCNT_LOCAL UINT32_MAX
74
#endif
75
76
77
#ifdef Py_GIL_DISABLED
78
   // The shared reference count uses the two least-significant bits to store
79
   // flags. The remaining bits are used to store the reference count.
80
#  define _Py_REF_SHARED_SHIFT        2
81
#  define _Py_REF_SHARED_FLAG_MASK    0x3
82
83
   // The shared flags are initialized to zero.
84
#  define _Py_REF_SHARED_INIT         0x0
85
#  define _Py_REF_MAYBE_WEAKREF       0x1
86
#  define _Py_REF_QUEUED              0x2
87
#  define _Py_REF_MERGED              0x3
88
89
   // Create a shared field from a refcnt and desired flags
90
#  define _Py_REF_SHARED(refcnt, flags) \
91
              (((refcnt) << _Py_REF_SHARED_SHIFT) + (flags))
92
#endif  // Py_GIL_DISABLED
93
94
95
// Py_REFCNT() implementation for the stable ABI
96
PyAPI_FUNC(Py_ssize_t) Py_REFCNT(PyObject *ob);
97
98
#if defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030e0000
99
    // Stable ABI implements Py_REFCNT() as a function call
100
    // on limited C API version 3.14 and newer.
101
#else
102
1.15G
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
1.15G
    #if !defined(Py_GIL_DISABLED)
104
1.15G
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
1.15G
    }
bytesobject.c:_Py_REFCNT
Line
Count
Source
102
2.10M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
2.10M
    #if !defined(Py_GIL_DISABLED)
104
2.10M
        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.10M
    }
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
326
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
326
    #if !defined(Py_GIL_DISABLED)
104
326
        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
326
    }
longobject.c:_Py_REFCNT
Line
Count
Source
102
455
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
455
    #if !defined(Py_GIL_DISABLED)
104
455
        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
455
    }
dictobject.c:_Py_REFCNT
Line
Count
Source
102
662M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
662M
    #if !defined(Py_GIL_DISABLED)
104
662M
        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
662M
    }
Unexecuted instantiation: memoryobject.c:_Py_REFCNT
Unexecuted instantiation: moduleobject.c:_Py_REFCNT
object.c:_Py_REFCNT
Line
Count
Source
102
69.2M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
69.2M
    #if !defined(Py_GIL_DISABLED)
104
69.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
69.2M
    }
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
107k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
107k
    #if !defined(Py_GIL_DISABLED)
104
107k
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
107k
    }
typeobject.c:_Py_REFCNT
Line
Count
Source
102
78
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
78
    #if !defined(Py_GIL_DISABLED)
104
78
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
78
    }
Unexecuted instantiation: typevarobject.c:_Py_REFCNT
unicode_format.c:_Py_REFCNT
Line
Count
Source
102
10.9M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
10.9M
    #if !defined(Py_GIL_DISABLED)
104
10.9M
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
10.9M
    }
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
77.3M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
77.3M
    #if !defined(Py_GIL_DISABLED)
104
77.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
77.3M
    }
Unexecuted instantiation: unionobject.c:_Py_REFCNT
weakrefobject.c:_Py_REFCNT
Line
Count
Source
102
54.9M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
54.9M
    #if !defined(Py_GIL_DISABLED)
104
54.9M
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
54.9M
    }
Unexecuted instantiation: _warnings.c:_Py_REFCNT
bltinmodule.c:_Py_REFCNT
Line
Count
Source
102
24.1M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
24.1M
    #if !defined(Py_GIL_DISABLED)
104
24.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
24.1M
    }
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
54.9M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
54.9M
    #if !defined(Py_GIL_DISABLED)
104
54.9M
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
54.9M
    }
Unexecuted instantiation: future.c:_Py_REFCNT
gc.c:_Py_REFCNT
Line
Count
Source
102
70.4M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
70.4M
    #if !defined(Py_GIL_DISABLED)
104
70.4M
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
70.4M
    }
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
196k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
196k
    #if !defined(Py_GIL_DISABLED)
104
196k
        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
196k
    }
Unexecuted instantiation: modsupport.c:_Py_REFCNT
Unexecuted instantiation: mysnprintf.c:_Py_REFCNT
Unexecuted instantiation: parking_lot.c:_Py_REFCNT
Unexecuted instantiation: preconfig.c:_Py_REFCNT
Unexecuted instantiation: pyarena.c:_Py_REFCNT
Unexecuted instantiation: pyctype.c:_Py_REFCNT
Unexecuted instantiation: pyhash.c:_Py_REFCNT
Unexecuted instantiation: pylifecycle.c:_Py_REFCNT
Unexecuted instantiation: pymath.c:_Py_REFCNT
Unexecuted instantiation: pystate.c:_Py_REFCNT
Unexecuted instantiation: pythonrun.c:_Py_REFCNT
Unexecuted instantiation: pytime.c:_Py_REFCNT
Unexecuted instantiation: qsbr.c:_Py_REFCNT
Unexecuted instantiation: bootstrap_hash.c:_Py_REFCNT
Unexecuted instantiation: specialize.c:_Py_REFCNT
Unexecuted instantiation: structmember.c:_Py_REFCNT
Unexecuted instantiation: symtable.c:_Py_REFCNT
Unexecuted instantiation: sysmodule.c:_Py_REFCNT
Unexecuted instantiation: thread.c:_Py_REFCNT
Unexecuted instantiation: traceback.c:_Py_REFCNT
Unexecuted instantiation: tracemalloc.c:_Py_REFCNT
Unexecuted instantiation: getopt.c:_Py_REFCNT
Unexecuted instantiation: pystrcmp.c:_Py_REFCNT
Unexecuted instantiation: pystrtod.c:_Py_REFCNT
Unexecuted instantiation: pystrhex.c:_Py_REFCNT
Unexecuted instantiation: dtoa.c:_Py_REFCNT
Unexecuted instantiation: fileutils.c:_Py_REFCNT
Unexecuted instantiation: suggestions.c:_Py_REFCNT
Unexecuted instantiation: perf_trampoline.c:_Py_REFCNT
Unexecuted instantiation: perf_jit_trampoline.c:_Py_REFCNT
Unexecuted instantiation: remote_debugging.c:_Py_REFCNT
Unexecuted instantiation: dynload_shlib.c:_Py_REFCNT
Unexecuted instantiation: config.c:_Py_REFCNT
Unexecuted instantiation: gcmodule.c:_Py_REFCNT
Unexecuted instantiation: _asynciomodule.c:_Py_REFCNT
Unexecuted instantiation: atexitmodule.c:_Py_REFCNT
Unexecuted instantiation: faulthandler.c:_Py_REFCNT
Unexecuted instantiation: posixmodule.c:_Py_REFCNT
Unexecuted instantiation: signalmodule.c:_Py_REFCNT
Unexecuted instantiation: _tracemalloc.c:_Py_REFCNT
Unexecuted instantiation: _suggestions.c:_Py_REFCNT
Unexecuted instantiation: _datetimemodule.c:_Py_REFCNT
Unexecuted instantiation: _codecsmodule.c:_Py_REFCNT
Unexecuted instantiation: _collectionsmodule.c:_Py_REFCNT
Unexecuted instantiation: errnomodule.c:_Py_REFCNT
Unexecuted instantiation: _iomodule.c:_Py_REFCNT
iobase.c:_Py_REFCNT
Line
Count
Source
102
136k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
136k
    #if !defined(Py_GIL_DISABLED)
104
136k
        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
136k
    }
Unexecuted instantiation: fileio.c:_Py_REFCNT
bytesio.c:_Py_REFCNT
Line
Count
Source
102
2.28k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
2.28k
    #if !defined(Py_GIL_DISABLED)
104
2.28k
        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.28k
    }
Unexecuted instantiation: bufferedio.c:_Py_REFCNT
Unexecuted instantiation: textio.c:_Py_REFCNT
Unexecuted instantiation: stringio.c:_Py_REFCNT
itertoolsmodule.c:_Py_REFCNT
Line
Count
Source
102
540
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
540
    #if !defined(Py_GIL_DISABLED)
104
540
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
540
    }
Unexecuted instantiation: sre.c:_Py_REFCNT
Unexecuted instantiation: _sysconfig.c:_Py_REFCNT
Unexecuted instantiation: _threadmodule.c:_Py_REFCNT
Unexecuted instantiation: timemodule.c:_Py_REFCNT
Unexecuted instantiation: _typesmodule.c:_Py_REFCNT
Unexecuted instantiation: _typingmodule.c:_Py_REFCNT
Unexecuted instantiation: _weakref.c:_Py_REFCNT
Unexecuted instantiation: _abc.c:_Py_REFCNT
_functoolsmodule.c:_Py_REFCNT
Line
Count
Source
102
189k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
189k
    #if !defined(Py_GIL_DISABLED)
104
189k
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
189k
    }
Unexecuted instantiation: _localemodule.c:_Py_REFCNT
Unexecuted instantiation: _opcode.c:_Py_REFCNT
Unexecuted instantiation: _operator.c:_Py_REFCNT
Unexecuted instantiation: _stat.c:_Py_REFCNT
Unexecuted instantiation: symtablemodule.c:_Py_REFCNT
Unexecuted instantiation: pwdmodule.c:_Py_REFCNT
Unexecuted instantiation: getpath.c:_Py_REFCNT
Unexecuted instantiation: frozen.c:_Py_REFCNT
Unexecuted instantiation: getbuildinfo.c:_Py_REFCNT
Unexecuted instantiation: peg_api.c:_Py_REFCNT
Unexecuted instantiation: file_tokenizer.c:_Py_REFCNT
Unexecuted instantiation: helpers.c:_Py_REFCNT
Unexecuted instantiation: myreadline.c:_Py_REFCNT
Unexecuted instantiation: abstract.c:_Py_REFCNT
Unexecuted instantiation: boolobject.c:_Py_REFCNT
Unexecuted instantiation: bytes_methods.c:_Py_REFCNT
Unexecuted instantiation: bytearrayobject.c:_Py_REFCNT
Unexecuted instantiation: capsule.c:_Py_REFCNT
Unexecuted instantiation: cellobject.c:_Py_REFCNT
Unexecuted instantiation: classobject.c:_Py_REFCNT
codeobject.c:_Py_REFCNT
Line
Count
Source
102
193k
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
193k
    #if !defined(Py_GIL_DISABLED)
104
193k
        return ob->ob_refcnt;
105
    #else
106
        uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
107
        if (local == _Py_IMMORTAL_REFCNT_LOCAL) {
108
            return _Py_IMMORTAL_INITIAL_REFCNT;
109
        }
110
        Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
111
        return _Py_STATIC_CAST(Py_ssize_t, local) +
112
               Py_ARITHMETIC_RIGHT_SHIFT(Py_ssize_t, shared, _Py_REF_SHARED_SHIFT);
113
    #endif
114
193k
    }
Unexecuted instantiation: complexobject.c:_Py_REFCNT
Unexecuted instantiation: descrobject.c:_Py_REFCNT
enumobject.c:_Py_REFCNT
Line
Count
Source
102
96.0M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
96.0M
    #if !defined(Py_GIL_DISABLED)
104
96.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
96.0M
    }
Unexecuted instantiation: genobject.c:_Py_REFCNT
Unexecuted instantiation: fileobject.c:_Py_REFCNT
Unexecuted instantiation: frameobject.c:_Py_REFCNT
funcobject.c:_Py_REFCNT
Line
Count
Source
102
27.6M
    static inline Py_ssize_t _Py_REFCNT(PyObject *ob) {
103
27.6M
    #if !defined(Py_GIL_DISABLED)
104
27.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
27.6M
    }
Unexecuted instantiation: interpolationobject.c:_Py_REFCNT
Unexecuted instantiation: iterobject.c:_Py_REFCNT
Unexecuted instantiation: odictobject.c:_Py_REFCNT
Unexecuted instantiation: methodobject.c:_Py_REFCNT
Unexecuted instantiation: namespaceobject.c:_Py_REFCNT
Unexecuted instantiation: _contextvars.c:_Py_REFCNT
Unexecuted instantiation: Python-ast.c:_Py_REFCNT
Unexecuted instantiation: Python-tokenize.c:_Py_REFCNT
Unexecuted instantiation: asdl.c:_Py_REFCNT
Unexecuted instantiation: assemble.c:_Py_REFCNT
Unexecuted instantiation: ast.c:_Py_REFCNT
Unexecuted instantiation: ast_preprocess.c:_Py_REFCNT
Unexecuted instantiation: ast_unparse.c:_Py_REFCNT
Unexecuted instantiation: critical_section.c:_Py_REFCNT
Unexecuted instantiation: crossinterp.c:_Py_REFCNT
Unexecuted instantiation: getcopyright.c:_Py_REFCNT
Unexecuted instantiation: getplatform.c:_Py_REFCNT
Unexecuted instantiation: getversion.c:_Py_REFCNT
Unexecuted instantiation: optimizer.c:_Py_REFCNT
Unexecuted instantiation: pathconfig.c:_Py_REFCNT
Unexecuted instantiation: pegen.c:_Py_REFCNT
Unexecuted instantiation: pegen_errors.c:_Py_REFCNT
Unexecuted instantiation: parser.c:_Py_REFCNT
Unexecuted instantiation: buffer.c:_Py_REFCNT
Unexecuted instantiation: lexer.c:_Py_REFCNT
Unexecuted instantiation: state.c:_Py_REFCNT
Unexecuted instantiation: readline_tokenizer.c:_Py_REFCNT
Unexecuted instantiation: string_tokenizer.c:_Py_REFCNT
Unexecuted instantiation: utf8_tokenizer.c:_Py_REFCNT
Unexecuted instantiation: getcompiler.c:_Py_REFCNT
Unexecuted instantiation: mystrtoul.c:_Py_REFCNT
Unexecuted instantiation: token.c:_Py_REFCNT
Unexecuted instantiation: action_helpers.c:_Py_REFCNT
Unexecuted instantiation: string_parser.c:_Py_REFCNT
115
    #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
116
784M
    #  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
33.0G
{
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
33.0G
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
33.0G
}
bytesobject.c:_Py_IsImmortal
Line
Count
Source
124
5.13M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
5.13M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
5.13M
}
call.c:_Py_IsImmortal
Line
Count
Source
124
216M
{
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
216M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
216M
}
exceptions.c:_Py_IsImmortal
Line
Count
Source
124
202M
{
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
202M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
202M
}
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
161k
{
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
161k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
161k
}
listobject.c:_Py_IsImmortal
Line
Count
Source
124
1.73G
{
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.73G
    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.73G
}
longobject.c:_Py_IsImmortal
Line
Count
Source
124
50.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
50.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
50.9M
}
dictobject.c:_Py_IsImmortal
Line
Count
Source
124
2.03G
{
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.03G
    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.03G
}
memoryobject.c:_Py_IsImmortal
Line
Count
Source
124
3.10M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
3.10M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
3.10M
}
moduleobject.c:_Py_IsImmortal
Line
Count
Source
124
3.46M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
3.46M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
3.46M
}
object.c:_Py_IsImmortal
Line
Count
Source
124
1.07G
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
1.07G
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
1.07G
}
Unexecuted instantiation: obmalloc.c:_Py_IsImmortal
Unexecuted instantiation: picklebufobject.c:_Py_IsImmortal
rangeobject.c:_Py_IsImmortal
Line
Count
Source
124
64.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
64.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
64.4M
}
setobject.c:_Py_IsImmortal
Line
Count
Source
124
18.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
18.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
18.4M
}
sliceobject.c:_Py_IsImmortal
Line
Count
Source
124
245M
{
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
245M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
245M
}
structseq.c:_Py_IsImmortal
Line
Count
Source
124
9.22M
{
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.22M
    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.22M
}
templateobject.c:_Py_IsImmortal
Line
Count
Source
124
4
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
4
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
4
}
tupleobject.c:_Py_IsImmortal
Line
Count
Source
124
9.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
9.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
9.31G
}
typeobject.c:_Py_IsImmortal
Line
Count
Source
124
1.40G
{
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.40G
    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.40G
}
typevarobject.c:_Py_IsImmortal
Line
Count
Source
124
300
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
300
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
300
}
unicode_format.c:_Py_IsImmortal
Line
Count
Source
124
79.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
79.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
79.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
17.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
17.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
17.8M
}
Unexecuted instantiation: unicodectype.c:_Py_IsImmortal
unicodeobject.c:_Py_IsImmortal
Line
Count
Source
124
216M
{
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
216M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
216M
}
unionobject.c:_Py_IsImmortal
Line
Count
Source
124
1.57k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
1.57k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
1.57k
}
weakrefobject.c:_Py_IsImmortal
Line
Count
Source
124
81.7k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
81.7k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
81.7k
}
_warnings.c:_Py_IsImmortal
Line
Count
Source
124
55.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
55.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
55.4M
}
bltinmodule.c:_Py_IsImmortal
Line
Count
Source
124
2.35G
{
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.35G
    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.35G
}
ceval.c:_Py_IsImmortal
Line
Count
Source
124
10.5G
{
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.5G
    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.5G
}
codecs.c:_Py_IsImmortal
Line
Count
Source
124
10.2M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
10.2M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
10.2M
}
codegen.c:_Py_IsImmortal
Line
Count
Source
124
190k
{
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
190k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
190k
}
compile.c:_Py_IsImmortal
Line
Count
Source
124
733k
{
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
733k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
733k
}
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
97.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
97.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
97.0M
}
flowgraph.c:_Py_IsImmortal
Line
Count
Source
124
86.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
86.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
86.1k
}
frame.c:_Py_IsImmortal
Line
Count
Source
124
109M
{
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
109M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
109M
}
Unexecuted instantiation: future.c:_Py_IsImmortal
gc.c:_Py_IsImmortal
Line
Count
Source
124
611M
{
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
611M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
611M
}
Unexecuted instantiation: gc_gil.c:_Py_IsImmortal
getargs.c:_Py_IsImmortal
Line
Count
Source
124
8.78M
{
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.78M
    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.78M
}
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
14.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
14.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
14.7M
}
importdl.c:_Py_IsImmortal
Line
Count
Source
124
2.11k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
2.11k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
2.11k
}
initconfig.c:_Py_IsImmortal
Line
Count
Source
124
3.86k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
3.86k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
3.86k
}
instrumentation.c:_Py_IsImmortal
Line
Count
Source
124
672
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
672
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
672
}
instruction_sequence.c:_Py_IsImmortal
Line
Count
Source
124
1
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
1
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
1
}
intrinsics.c:_Py_IsImmortal
Line
Count
Source
124
52.0k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
52.0k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
52.0k
}
Unexecuted instantiation: legacy_tracing.c:_Py_IsImmortal
Unexecuted instantiation: lock.c:_Py_IsImmortal
marshal.c:_Py_IsImmortal
Line
Count
Source
124
1.40M
{
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.40M
    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.40M
}
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.36M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
4.36M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
4.36M
}
Unexecuted instantiation: pyctype.c:_Py_IsImmortal
Unexecuted instantiation: pyhash.c:_Py_IsImmortal
pylifecycle.c:_Py_IsImmortal
Line
Count
Source
124
1.00k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
1.00k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
1.00k
}
Unexecuted instantiation: pymath.c:_Py_IsImmortal
Unexecuted instantiation: pystate.c:_Py_IsImmortal
pythonrun.c:_Py_IsImmortal
Line
Count
Source
124
664
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
664
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
664
}
Unexecuted instantiation: pytime.c:_Py_IsImmortal
Unexecuted instantiation: qsbr.c:_Py_IsImmortal
Unexecuted instantiation: bootstrap_hash.c:_Py_IsImmortal
specialize.c:_Py_IsImmortal
Line
Count
Source
124
2.34M
{
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.34M
    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.34M
}
structmember.c:_Py_IsImmortal
Line
Count
Source
124
1.65k
{
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.65k
    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.65k
}
symtable.c:_Py_IsImmortal
Line
Count
Source
124
985k
{
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
985k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
985k
}
sysmodule.c:_Py_IsImmortal
Line
Count
Source
124
4.65M
{
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.65M
    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.65M
}
Unexecuted instantiation: thread.c:_Py_IsImmortal
traceback.c:_Py_IsImmortal
Line
Count
Source
124
161M
{
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
161M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
161M
}
Unexecuted instantiation: tracemalloc.c:_Py_IsImmortal
Unexecuted instantiation: getopt.c:_Py_IsImmortal
Unexecuted instantiation: pystrcmp.c:_Py_IsImmortal
Unexecuted instantiation: pystrtod.c:_Py_IsImmortal
Unexecuted instantiation: pystrhex.c:_Py_IsImmortal
Unexecuted instantiation: dtoa.c:_Py_IsImmortal
fileutils.c:_Py_IsImmortal
Line
Count
Source
124
10.1k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
10.1k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
10.1k
}
Unexecuted instantiation: suggestions.c:_Py_IsImmortal
Unexecuted instantiation: perf_trampoline.c:_Py_IsImmortal
Unexecuted instantiation: perf_jit_trampoline.c:_Py_IsImmortal
Unexecuted instantiation: remote_debugging.c:_Py_IsImmortal
Unexecuted instantiation: dynload_shlib.c:_Py_IsImmortal
Unexecuted instantiation: config.c:_Py_IsImmortal
Unexecuted instantiation: gcmodule.c:_Py_IsImmortal
Unexecuted instantiation: _asynciomodule.c:_Py_IsImmortal
atexitmodule.c:_Py_IsImmortal
Line
Count
Source
124
2
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
2
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
2
}
Unexecuted instantiation: faulthandler.c:_Py_IsImmortal
posixmodule.c:_Py_IsImmortal
Line
Count
Source
124
4.95M
{
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.95M
    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.95M
}
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
687
{
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
687
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
687
}
Unexecuted instantiation: _codecsmodule.c:_Py_IsImmortal
_collectionsmodule.c:_Py_IsImmortal
Line
Count
Source
124
105k
{
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
105k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
105k
}
Unexecuted instantiation: errnomodule.c:_Py_IsImmortal
_iomodule.c:_Py_IsImmortal
Line
Count
Source
124
2.64M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
2.64M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
2.64M
}
iobase.c:_Py_IsImmortal
Line
Count
Source
124
2.84M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
2.84M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
2.84M
}
fileio.c:_Py_IsImmortal
Line
Count
Source
124
114k
{
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
114k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
114k
}
bytesio.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
}
bufferedio.c:_Py_IsImmortal
Line
Count
Source
124
10.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
10.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
10.1M
}
textio.c:_Py_IsImmortal
Line
Count
Source
124
1.05M
{
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.05M
    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.05M
}
stringio.c:_Py_IsImmortal
Line
Count
Source
124
322k
{
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
322k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
322k
}
itertoolsmodule.c:_Py_IsImmortal
Line
Count
Source
124
92.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
92.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
92.8k
}
sre.c:_Py_IsImmortal
Line
Count
Source
124
440M
{
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
440M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
440M
}
Unexecuted instantiation: _sysconfig.c:_Py_IsImmortal
_threadmodule.c:_Py_IsImmortal
Line
Count
Source
124
34.4k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
34.4k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
34.4k
}
Unexecuted instantiation: timemodule.c:_Py_IsImmortal
Unexecuted instantiation: _typesmodule.c:_Py_IsImmortal
Unexecuted instantiation: _typingmodule.c:_Py_IsImmortal
Unexecuted instantiation: _weakref.c:_Py_IsImmortal
_abc.c:_Py_IsImmortal
Line
Count
Source
124
102k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
102k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
102k
}
_functoolsmodule.c:_Py_IsImmortal
Line
Count
Source
124
753k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
753k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
753k
}
Unexecuted instantiation: _localemodule.c:_Py_IsImmortal
Unexecuted instantiation: _opcode.c:_Py_IsImmortal
_operator.c:_Py_IsImmortal
Line
Count
Source
124
556k
{
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
556k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
556k
}
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.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
21.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
21.8k
}
Unexecuted instantiation: myreadline.c:_Py_IsImmortal
abstract.c:_Py_IsImmortal
Line
Count
Source
124
745M
{
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
745M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
745M
}
Unexecuted instantiation: boolobject.c:_Py_IsImmortal
Unexecuted instantiation: bytes_methods.c:_Py_IsImmortal
bytearrayobject.c:_Py_IsImmortal
Line
Count
Source
124
3.84M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
3.84M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
3.84M
}
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
517k
{
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
517k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
517k
}
classobject.c:_Py_IsImmortal
Line
Count
Source
124
97.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
97.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
97.5M
}
codeobject.c:_Py_IsImmortal
Line
Count
Source
124
1.10M
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
1.10M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
1.10M
}
Unexecuted instantiation: complexobject.c:_Py_IsImmortal
descrobject.c:_Py_IsImmortal
Line
Count
Source
124
82.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
82.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
82.7M
}
enumobject.c:_Py_IsImmortal
Line
Count
Source
124
255M
{
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
255M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
255M
}
genobject.c:_Py_IsImmortal
Line
Count
Source
124
143M
{
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
143M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
143M
}
fileobject.c:_Py_IsImmortal
Line
Count
Source
124
387k
{
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
387k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
387k
}
frameobject.c:_Py_IsImmortal
Line
Count
Source
124
36.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
36.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
36.9M
}
funcobject.c:_Py_IsImmortal
Line
Count
Source
124
152M
{
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
152M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
152M
}
interpolationobject.c:_Py_IsImmortal
Line
Count
Source
124
28
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
28
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
28
}
iterobject.c:_Py_IsImmortal
Line
Count
Source
124
3.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
3.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
3.23M
}
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
336M
{
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
336M
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
336M
}
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.66M
{
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.66M
    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.66M
}
Unexecuted instantiation: Python-tokenize.c:_Py_IsImmortal
Unexecuted instantiation: asdl.c:_Py_IsImmortal
assemble.c:_Py_IsImmortal
Line
Count
Source
124
57.6k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
57.6k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
57.6k
}
Unexecuted instantiation: ast.c:_Py_IsImmortal
ast_preprocess.c:_Py_IsImmortal
Line
Count
Source
124
3
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
3
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
3
}
ast_unparse.c:_Py_IsImmortal
Line
Count
Source
124
8
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
8
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
8
}
Unexecuted instantiation: critical_section.c:_Py_IsImmortal
Unexecuted instantiation: crossinterp.c:_Py_IsImmortal
Unexecuted instantiation: getcopyright.c:_Py_IsImmortal
Unexecuted instantiation: getplatform.c:_Py_IsImmortal
Unexecuted instantiation: getversion.c:_Py_IsImmortal
Unexecuted instantiation: optimizer.c:_Py_IsImmortal
Unexecuted instantiation: pathconfig.c:_Py_IsImmortal
pegen.c:_Py_IsImmortal
Line
Count
Source
124
127k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
127k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
127k
}
pegen_errors.c:_Py_IsImmortal
Line
Count
Source
124
41.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
41.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
41.2k
}
Unexecuted instantiation: parser.c:_Py_IsImmortal
Unexecuted instantiation: buffer.c:_Py_IsImmortal
lexer.c:_Py_IsImmortal
Line
Count
Source
124
12.5k
{
125
#if defined(Py_GIL_DISABLED)
126
    return (_Py_atomic_load_uint32_relaxed(&op->ob_ref_local) ==
127
            _Py_IMMORTAL_REFCNT_LOCAL);
128
#elif SIZEOF_VOID_P > 4
129
12.5k
    return _Py_CAST(PY_INT32_T, op->ob_refcnt) < 0;
130
#else
131
    return op->ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT;
132
#endif
133
12.5k
}
state.c:_Py_IsImmortal
Line
Count
Source
124
21.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
42.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
42.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
42.1k
}
134
35.3G
#define _Py_IsImmortal(op) _Py_IsImmortal(_PyObject_CAST(op))
135
136
137
static inline Py_ALWAYS_INLINE int _Py_IsStaticImmortal(PyObject *op)
138
0
{
139
0
#if defined(Py_GIL_DISABLED) || SIZEOF_VOID_P > 4
140
0
    return (op->ob_flags & _Py_STATICALLY_ALLOCATED_FLAG) != 0;
141
0
#else
142
0
    return op->ob_refcnt >= _Py_STATIC_IMMORTAL_MINIMUM_REFCNT;
143
0
#endif
144
0
}
Unexecuted instantiation: bytesobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: call.c:_Py_IsStaticImmortal
Unexecuted instantiation: exceptions.c:_Py_IsStaticImmortal
Unexecuted instantiation: genericaliasobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: floatobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: listobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: longobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: dictobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: memoryobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: moduleobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: object.c:_Py_IsStaticImmortal
Unexecuted instantiation: obmalloc.c:_Py_IsStaticImmortal
Unexecuted instantiation: picklebufobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: rangeobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: setobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: sliceobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: structseq.c:_Py_IsStaticImmortal
Unexecuted instantiation: templateobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: tupleobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: typeobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: typevarobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: unicode_format.c:_Py_IsStaticImmortal
Unexecuted instantiation: unicode_formatter.c:_Py_IsStaticImmortal
Unexecuted instantiation: unicode_writer.c:_Py_IsStaticImmortal
Unexecuted instantiation: unicodectype.c:_Py_IsStaticImmortal
Unexecuted instantiation: unicodeobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: unionobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: weakrefobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: _warnings.c:_Py_IsStaticImmortal
Unexecuted instantiation: bltinmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: ceval.c:_Py_IsStaticImmortal
Unexecuted instantiation: codecs.c:_Py_IsStaticImmortal
Unexecuted instantiation: codegen.c:_Py_IsStaticImmortal
Unexecuted instantiation: compile.c:_Py_IsStaticImmortal
Unexecuted instantiation: context.c:_Py_IsStaticImmortal
Unexecuted instantiation: errors.c:_Py_IsStaticImmortal
Unexecuted instantiation: flowgraph.c:_Py_IsStaticImmortal
Unexecuted instantiation: frame.c:_Py_IsStaticImmortal
Unexecuted instantiation: future.c:_Py_IsStaticImmortal
Unexecuted instantiation: gc.c:_Py_IsStaticImmortal
Unexecuted instantiation: gc_gil.c:_Py_IsStaticImmortal
Unexecuted instantiation: getargs.c:_Py_IsStaticImmortal
Unexecuted instantiation: ceval_gil.c:_Py_IsStaticImmortal
Unexecuted instantiation: hamt.c:_Py_IsStaticImmortal
Unexecuted instantiation: hashtable.c:_Py_IsStaticImmortal
Unexecuted instantiation: import.c:_Py_IsStaticImmortal
Unexecuted instantiation: importdl.c:_Py_IsStaticImmortal
Unexecuted instantiation: initconfig.c:_Py_IsStaticImmortal
Unexecuted instantiation: instrumentation.c:_Py_IsStaticImmortal
Unexecuted instantiation: instruction_sequence.c:_Py_IsStaticImmortal
Unexecuted instantiation: intrinsics.c:_Py_IsStaticImmortal
Unexecuted instantiation: legacy_tracing.c:_Py_IsStaticImmortal
Unexecuted instantiation: lock.c:_Py_IsStaticImmortal
Unexecuted instantiation: marshal.c:_Py_IsStaticImmortal
Unexecuted instantiation: modsupport.c:_Py_IsStaticImmortal
Unexecuted instantiation: mysnprintf.c:_Py_IsStaticImmortal
Unexecuted instantiation: parking_lot.c:_Py_IsStaticImmortal
Unexecuted instantiation: preconfig.c:_Py_IsStaticImmortal
Unexecuted instantiation: pyarena.c:_Py_IsStaticImmortal
Unexecuted instantiation: pyctype.c:_Py_IsStaticImmortal
Unexecuted instantiation: pyhash.c:_Py_IsStaticImmortal
Unexecuted instantiation: pylifecycle.c:_Py_IsStaticImmortal
Unexecuted instantiation: pymath.c:_Py_IsStaticImmortal
Unexecuted instantiation: pystate.c:_Py_IsStaticImmortal
Unexecuted instantiation: pythonrun.c:_Py_IsStaticImmortal
Unexecuted instantiation: pytime.c:_Py_IsStaticImmortal
Unexecuted instantiation: qsbr.c:_Py_IsStaticImmortal
Unexecuted instantiation: bootstrap_hash.c:_Py_IsStaticImmortal
Unexecuted instantiation: specialize.c:_Py_IsStaticImmortal
Unexecuted instantiation: structmember.c:_Py_IsStaticImmortal
Unexecuted instantiation: symtable.c:_Py_IsStaticImmortal
Unexecuted instantiation: sysmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: thread.c:_Py_IsStaticImmortal
Unexecuted instantiation: traceback.c:_Py_IsStaticImmortal
Unexecuted instantiation: tracemalloc.c:_Py_IsStaticImmortal
Unexecuted instantiation: getopt.c:_Py_IsStaticImmortal
Unexecuted instantiation: pystrcmp.c:_Py_IsStaticImmortal
Unexecuted instantiation: pystrtod.c:_Py_IsStaticImmortal
Unexecuted instantiation: pystrhex.c:_Py_IsStaticImmortal
Unexecuted instantiation: dtoa.c:_Py_IsStaticImmortal
Unexecuted instantiation: fileutils.c:_Py_IsStaticImmortal
Unexecuted instantiation: suggestions.c:_Py_IsStaticImmortal
Unexecuted instantiation: perf_trampoline.c:_Py_IsStaticImmortal
Unexecuted instantiation: perf_jit_trampoline.c:_Py_IsStaticImmortal
Unexecuted instantiation: remote_debugging.c:_Py_IsStaticImmortal
Unexecuted instantiation: dynload_shlib.c:_Py_IsStaticImmortal
Unexecuted instantiation: config.c:_Py_IsStaticImmortal
Unexecuted instantiation: gcmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _asynciomodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: atexitmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: faulthandler.c:_Py_IsStaticImmortal
Unexecuted instantiation: posixmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: signalmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _tracemalloc.c:_Py_IsStaticImmortal
Unexecuted instantiation: _suggestions.c:_Py_IsStaticImmortal
Unexecuted instantiation: _datetimemodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _codecsmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _collectionsmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: errnomodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _iomodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: iobase.c:_Py_IsStaticImmortal
Unexecuted instantiation: fileio.c:_Py_IsStaticImmortal
Unexecuted instantiation: bytesio.c:_Py_IsStaticImmortal
Unexecuted instantiation: bufferedio.c:_Py_IsStaticImmortal
Unexecuted instantiation: textio.c:_Py_IsStaticImmortal
Unexecuted instantiation: stringio.c:_Py_IsStaticImmortal
Unexecuted instantiation: itertoolsmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: sre.c:_Py_IsStaticImmortal
Unexecuted instantiation: _sysconfig.c:_Py_IsStaticImmortal
Unexecuted instantiation: _threadmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: timemodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _typesmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _typingmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _weakref.c:_Py_IsStaticImmortal
Unexecuted instantiation: _abc.c:_Py_IsStaticImmortal
Unexecuted instantiation: _functoolsmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _localemodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: _opcode.c:_Py_IsStaticImmortal
Unexecuted instantiation: _operator.c:_Py_IsStaticImmortal
Unexecuted instantiation: _stat.c:_Py_IsStaticImmortal
Unexecuted instantiation: symtablemodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: pwdmodule.c:_Py_IsStaticImmortal
Unexecuted instantiation: getpath.c:_Py_IsStaticImmortal
Unexecuted instantiation: frozen.c:_Py_IsStaticImmortal
Unexecuted instantiation: getbuildinfo.c:_Py_IsStaticImmortal
Unexecuted instantiation: peg_api.c:_Py_IsStaticImmortal
Unexecuted instantiation: file_tokenizer.c:_Py_IsStaticImmortal
Unexecuted instantiation: helpers.c:_Py_IsStaticImmortal
Unexecuted instantiation: myreadline.c:_Py_IsStaticImmortal
Unexecuted instantiation: abstract.c:_Py_IsStaticImmortal
Unexecuted instantiation: boolobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: bytes_methods.c:_Py_IsStaticImmortal
Unexecuted instantiation: bytearrayobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: capsule.c:_Py_IsStaticImmortal
Unexecuted instantiation: cellobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: classobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: codeobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: complexobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: descrobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: enumobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: genobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: fileobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: frameobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: funcobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: interpolationobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: iterobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: odictobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: methodobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: namespaceobject.c:_Py_IsStaticImmortal
Unexecuted instantiation: _contextvars.c:_Py_IsStaticImmortal
Unexecuted instantiation: Python-ast.c:_Py_IsStaticImmortal
Unexecuted instantiation: Python-tokenize.c:_Py_IsStaticImmortal
Unexecuted instantiation: asdl.c:_Py_IsStaticImmortal
Unexecuted instantiation: assemble.c:_Py_IsStaticImmortal
Unexecuted instantiation: ast.c:_Py_IsStaticImmortal
Unexecuted instantiation: ast_preprocess.c:_Py_IsStaticImmortal
Unexecuted instantiation: ast_unparse.c:_Py_IsStaticImmortal
Unexecuted instantiation: critical_section.c:_Py_IsStaticImmortal
Unexecuted instantiation: crossinterp.c:_Py_IsStaticImmortal
Unexecuted instantiation: getcopyright.c:_Py_IsStaticImmortal
Unexecuted instantiation: getplatform.c:_Py_IsStaticImmortal
Unexecuted instantiation: getversion.c:_Py_IsStaticImmortal
Unexecuted instantiation: optimizer.c:_Py_IsStaticImmortal
Unexecuted instantiation: pathconfig.c:_Py_IsStaticImmortal
Unexecuted instantiation: pegen.c:_Py_IsStaticImmortal
Unexecuted instantiation: pegen_errors.c:_Py_IsStaticImmortal
Unexecuted instantiation: parser.c:_Py_IsStaticImmortal
Unexecuted instantiation: buffer.c:_Py_IsStaticImmortal
Unexecuted instantiation: lexer.c:_Py_IsStaticImmortal
Unexecuted instantiation: state.c:_Py_IsStaticImmortal
Unexecuted instantiation: readline_tokenizer.c:_Py_IsStaticImmortal
Unexecuted instantiation: string_tokenizer.c:_Py_IsStaticImmortal
Unexecuted instantiation: utf8_tokenizer.c:_Py_IsStaticImmortal
Unexecuted instantiation: getcompiler.c:_Py_IsStaticImmortal
Unexecuted instantiation: mystrtoul.c:_Py_IsStaticImmortal
Unexecuted instantiation: token.c:_Py_IsStaticImmortal
Unexecuted instantiation: action_helpers.c:_Py_IsStaticImmortal
Unexecuted instantiation: string_parser.c:_Py_IsStaticImmortal
145
#define _Py_IsStaticImmortal(op) _Py_IsStaticImmortal(_PyObject_CAST(op))
146
#endif // !defined(_Py_OPAQUE_PYOBJECT)
147
148
// Py_SET_REFCNT() implementation for stable ABI
149
PyAPI_FUNC(void) _Py_SetRefcnt(PyObject *ob, Py_ssize_t refcnt);
150
151
733M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
733M
    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
733M
    if (_Py_IsImmortal(ob)) {
163
796
        return;
164
796
    }
165
733M
#ifndef Py_GIL_DISABLED
166
733M
#if SIZEOF_VOID_P > 4
167
733M
    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
733M
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
733M
}
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
658M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
658M
    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
658M
    if (_Py_IsImmortal(ob)) {
163
0
        return;
164
0
    }
165
658M
#ifndef Py_GIL_DISABLED
166
658M
#if SIZEOF_VOID_P > 4
167
658M
    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
658M
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
658M
}
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.1M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
46.1M
    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.1M
    if (_Py_IsImmortal(ob)) {
163
0
        return;
164
0
    }
165
46.1M
#ifndef Py_GIL_DISABLED
166
46.1M
#if SIZEOF_VOID_P > 4
167
46.1M
    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.1M
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
46.1M
}
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.12M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
1.12M
    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.12M
    if (_Py_IsImmortal(ob)) {
163
0
        return;
164
0
    }
165
1.12M
#ifndef Py_GIL_DISABLED
166
1.12M
#if SIZEOF_VOID_P > 4
167
1.12M
    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.12M
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
1.12M
}
Unexecuted instantiation: unionobject.c:Py_SET_REFCNT
Unexecuted instantiation: weakrefobject.c:Py_SET_REFCNT
Unexecuted instantiation: _warnings.c:Py_SET_REFCNT
Unexecuted instantiation: bltinmodule.c:Py_SET_REFCNT
Unexecuted instantiation: ceval.c:Py_SET_REFCNT
Unexecuted instantiation: codecs.c:Py_SET_REFCNT
Unexecuted instantiation: codegen.c:Py_SET_REFCNT
Unexecuted instantiation: compile.c:Py_SET_REFCNT
Unexecuted instantiation: context.c:Py_SET_REFCNT
Unexecuted instantiation: errors.c:Py_SET_REFCNT
Unexecuted instantiation: flowgraph.c:Py_SET_REFCNT
Unexecuted instantiation: frame.c:Py_SET_REFCNT
Unexecuted instantiation: future.c:Py_SET_REFCNT
Unexecuted instantiation: gc.c:Py_SET_REFCNT
Unexecuted instantiation: gc_gil.c:Py_SET_REFCNT
Unexecuted instantiation: getargs.c:Py_SET_REFCNT
Unexecuted instantiation: ceval_gil.c:Py_SET_REFCNT
Unexecuted instantiation: hamt.c:Py_SET_REFCNT
Unexecuted instantiation: hashtable.c:Py_SET_REFCNT
Unexecuted instantiation: import.c:Py_SET_REFCNT
Unexecuted instantiation: importdl.c:Py_SET_REFCNT
Unexecuted instantiation: initconfig.c:Py_SET_REFCNT
Unexecuted instantiation: instrumentation.c:Py_SET_REFCNT
Unexecuted instantiation: instruction_sequence.c:Py_SET_REFCNT
Unexecuted instantiation: intrinsics.c:Py_SET_REFCNT
Unexecuted instantiation: legacy_tracing.c:Py_SET_REFCNT
Unexecuted instantiation: lock.c:Py_SET_REFCNT
Unexecuted instantiation: marshal.c:Py_SET_REFCNT
Unexecuted instantiation: modsupport.c:Py_SET_REFCNT
Unexecuted instantiation: mysnprintf.c:Py_SET_REFCNT
Unexecuted instantiation: parking_lot.c:Py_SET_REFCNT
Unexecuted instantiation: preconfig.c:Py_SET_REFCNT
Unexecuted instantiation: pyarena.c:Py_SET_REFCNT
Unexecuted instantiation: pyctype.c:Py_SET_REFCNT
Unexecuted instantiation: pyhash.c:Py_SET_REFCNT
Unexecuted instantiation: pylifecycle.c:Py_SET_REFCNT
Unexecuted instantiation: pymath.c:Py_SET_REFCNT
Unexecuted instantiation: pystate.c:Py_SET_REFCNT
Unexecuted instantiation: pythonrun.c:Py_SET_REFCNT
Unexecuted instantiation: pytime.c:Py_SET_REFCNT
Unexecuted instantiation: qsbr.c:Py_SET_REFCNT
Unexecuted instantiation: bootstrap_hash.c:Py_SET_REFCNT
Unexecuted instantiation: specialize.c:Py_SET_REFCNT
Unexecuted instantiation: structmember.c:Py_SET_REFCNT
Unexecuted instantiation: symtable.c:Py_SET_REFCNT
Unexecuted instantiation: sysmodule.c:Py_SET_REFCNT
Unexecuted instantiation: thread.c:Py_SET_REFCNT
Unexecuted instantiation: traceback.c:Py_SET_REFCNT
Unexecuted instantiation: tracemalloc.c:Py_SET_REFCNT
Unexecuted instantiation: getopt.c:Py_SET_REFCNT
Unexecuted instantiation: pystrcmp.c:Py_SET_REFCNT
Unexecuted instantiation: pystrtod.c:Py_SET_REFCNT
Unexecuted instantiation: pystrhex.c:Py_SET_REFCNT
Unexecuted instantiation: dtoa.c:Py_SET_REFCNT
Unexecuted instantiation: fileutils.c:Py_SET_REFCNT
Unexecuted instantiation: suggestions.c:Py_SET_REFCNT
Unexecuted instantiation: perf_trampoline.c:Py_SET_REFCNT
Unexecuted instantiation: perf_jit_trampoline.c:Py_SET_REFCNT
Unexecuted instantiation: remote_debugging.c:Py_SET_REFCNT
Unexecuted instantiation: dynload_shlib.c:Py_SET_REFCNT
Unexecuted instantiation: config.c:Py_SET_REFCNT
Unexecuted instantiation: gcmodule.c:Py_SET_REFCNT
Unexecuted instantiation: _asynciomodule.c:Py_SET_REFCNT
Unexecuted instantiation: atexitmodule.c:Py_SET_REFCNT
Unexecuted instantiation: faulthandler.c:Py_SET_REFCNT
Unexecuted instantiation: posixmodule.c:Py_SET_REFCNT
Unexecuted instantiation: signalmodule.c:Py_SET_REFCNT
Unexecuted instantiation: _tracemalloc.c:Py_SET_REFCNT
Unexecuted instantiation: _suggestions.c:Py_SET_REFCNT
Unexecuted instantiation: _datetimemodule.c:Py_SET_REFCNT
Unexecuted instantiation: _codecsmodule.c:Py_SET_REFCNT
Unexecuted instantiation: _collectionsmodule.c:Py_SET_REFCNT
Unexecuted instantiation: errnomodule.c:Py_SET_REFCNT
Unexecuted instantiation: _iomodule.c:Py_SET_REFCNT
Unexecuted instantiation: iobase.c:Py_SET_REFCNT
Unexecuted instantiation: fileio.c:Py_SET_REFCNT
Unexecuted instantiation: bytesio.c:Py_SET_REFCNT
Unexecuted instantiation: bufferedio.c:Py_SET_REFCNT
Unexecuted instantiation: textio.c:Py_SET_REFCNT
Unexecuted instantiation: stringio.c:Py_SET_REFCNT
Unexecuted instantiation: itertoolsmodule.c:Py_SET_REFCNT
Unexecuted instantiation: sre.c:Py_SET_REFCNT
Unexecuted instantiation: _sysconfig.c:Py_SET_REFCNT
Unexecuted instantiation: _threadmodule.c:Py_SET_REFCNT
Unexecuted instantiation: timemodule.c:Py_SET_REFCNT
Unexecuted instantiation: _typesmodule.c:Py_SET_REFCNT
Unexecuted instantiation: _typingmodule.c:Py_SET_REFCNT
Unexecuted instantiation: _weakref.c:Py_SET_REFCNT
Unexecuted instantiation: _abc.c:Py_SET_REFCNT
Unexecuted instantiation: _functoolsmodule.c:Py_SET_REFCNT
Unexecuted instantiation: _localemodule.c:Py_SET_REFCNT
Unexecuted instantiation: _opcode.c:Py_SET_REFCNT
Unexecuted instantiation: _operator.c:Py_SET_REFCNT
Unexecuted instantiation: _stat.c:Py_SET_REFCNT
Unexecuted instantiation: symtablemodule.c:Py_SET_REFCNT
Unexecuted instantiation: pwdmodule.c:Py_SET_REFCNT
Unexecuted instantiation: getpath.c:Py_SET_REFCNT
Unexecuted instantiation: frozen.c:Py_SET_REFCNT
Unexecuted instantiation: getbuildinfo.c:Py_SET_REFCNT
Unexecuted instantiation: peg_api.c:Py_SET_REFCNT
Unexecuted instantiation: file_tokenizer.c:Py_SET_REFCNT
Unexecuted instantiation: helpers.c:Py_SET_REFCNT
Unexecuted instantiation: myreadline.c:Py_SET_REFCNT
Unexecuted instantiation: abstract.c:Py_SET_REFCNT
Unexecuted instantiation: boolobject.c:Py_SET_REFCNT
Unexecuted instantiation: bytes_methods.c:Py_SET_REFCNT
Unexecuted instantiation: bytearrayobject.c:Py_SET_REFCNT
Unexecuted instantiation: capsule.c:Py_SET_REFCNT
Unexecuted instantiation: cellobject.c:Py_SET_REFCNT
Unexecuted instantiation: classobject.c:Py_SET_REFCNT
codeobject.c:Py_SET_REFCNT
Line
Count
Source
151
193k
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
193k
    assert(refcnt >= 0);
153
#if defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030d0000
154
    // Stable ABI implements Py_SET_REFCNT() as a function call
155
    // on limited C API version 3.13 and newer.
156
    _Py_SetRefcnt(ob, refcnt);
157
#else
158
    // This immortal check is for code that is unaware of immortal objects.
159
    // The runtime tracks these objects and we should avoid as much
160
    // as possible having extensions inadvertently change the refcnt
161
    // of an immortalized object.
162
193k
    if (_Py_IsImmortal(ob)) {
163
0
        return;
164
0
    }
165
193k
#ifndef Py_GIL_DISABLED
166
193k
#if SIZEOF_VOID_P > 4
167
193k
    ob->ob_refcnt = (PY_UINT32_T)refcnt;
168
#else
169
    ob->ob_refcnt = refcnt;
170
#endif
171
#else
172
    if (_Py_IsOwnedByCurrentThread(ob)) {
173
        if ((size_t)refcnt > (size_t)UINT32_MAX) {
174
            // On overflow, make the object immortal
175
            ob->ob_tid = _Py_UNOWNED_TID;
176
            ob->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
177
            ob->ob_ref_shared = 0;
178
        }
179
        else {
180
            // Set local refcount to desired refcount and shared refcount
181
            // to zero, but preserve the shared refcount flags.
182
            ob->ob_ref_local = _Py_STATIC_CAST(uint32_t, refcnt);
183
            ob->ob_ref_shared &= _Py_REF_SHARED_FLAG_MASK;
184
        }
185
    }
186
    else {
187
        // Set local refcount to zero and shared refcount to desired refcount.
188
        // Mark the object as merged.
189
        ob->ob_tid = _Py_UNOWNED_TID;
190
        ob->ob_ref_local = 0;
191
        ob->ob_ref_shared = _Py_REF_SHARED(refcnt, _Py_REF_MERGED);
192
    }
193
#endif  // Py_GIL_DISABLED
194
193k
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
193k
}
Unexecuted instantiation: complexobject.c:Py_SET_REFCNT
Unexecuted instantiation: descrobject.c:Py_SET_REFCNT
Unexecuted instantiation: enumobject.c:Py_SET_REFCNT
Unexecuted instantiation: genobject.c:Py_SET_REFCNT
Unexecuted instantiation: fileobject.c:Py_SET_REFCNT
Unexecuted instantiation: frameobject.c:Py_SET_REFCNT
funcobject.c:Py_SET_REFCNT
Line
Count
Source
151
27.6M
static inline void Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
27.6M
    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
27.6M
    if (_Py_IsImmortal(ob)) {
163
0
        return;
164
0
    }
165
27.6M
#ifndef Py_GIL_DISABLED
166
27.6M
#if SIZEOF_VOID_P > 4
167
27.6M
    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
27.6M
#endif  // Py_LIMITED_API+0 < 0x030d0000
195
27.6M
}
Unexecuted instantiation: interpolationobject.c:Py_SET_REFCNT
Unexecuted instantiation: iterobject.c:Py_SET_REFCNT
Unexecuted instantiation: odictobject.c:Py_SET_REFCNT
Unexecuted instantiation: methodobject.c:Py_SET_REFCNT
Unexecuted instantiation: namespaceobject.c:Py_SET_REFCNT
Unexecuted instantiation: _contextvars.c:Py_SET_REFCNT
Unexecuted instantiation: Python-ast.c:Py_SET_REFCNT
Unexecuted instantiation: Python-tokenize.c:Py_SET_REFCNT
Unexecuted instantiation: asdl.c:Py_SET_REFCNT
Unexecuted instantiation: assemble.c:Py_SET_REFCNT
Unexecuted instantiation: ast.c:Py_SET_REFCNT
Unexecuted instantiation: ast_preprocess.c:Py_SET_REFCNT
Unexecuted instantiation: ast_unparse.c:Py_SET_REFCNT
Unexecuted instantiation: critical_section.c:Py_SET_REFCNT
Unexecuted instantiation: crossinterp.c:Py_SET_REFCNT
Unexecuted instantiation: getcopyright.c:Py_SET_REFCNT
Unexecuted instantiation: getplatform.c:Py_SET_REFCNT
Unexecuted instantiation: getversion.c:Py_SET_REFCNT
Unexecuted instantiation: optimizer.c:Py_SET_REFCNT
Unexecuted instantiation: pathconfig.c:Py_SET_REFCNT
Unexecuted instantiation: pegen.c:Py_SET_REFCNT
Unexecuted instantiation: pegen_errors.c:Py_SET_REFCNT
Unexecuted instantiation: parser.c:Py_SET_REFCNT
Unexecuted instantiation: buffer.c:Py_SET_REFCNT
Unexecuted instantiation: lexer.c:Py_SET_REFCNT
Unexecuted instantiation: state.c:Py_SET_REFCNT
Unexecuted instantiation: readline_tokenizer.c:Py_SET_REFCNT
Unexecuted instantiation: string_tokenizer.c:Py_SET_REFCNT
Unexecuted instantiation: utf8_tokenizer.c:Py_SET_REFCNT
Unexecuted instantiation: getcompiler.c:Py_SET_REFCNT
Unexecuted instantiation: mystrtoul.c:Py_SET_REFCNT
Unexecuted instantiation: token.c:Py_SET_REFCNT
Unexecuted instantiation: action_helpers.c:Py_SET_REFCNT
Unexecuted instantiation: string_parser.c:Py_SET_REFCNT
196
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
197
733M
#  define Py_SET_REFCNT(ob, refcnt) Py_SET_REFCNT(_PyObject_CAST(ob), (refcnt))
198
#endif
199
200
201
/*
202
The macros Py_INCREF(op) and Py_DECREF(op) are used to increment or decrement
203
reference counts.  Py_DECREF calls the object's deallocator function when
204
the refcount falls to 0; for
205
objects that don't contain references to other objects or heap memory
206
this can be the standard function free().  Both macros can be used
207
wherever a void expression is allowed.  The argument must not be a
208
NULL pointer.  If it may be NULL, use Py_XINCREF/Py_XDECREF instead.
209
The macro _Py_NewReference(op) initialize reference counts to 1, and
210
in special builds (Py_REF_DEBUG, Py_TRACE_REFS) performs additional
211
bookkeeping appropriate to the special build.
212
213
We assume that the reference count field can never overflow; this can
214
be proven when the size of the field is the same as the pointer size, so
215
we ignore the possibility.  Provided a C int is at least 32 bits (which
216
is implicitly assumed in many parts of this code), that's enough for
217
about 2**31 references to an object.
218
219
XXX The following became out of date in Python 2.2, but I'm not sure
220
XXX what the full truth is now.  Certainly, heap-allocated type objects
221
XXX can and should be deallocated.
222
Type objects should never be deallocated; the type pointer in an object
223
is not considered to be a reference to the type object, to save
224
complications in the deallocation function.  (This is actually a
225
decision that's up to the implementer of each new type so if you want,
226
you can count such references to the type object.)
227
*/
228
229
#if defined(Py_REF_DEBUG) && !defined(Py_LIMITED_API)
230
PyAPI_FUNC(void) _Py_NegativeRefcount(const char *filename, int lineno,
231
                                      PyObject *op);
232
PyAPI_FUNC(void) _Py_INCREF_IncRefTotal(void);
233
PyAPI_FUNC(void) _Py_DECREF_DecRefTotal(void);
234
#endif  // Py_REF_DEBUG && !Py_LIMITED_API
235
236
PyAPI_FUNC(void) _Py_Dealloc(PyObject *);
237
238
239
/*
240
These are provided as conveniences to Python runtime embedders, so that
241
they can have object code that is not dependent on Python compilation flags.
242
*/
243
PyAPI_FUNC(void) Py_IncRef(PyObject *);
244
PyAPI_FUNC(void) Py_DecRef(PyObject *);
245
246
// Similar to Py_IncRef() and Py_DecRef() but the argument must be non-NULL.
247
// Private functions used by Py_INCREF() and Py_DECREF().
248
PyAPI_FUNC(void) _Py_IncRef(PyObject *);
249
PyAPI_FUNC(void) _Py_DecRef(PyObject *);
250
251
static inline Py_ALWAYS_INLINE void Py_INCREF(PyObject *op)
252
19.9G
{
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.9G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
19.9G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
9.67G
        _Py_INCREF_IMMORTAL_STAT_INC();
285
9.67G
        return;
286
9.67G
    }
287
10.3G
    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.3G
    _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.3G
#endif
303
10.3G
}
bytesobject.c:Py_INCREF
Line
Count
Source
252
95.0M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
95.0M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
95.0M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
92.6M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
92.6M
        return;
286
92.6M
    }
287
2.41M
    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.41M
    _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.41M
#endif
303
2.41M
}
call.c:Py_INCREF
Line
Count
Source
252
30.3M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
30.3M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
30.3M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
10.6M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
10.6M
        return;
286
10.6M
    }
287
19.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
19.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
19.6M
#endif
303
19.6M
}
exceptions.c:Py_INCREF
Line
Count
Source
252
180M
{
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
180M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
180M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
48.3M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
48.3M
        return;
286
48.3M
    }
287
131M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
131M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
131M
#endif
303
131M
}
genericaliasobject.c:Py_INCREF
Line
Count
Source
252
1.45k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
1.45k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.45k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.41k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.41k
        return;
286
1.41k
    }
287
36
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
36
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
36
#endif
303
36
}
floatobject.c:Py_INCREF
Line
Count
Source
252
1.26M
{
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.26M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.26M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.26M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.26M
        return;
286
1.26M
    }
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.35G
{
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.35G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.35G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
309M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
309M
        return;
286
309M
    }
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
151M
{
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
151M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
151M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
151M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
151M
        return;
286
151M
    }
287
38.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
38.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
38.1k
#endif
303
38.1k
}
dictobject.c:Py_INCREF
Line
Count
Source
252
2.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
2.03G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
2.03G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
546M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
546M
        return;
286
546M
    }
287
1.48G
    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.48G
    _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.48G
#endif
303
1.48G
}
memoryobject.c:Py_INCREF
Line
Count
Source
252
2.91M
{
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.91M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
2.91M
    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.91M
    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.91M
    _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.91M
#endif
303
2.91M
}
moduleobject.c:Py_INCREF
Line
Count
Source
252
6.76k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
6.76k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
6.76k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
5.86k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
5.86k
        return;
286
5.86k
    }
287
898
    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
898
    _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
898
#endif
303
898
}
object.c:Py_INCREF
Line
Count
Source
252
1.19G
{
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.19G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.19G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
815M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
815M
        return;
286
815M
    }
287
375M
    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
375M
    _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
375M
#endif
303
375M
}
Unexecuted instantiation: obmalloc.c:Py_INCREF
Unexecuted instantiation: picklebufobject.c:Py_INCREF
rangeobject.c:Py_INCREF
Line
Count
Source
252
112
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
112
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
112
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
84
        _Py_INCREF_IMMORTAL_STAT_INC();
285
84
        return;
286
84
    }
287
28
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
28
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
28
#endif
303
28
}
setobject.c:Py_INCREF
Line
Count
Source
252
12.6M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
12.6M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
12.6M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
921k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
921k
        return;
286
921k
    }
287
11.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
11.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
11.6M
#endif
303
11.6M
}
sliceobject.c:Py_INCREF
Line
Count
Source
252
88.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
88.9M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
88.9M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
88.9M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
88.9M
        return;
286
88.9M
    }
287
1.46k
    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.46k
    _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.46k
#endif
303
1.46k
}
Unexecuted instantiation: structseq.c:Py_INCREF
templateobject.c:Py_INCREF
Line
Count
Source
252
4
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
4
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
4
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
2
        _Py_INCREF_IMMORTAL_STAT_INC();
285
2
        return;
286
2
    }
287
2
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
2
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
2
#endif
303
2
}
tupleobject.c:Py_INCREF
Line
Count
Source
252
8.99G
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
8.99G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
8.99G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
4.49G
        _Py_INCREF_IMMORTAL_STAT_INC();
285
4.49G
        return;
286
4.49G
    }
287
4.49G
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
4.49G
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
4.49G
#endif
303
4.49G
}
typeobject.c:Py_INCREF
Line
Count
Source
252
435M
{
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
435M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
435M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
179M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
179M
        return;
286
179M
    }
287
255M
    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
255M
    _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
255M
#endif
303
255M
}
typevarobject.c:Py_INCREF
Line
Count
Source
252
240
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
240
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
240
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
148
        _Py_INCREF_IMMORTAL_STAT_INC();
285
148
        return;
286
148
    }
287
92
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
92
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
92
#endif
303
92
}
unicode_format.c:Py_INCREF
Line
Count
Source
252
57.1M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
57.1M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
57.1M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
22.1M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
22.1M
        return;
286
22.1M
    }
287
35.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
35.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
35.0M
#endif
303
35.0M
}
Unexecuted instantiation: unicode_formatter.c:Py_INCREF
unicode_writer.c:Py_INCREF
Line
Count
Source
252
9.16k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
9.16k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
9.16k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
0
        _Py_INCREF_IMMORTAL_STAT_INC();
285
0
        return;
286
0
    }
287
9.16k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
9.16k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
9.16k
#endif
303
9.16k
}
Unexecuted instantiation: unicodectype.c:Py_INCREF
unicodeobject.c:Py_INCREF
Line
Count
Source
252
847M
{
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
847M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
847M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
742M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
742M
        return;
286
742M
    }
287
105M
    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
105M
    _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
105M
#endif
303
105M
}
Unexecuted instantiation: unionobject.c:Py_INCREF
weakrefobject.c:Py_INCREF
Line
Count
Source
252
381k
{
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
381k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
381k
    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
379k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
379k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
379k
#endif
303
379k
}
_warnings.c:Py_INCREF
Line
Count
Source
252
5.18M
{
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
5.18M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
5.18M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
2.68M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
2.68M
        return;
286
2.68M
    }
287
2.50M
    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.50M
    _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.50M
#endif
303
2.50M
}
bltinmodule.c:Py_INCREF
Line
Count
Source
252
93.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
93.6M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
93.6M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
44.3M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
44.3M
        return;
286
44.3M
    }
287
49.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
49.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
49.3M
#endif
303
49.3M
}
ceval.c:Py_INCREF
Line
Count
Source
252
1.87G
{
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.87G
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.87G
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.05G
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.05G
        return;
286
1.05G
    }
287
826M
    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
826M
    _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
826M
#endif
303
826M
}
codecs.c:Py_INCREF
Line
Count
Source
252
4.76M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
4.76M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
4.76M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
340k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
340k
        return;
286
340k
    }
287
4.42M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
4.42M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
4.42M
#endif
303
4.42M
}
codegen.c:Py_INCREF
Line
Count
Source
252
3.50k
{
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.50k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
3.50k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
3.50k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
3.50k
        return;
286
3.50k
    }
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
134k
{
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
134k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
134k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
58.0k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
58.0k
        return;
286
58.0k
    }
287
76.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
76.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
76.0k
#endif
303
76.0k
}
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
92.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
92.4M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
92.4M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
39.4M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
39.4M
        return;
286
39.4M
    }
287
52.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
52.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
52.9M
#endif
303
52.9M
}
flowgraph.c:Py_INCREF
Line
Count
Source
252
114k
{
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
114k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
114k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
56.0k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
56.0k
        return;
286
56.0k
    }
287
58.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
58.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
58.7k
#endif
303
58.7k
}
frame.c:Py_INCREF
Line
Count
Source
252
51.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
51.8M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
51.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
51.8M
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
51.8M
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
51.8M
#endif
303
51.8M
}
Unexecuted instantiation: future.c:Py_INCREF
gc.c:Py_INCREF
Line
Count
Source
252
470M
{
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
470M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
470M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
407M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
407M
        return;
286
407M
    }
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: gc_gil.c:Py_INCREF
getargs.c:Py_INCREF
Line
Count
Source
252
2.90M
{
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.90M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
2.90M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
2.23M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
2.23M
        return;
286
2.23M
    }
287
673k
    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
673k
    _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
673k
#endif
303
673k
}
Unexecuted instantiation: ceval_gil.c:Py_INCREF
Unexecuted instantiation: hamt.c:Py_INCREF
Unexecuted instantiation: hashtable.c:Py_INCREF
import.c:Py_INCREF
Line
Count
Source
252
9.99M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
9.99M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
9.99M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
2.88M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
2.88M
        return;
286
2.88M
    }
287
7.11M
    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
7.11M
    _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
7.11M
#endif
303
7.11M
}
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
28.0k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
28.0k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
28.0k
    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.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
28.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
28.0k
#endif
303
28.0k
}
Unexecuted instantiation: legacy_tracing.c:Py_INCREF
Unexecuted instantiation: lock.c:Py_INCREF
marshal.c:Py_INCREF
Line
Count
Source
252
1.46M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
1.46M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.46M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.34M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.34M
        return;
286
1.34M
    }
287
127k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
127k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
127k
#endif
303
127k
}
modsupport.c:Py_INCREF
Line
Count
Source
252
3.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
3.10M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
3.10M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
868k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
868k
        return;
286
868k
    }
287
2.23M
    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.23M
    _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.23M
#endif
303
2.23M
}
Unexecuted instantiation: mysnprintf.c:Py_INCREF
Unexecuted instantiation: parking_lot.c:Py_INCREF
Unexecuted instantiation: preconfig.c:Py_INCREF
Unexecuted instantiation: pyarena.c:Py_INCREF
Unexecuted instantiation: pyctype.c:Py_INCREF
Unexecuted instantiation: pyhash.c:Py_INCREF
pylifecycle.c:Py_INCREF
Line
Count
Source
252
28
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
28
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
28
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
0
        _Py_INCREF_IMMORTAL_STAT_INC();
285
0
        return;
286
0
    }
287
28
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
28
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
28
#endif
303
28
}
Unexecuted instantiation: pymath.c:Py_INCREF
pystate.c:Py_INCREF
Line
Count
Source
252
1.20M
{
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.20M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.20M
    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.20M
    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.20M
    _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.20M
#endif
303
1.20M
}
Unexecuted instantiation: pythonrun.c:Py_INCREF
Unexecuted instantiation: pytime.c:Py_INCREF
Unexecuted instantiation: qsbr.c:Py_INCREF
Unexecuted instantiation: bootstrap_hash.c:Py_INCREF
Unexecuted instantiation: specialize.c:Py_INCREF
structmember.c:Py_INCREF
Line
Count
Source
252
1.98M
{
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.98M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.98M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
969k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
969k
        return;
286
969k
    }
287
1.01M
    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.01M
    _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.01M
#endif
303
1.01M
}
symtable.c:Py_INCREF
Line
Count
Source
252
341k
{
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
341k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
341k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
340k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
340k
        return;
286
340k
    }
287
824
    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
824
    _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
824
#endif
303
824
}
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
80.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
80.9M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
80.9M
    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
80.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
80.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
80.9M
#endif
303
80.9M
}
Unexecuted instantiation: tracemalloc.c:Py_INCREF
Unexecuted instantiation: getopt.c:Py_INCREF
Unexecuted instantiation: pystrcmp.c:Py_INCREF
Unexecuted instantiation: pystrtod.c:Py_INCREF
Unexecuted instantiation: pystrhex.c:Py_INCREF
Unexecuted instantiation: dtoa.c:Py_INCREF
Unexecuted instantiation: fileutils.c:Py_INCREF
Unexecuted instantiation: suggestions.c:Py_INCREF
Unexecuted instantiation: perf_trampoline.c:Py_INCREF
Unexecuted instantiation: perf_jit_trampoline.c:Py_INCREF
Unexecuted instantiation: remote_debugging.c:Py_INCREF
Unexecuted instantiation: dynload_shlib.c:Py_INCREF
Unexecuted instantiation: config.c:Py_INCREF
Unexecuted instantiation: gcmodule.c:Py_INCREF
Unexecuted instantiation: _asynciomodule.c:Py_INCREF
atexitmodule.c:Py_INCREF
Line
Count
Source
252
2
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
2
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
2
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
0
        _Py_INCREF_IMMORTAL_STAT_INC();
285
0
        return;
286
0
    }
287
2
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
2
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
2
#endif
303
2
}
Unexecuted instantiation: faulthandler.c:Py_INCREF
posixmodule.c:Py_INCREF
Line
Count
Source
252
3.64M
{
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.64M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
3.64M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
709k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
709k
        return;
286
709k
    }
287
2.93M
    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.93M
    _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.93M
#endif
303
2.93M
}
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
298
{
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
298
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
298
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
233
        _Py_INCREF_IMMORTAL_STAT_INC();
285
233
        return;
286
233
    }
287
65
    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
65
    _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
65
#endif
303
65
}
Unexecuted instantiation: _codecsmodule.c:Py_INCREF
_collectionsmodule.c:Py_INCREF
Line
Count
Source
252
25.0M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
25.0M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
25.0M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
22.2M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
22.2M
        return;
286
22.2M
    }
287
2.85M
    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.85M
    _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.85M
#endif
303
2.85M
}
Unexecuted instantiation: errnomodule.c:Py_INCREF
_iomodule.c:Py_INCREF
Line
Count
Source
252
353
{
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
353
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
353
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
353
        _Py_INCREF_IMMORTAL_STAT_INC();
285
353
        return;
286
353
    }
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
116k
{
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
116k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
116k
    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
116k
    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
116k
    _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
116k
#endif
303
116k
}
Unexecuted instantiation: fileio.c:Py_INCREF
bytesio.c:Py_INCREF
Line
Count
Source
252
59.5k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
59.5k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
59.5k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
452
        _Py_INCREF_IMMORTAL_STAT_INC();
285
452
        return;
286
452
    }
287
59.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
59.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
59.0k
#endif
303
59.0k
}
bufferedio.c:Py_INCREF
Line
Count
Source
252
50.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
50.1k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
50.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
50.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
50.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
50.1k
#endif
303
50.1k
}
textio.c:Py_INCREF
Line
Count
Source
252
584k
{
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
584k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
584k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
20.6k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
20.6k
        return;
286
20.6k
    }
287
563k
    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
563k
    _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
563k
#endif
303
563k
}
stringio.c:Py_INCREF
Line
Count
Source
252
22.5k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
22.5k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
22.5k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
100
        _Py_INCREF_IMMORTAL_STAT_INC();
285
100
        return;
286
100
    }
287
22.4k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
22.4k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
22.4k
#endif
303
22.4k
}
itertoolsmodule.c:Py_INCREF
Line
Count
Source
252
44.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
44.4k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
44.4k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
43.6k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
43.6k
        return;
286
43.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
236M
{
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
236M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
236M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
72.2M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
72.2M
        return;
286
72.2M
    }
287
164M
    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
164M
    _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
164M
#endif
303
164M
}
Unexecuted instantiation: _sysconfig.c:Py_INCREF
_threadmodule.c:Py_INCREF
Line
Count
Source
252
4
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
4
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
4
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
2
        _Py_INCREF_IMMORTAL_STAT_INC();
285
2
        return;
286
2
    }
287
2
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
2
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
2
#endif
303
2
}
Unexecuted instantiation: timemodule.c:Py_INCREF
Unexecuted instantiation: _typesmodule.c:Py_INCREF
Unexecuted instantiation: _typingmodule.c:Py_INCREF
Unexecuted instantiation: _weakref.c:Py_INCREF
_abc.c:Py_INCREF
Line
Count
Source
252
30.1k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
30.1k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
30.1k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
29.9k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
29.9k
        return;
286
29.9k
    }
287
214
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
214
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
214
#endif
303
214
}
_functoolsmodule.c:Py_INCREF
Line
Count
Source
252
380k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
380k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
380k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
295
        _Py_INCREF_IMMORTAL_STAT_INC();
285
295
        return;
286
295
    }
287
379k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
379k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
379k
#endif
303
379k
}
Unexecuted instantiation: _localemodule.c:Py_INCREF
Unexecuted instantiation: _opcode.c:Py_INCREF
_operator.c:Py_INCREF
Line
Count
Source
252
1.37M
{
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.37M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.37M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
1.33M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
1.33M
        return;
286
1.33M
    }
287
38.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
38.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
38.8k
#endif
303
38.8k
}
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
806M
{
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
806M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
806M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
419M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
419M
        return;
286
419M
    }
287
386M
    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
386M
    _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
386M
#endif
303
386M
}
Unexecuted instantiation: boolobject.c:Py_INCREF
Unexecuted instantiation: bytes_methods.c:Py_INCREF
bytearrayobject.c:Py_INCREF
Line
Count
Source
252
378k
{
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
378k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
378k
    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
378k
    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
378k
    _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
378k
#endif
303
378k
}
Unexecuted instantiation: capsule.c:Py_INCREF
cellobject.c:Py_INCREF
Line
Count
Source
252
156k
{
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
156k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
156k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
57.4k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
57.4k
        return;
286
57.4k
    }
287
98.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
98.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
98.5k
#endif
303
98.5k
}
classobject.c:Py_INCREF
Line
Count
Source
252
97.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
97.5M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
97.5M
    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
97.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
97.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
97.5M
#endif
303
97.5M
}
codeobject.c:Py_INCREF
Line
Count
Source
252
1.51M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
1.51M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
1.51M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
729k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
729k
        return;
286
729k
    }
287
784k
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
784k
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
784k
#endif
303
784k
}
complexobject.c:Py_INCREF
Line
Count
Source
252
3.00k
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
3.00k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
3.00k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
3.00k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
3.00k
        return;
286
3.00k
    }
287
0
    op->ob_refcnt = cur_refcnt + 1;
288
#else
289
    if (_Py_IsImmortal(op)) {
290
        _Py_INCREF_IMMORTAL_STAT_INC();
291
        return;
292
    }
293
    op->ob_refcnt++;
294
#endif
295
0
    _Py_INCREF_STAT_INC();
296
#ifdef Py_REF_DEBUG
297
    // Don't count the incref if the object is immortal.
298
    if (!_Py_IsImmortal(op)) {
299
        _Py_INCREF_IncRefTotal();
300
    }
301
#endif
302
0
#endif
303
0
}
descrobject.c:Py_INCREF
Line
Count
Source
252
23.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
23.9M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
23.9M
    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.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
23.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
23.9M
#endif
303
23.9M
}
enumobject.c:Py_INCREF
Line
Count
Source
252
96.0M
{
253
#if defined(Py_LIMITED_API) && (Py_LIMITED_API+0 >= 0x030c0000 || defined(Py_REF_DEBUG))
254
    // Stable ABI implements Py_INCREF() as a function call on limited C API
255
    // version 3.12 and newer, and on Python built in debug mode. _Py_IncRef()
256
    // was added to Python 3.10.0a7, use Py_IncRef() on older Python versions.
257
    // Py_IncRef() accepts NULL whereas _Py_IncRef() doesn't.
258
#  if Py_LIMITED_API+0 >= 0x030a00A7
259
    _Py_IncRef(op);
260
#  else
261
    Py_IncRef(op);
262
#  endif
263
#else
264
    // Non-limited C API and limited C API for Python 3.9 and older access
265
    // directly PyObject.ob_refcnt.
266
#if defined(Py_GIL_DISABLED)
267
    uint32_t local = _Py_atomic_load_uint32_relaxed(&op->ob_ref_local);
268
    uint32_t new_local = local + 1;
269
    if (new_local == 0) {
270
        _Py_INCREF_IMMORTAL_STAT_INC();
271
        // local is equal to _Py_IMMORTAL_REFCNT_LOCAL: do nothing
272
        return;
273
    }
274
    if (_Py_IsOwnedByCurrentThread(op)) {
275
        _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, new_local);
276
    }
277
    else {
278
        _Py_atomic_add_ssize(&op->ob_ref_shared, (1 << _Py_REF_SHARED_SHIFT));
279
    }
280
#elif SIZEOF_VOID_P > 4
281
96.0M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
96.0M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
0
        _Py_INCREF_IMMORTAL_STAT_INC();
285
0
        return;
286
0
    }
287
96.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
96.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
96.0M
#endif
303
96.0M
}
genobject.c:Py_INCREF
Line
Count
Source
252
45.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
45.7M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
45.7M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
45.6M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
45.6M
        return;
286
45.6M
    }
287
71.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
71.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
71.0k
#endif
303
71.0k
}
Unexecuted instantiation: fileobject.c:Py_INCREF
frameobject.c:Py_INCREF
Line
Count
Source
252
38.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
38.2M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
38.2M
    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.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
38.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
38.2M
#endif
303
38.2M
}
funcobject.c:Py_INCREF
Line
Count
Source
252
90.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
90.5M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
90.5M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
41.5M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
41.5M
        return;
286
41.5M
    }
287
48.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
48.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
48.9M
#endif
303
48.9M
}
Unexecuted instantiation: interpolationobject.c:Py_INCREF
iterobject.c:Py_INCREF
Line
Count
Source
252
2.85M
{
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.85M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
2.85M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
378k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
378k
        return;
286
378k
    }
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
}
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
337M
{
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
337M
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
337M
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
7.69M
        _Py_INCREF_IMMORTAL_STAT_INC();
285
7.69M
        return;
286
7.69M
    }
287
329M
    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
329M
    _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
329M
#endif
303
329M
}
Unexecuted instantiation: namespaceobject.c:Py_INCREF
Unexecuted instantiation: _contextvars.c:Py_INCREF
Python-ast.c:Py_INCREF
Line
Count
Source
252
388k
{
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
388k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
388k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
205k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
205k
        return;
286
205k
    }
287
183k
    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
183k
    _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
183k
#endif
303
183k
}
Unexecuted instantiation: Python-tokenize.c:Py_INCREF
Unexecuted instantiation: asdl.c:Py_INCREF
assemble.c:Py_INCREF
Line
Count
Source
252
56.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
56.2k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
56.2k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
56.1k
        _Py_INCREF_IMMORTAL_STAT_INC();
285
56.1k
        return;
286
56.1k
    }
287
174
    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
174
    _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
174
#endif
303
174
}
Unexecuted instantiation: ast.c:Py_INCREF
Unexecuted instantiation: ast_preprocess.c:Py_INCREF
Unexecuted instantiation: ast_unparse.c:Py_INCREF
Unexecuted instantiation: critical_section.c:Py_INCREF
Unexecuted instantiation: crossinterp.c:Py_INCREF
Unexecuted instantiation: getcopyright.c:Py_INCREF
Unexecuted instantiation: getplatform.c:Py_INCREF
Unexecuted instantiation: getversion.c:Py_INCREF
Unexecuted instantiation: optimizer.c:Py_INCREF
Unexecuted instantiation: pathconfig.c:Py_INCREF
pegen.c:Py_INCREF
Line
Count
Source
252
18.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
18.9k
    PY_UINT32_T cur_refcnt = op->ob_refcnt;
282
18.9k
    if (cur_refcnt >= _Py_IMMORTAL_INITIAL_REFCNT) {
283
        // the object is immortal
284
361
        _Py_INCREF_IMMORTAL_STAT_INC();
285
361
        return;
286
361
    }
287
18.6k
    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.6k
    _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.6k
#endif
303
18.6k
}
Unexecuted instantiation: pegen_errors.c:Py_INCREF
Unexecuted instantiation: parser.c:Py_INCREF
Unexecuted instantiation: buffer.c:Py_INCREF
Unexecuted instantiation: lexer.c:Py_INCREF
Unexecuted instantiation: state.c:Py_INCREF
Unexecuted instantiation: readline_tokenizer.c:Py_INCREF
Unexecuted instantiation: string_tokenizer.c:Py_INCREF
Unexecuted instantiation: utf8_tokenizer.c:Py_INCREF
Unexecuted instantiation: getcompiler.c:Py_INCREF
Unexecuted instantiation: mystrtoul.c:Py_INCREF
Unexecuted instantiation: token.c:Py_INCREF
Unexecuted instantiation: action_helpers.c:Py_INCREF
Unexecuted instantiation: string_parser.c:Py_INCREF
304
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
305
19.9G
#  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
20.1G
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
20.1G
    if (_Py_IsImmortal(op)) {
415
10.2G
        _Py_DECREF_IMMORTAL_STAT_INC();
416
10.2G
        return;
417
10.2G
    }
418
9.88G
    _Py_DECREF_STAT_INC();
419
9.88G
    if (--op->ob_refcnt == 0) {
420
1.49G
        _Py_Dealloc(op);
421
1.49G
    }
422
9.88G
}
bytesobject.c:Py_DECREF
Line
Count
Source
411
5.13M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
5.13M
    if (_Py_IsImmortal(op)) {
415
4.86M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
4.86M
        return;
417
4.86M
    }
418
264k
    _Py_DECREF_STAT_INC();
419
264k
    if (--op->ob_refcnt == 0) {
420
187k
        _Py_Dealloc(op);
421
187k
    }
422
264k
}
call.c:Py_DECREF
Line
Count
Source
411
216M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
216M
    if (_Py_IsImmortal(op)) {
415
82.9M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
82.9M
        return;
417
82.9M
    }
418
133M
    _Py_DECREF_STAT_INC();
419
133M
    if (--op->ob_refcnt == 0) {
420
94.6M
        _Py_Dealloc(op);
421
94.6M
    }
422
133M
}
exceptions.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
50.2M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
50.2M
        return;
417
50.2M
    }
418
152M
    _Py_DECREF_STAT_INC();
419
152M
    if (--op->ob_refcnt == 0) {
420
101M
        _Py_Dealloc(op);
421
101M
    }
422
152M
}
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
161k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
161k
    if (_Py_IsImmortal(op)) {
415
5
        _Py_DECREF_IMMORTAL_STAT_INC();
416
5
        return;
417
5
    }
418
161k
    _Py_DECREF_STAT_INC();
419
161k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
161k
}
listobject.c:Py_DECREF
Line
Count
Source
411
1.73G
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.73G
    if (_Py_IsImmortal(op)) {
415
489M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
489M
        return;
417
489M
    }
418
1.24G
    _Py_DECREF_STAT_INC();
419
1.24G
    if (--op->ob_refcnt == 0) {
420
316M
        _Py_Dealloc(op);
421
316M
    }
422
1.24G
}
longobject.c:Py_DECREF
Line
Count
Source
411
20.7M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
20.7M
    if (_Py_IsImmortal(op)) {
415
7.29M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
7.29M
        return;
417
7.29M
    }
418
13.4M
    _Py_DECREF_STAT_INC();
419
13.4M
    if (--op->ob_refcnt == 0) {
420
3.75M
        _Py_Dealloc(op);
421
3.75M
    }
422
13.4M
}
dictobject.c:Py_DECREF
Line
Count
Source
411
1.35G
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.35G
    if (_Py_IsImmortal(op)) {
415
630M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
630M
        return;
417
630M
    }
418
726M
    _Py_DECREF_STAT_INC();
419
726M
    if (--op->ob_refcnt == 0) {
420
127M
        _Py_Dealloc(op);
421
127M
    }
422
726M
}
memoryobject.c:Py_DECREF
Line
Count
Source
411
3.10M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
3.10M
    if (_Py_IsImmortal(op)) {
415
122k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
122k
        return;
417
122k
    }
418
2.98M
    _Py_DECREF_STAT_INC();
419
2.98M
    if (--op->ob_refcnt == 0) {
420
1.40M
        _Py_Dealloc(op);
421
1.40M
    }
422
2.98M
}
moduleobject.c:Py_DECREF
Line
Count
Source
411
3.46M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
3.46M
    if (_Py_IsImmortal(op)) {
415
3.41M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
3.41M
        return;
417
3.41M
    }
418
45.8k
    _Py_DECREF_STAT_INC();
419
45.8k
    if (--op->ob_refcnt == 0) {
420
4.44k
        _Py_Dealloc(op);
421
4.44k
    }
422
45.8k
}
object.c:Py_DECREF
Line
Count
Source
411
1.03G
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.03G
    if (_Py_IsImmortal(op)) {
415
778M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
778M
        return;
417
778M
    }
418
252M
    _Py_DECREF_STAT_INC();
419
252M
    if (--op->ob_refcnt == 0) {
420
12.2k
        _Py_Dealloc(op);
421
12.2k
    }
422
252M
}
Unexecuted instantiation: obmalloc.c:Py_DECREF
Unexecuted instantiation: picklebufobject.c:Py_DECREF
rangeobject.c:Py_DECREF
Line
Count
Source
411
64.4M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
64.4M
    if (_Py_IsImmortal(op)) {
415
62.5M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
62.5M
        return;
417
62.5M
    }
418
1.83M
    _Py_DECREF_STAT_INC();
419
1.83M
    if (--op->ob_refcnt == 0) {
420
803k
        _Py_Dealloc(op);
421
803k
    }
422
1.83M
}
setobject.c:Py_DECREF
Line
Count
Source
411
18.4M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
18.4M
    if (_Py_IsImmortal(op)) {
415
6.93M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
6.93M
        return;
417
6.93M
    }
418
11.5M
    _Py_DECREF_STAT_INC();
419
11.5M
    if (--op->ob_refcnt == 0) {
420
1.56M
        _Py_Dealloc(op);
421
1.56M
    }
422
11.5M
}
sliceobject.c:Py_DECREF
Line
Count
Source
411
245M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
245M
    if (_Py_IsImmortal(op)) {
415
164M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
164M
        return;
417
164M
    }
418
80.8M
    _Py_DECREF_STAT_INC();
419
80.8M
    if (--op->ob_refcnt == 0) {
420
27.0M
        _Py_Dealloc(op);
421
27.0M
    }
422
80.8M
}
structseq.c:Py_DECREF
Line
Count
Source
411
9.22M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
9.22M
    if (_Py_IsImmortal(op)) {
415
2.73M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.73M
        return;
417
2.73M
    }
418
6.48M
    _Py_DECREF_STAT_INC();
419
6.48M
    if (--op->ob_refcnt == 0) {
420
5.99M
        _Py_Dealloc(op);
421
5.99M
    }
422
6.48M
}
templateobject.c:Py_DECREF
Line
Count
Source
411
4
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
4
    if (_Py_IsImmortal(op)) {
415
2
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2
        return;
417
2
    }
418
2
    _Py_DECREF_STAT_INC();
419
2
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
2
}
tupleobject.c:Py_DECREF
Line
Count
Source
411
9.31G
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
9.31G
    if (_Py_IsImmortal(op)) {
415
4.56G
        _Py_DECREF_IMMORTAL_STAT_INC();
416
4.56G
        return;
417
4.56G
    }
418
4.74G
    _Py_DECREF_STAT_INC();
419
4.74G
    if (--op->ob_refcnt == 0) {
420
121M
        _Py_Dealloc(op);
421
121M
    }
422
4.74G
}
typeobject.c:Py_DECREF
Line
Count
Source
411
578M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
578M
    if (_Py_IsImmortal(op)) {
415
116M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
116M
        return;
417
116M
    }
418
461M
    _Py_DECREF_STAT_INC();
419
461M
    if (--op->ob_refcnt == 0) {
420
47.0M
        _Py_Dealloc(op);
421
47.0M
    }
422
461M
}
typevarobject.c:Py_DECREF
Line
Count
Source
411
300
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
300
    if (_Py_IsImmortal(op)) {
415
72
        _Py_DECREF_IMMORTAL_STAT_INC();
416
72
        return;
417
72
    }
418
228
    _Py_DECREF_STAT_INC();
419
228
    if (--op->ob_refcnt == 0) {
420
64
        _Py_Dealloc(op);
421
64
    }
422
228
}
unicode_format.c:Py_DECREF
Line
Count
Source
411
79.4M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
79.4M
    if (_Py_IsImmortal(op)) {
415
22.1M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
22.1M
        return;
417
22.1M
    }
418
57.2M
    _Py_DECREF_STAT_INC();
419
57.2M
    if (--op->ob_refcnt == 0) {
420
16.5M
        _Py_Dealloc(op);
421
16.5M
    }
422
57.2M
}
unicode_formatter.c:Py_DECREF
Line
Count
Source
411
256
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
256
    if (_Py_IsImmortal(op)) {
415
192
        _Py_DECREF_IMMORTAL_STAT_INC();
416
192
        return;
417
192
    }
418
64
    _Py_DECREF_STAT_INC();
419
64
    if (--op->ob_refcnt == 0) {
420
64
        _Py_Dealloc(op);
421
64
    }
422
64
}
unicode_writer.c:Py_DECREF
Line
Count
Source
411
17.8M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
17.8M
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
17.8M
    _Py_DECREF_STAT_INC();
419
17.8M
    if (--op->ob_refcnt == 0) {
420
17.8M
        _Py_Dealloc(op);
421
17.8M
    }
422
17.8M
}
Unexecuted instantiation: unicodectype.c:Py_DECREF
unicodeobject.c:Py_DECREF
Line
Count
Source
411
209M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
209M
    if (_Py_IsImmortal(op)) {
415
124M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
124M
        return;
417
124M
    }
418
85.1M
    _Py_DECREF_STAT_INC();
419
85.1M
    if (--op->ob_refcnt == 0) {
420
14.0M
        _Py_Dealloc(op);
421
14.0M
    }
422
85.1M
}
unionobject.c:Py_DECREF
Line
Count
Source
411
1.57k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.57k
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
1.57k
    _Py_DECREF_STAT_INC();
419
1.57k
    if (--op->ob_refcnt == 0) {
420
1.57k
        _Py_Dealloc(op);
421
1.57k
    }
422
1.57k
}
weakrefobject.c:Py_DECREF
Line
Count
Source
411
81.7k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
81.7k
    if (_Py_IsImmortal(op)) {
415
27.5k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
27.5k
        return;
417
27.5k
    }
418
54.2k
    _Py_DECREF_STAT_INC();
419
54.2k
    if (--op->ob_refcnt == 0) {
420
25.9k
        _Py_Dealloc(op);
421
25.9k
    }
422
54.2k
}
_warnings.c:Py_DECREF
Line
Count
Source
411
55.4M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
55.4M
    if (_Py_IsImmortal(op)) {
415
6.31M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
6.31M
        return;
417
6.31M
    }
418
49.1M
    _Py_DECREF_STAT_INC();
419
49.1M
    if (--op->ob_refcnt == 0) {
420
2.44M
        _Py_Dealloc(op);
421
2.44M
    }
422
49.1M
}
bltinmodule.c:Py_DECREF
Line
Count
Source
411
2.35G
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2.35G
    if (_Py_IsImmortal(op)) {
415
2.17G
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.17G
        return;
417
2.17G
    }
418
178M
    _Py_DECREF_STAT_INC();
419
178M
    if (--op->ob_refcnt == 0) {
420
119M
        _Py_Dealloc(op);
421
119M
    }
422
178M
}
ceval.c:Py_DECREF
Line
Count
Source
411
5.34k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
5.34k
    if (_Py_IsImmortal(op)) {
415
545
        _Py_DECREF_IMMORTAL_STAT_INC();
416
545
        return;
417
545
    }
418
4.80k
    _Py_DECREF_STAT_INC();
419
4.80k
    if (--op->ob_refcnt == 0) {
420
804
        _Py_Dealloc(op);
421
804
    }
422
4.80k
}
codecs.c:Py_DECREF
Line
Count
Source
411
10.2M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
10.2M
    if (_Py_IsImmortal(op)) {
415
3.65M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
3.65M
        return;
417
3.65M
    }
418
6.60M
    _Py_DECREF_STAT_INC();
419
6.60M
    if (--op->ob_refcnt == 0) {
420
3.16M
        _Py_Dealloc(op);
421
3.16M
    }
422
6.60M
}
codegen.c:Py_DECREF
Line
Count
Source
411
190k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
190k
    if (_Py_IsImmortal(op)) {
415
170k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
170k
        return;
417
170k
    }
418
20.3k
    _Py_DECREF_STAT_INC();
419
20.3k
    if (--op->ob_refcnt == 0) {
420
1.43k
        _Py_Dealloc(op);
421
1.43k
    }
422
20.3k
}
compile.c:Py_DECREF
Line
Count
Source
411
733k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
733k
    if (_Py_IsImmortal(op)) {
415
390k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
390k
        return;
417
390k
    }
418
343k
    _Py_DECREF_STAT_INC();
419
343k
    if (--op->ob_refcnt == 0) {
420
116k
        _Py_Dealloc(op);
421
116k
    }
422
343k
}
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
97.0M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
97.0M
    if (_Py_IsImmortal(op)) {
415
39.4M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
39.4M
        return;
417
39.4M
    }
418
57.5M
    _Py_DECREF_STAT_INC();
419
57.5M
    if (--op->ob_refcnt == 0) {
420
19.4M
        _Py_Dealloc(op);
421
19.4M
    }
422
57.5M
}
flowgraph.c:Py_DECREF
Line
Count
Source
411
86.1k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
86.1k
    if (_Py_IsImmortal(op)) {
415
48.1k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
48.1k
        return;
417
48.1k
    }
418
38.0k
    _Py_DECREF_STAT_INC();
419
38.0k
    if (--op->ob_refcnt == 0) {
420
70
        _Py_Dealloc(op);
421
70
    }
422
38.0k
}
frame.c:Py_DECREF
Line
Count
Source
411
54.9M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
54.9M
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
54.9M
    _Py_DECREF_STAT_INC();
419
54.9M
    if (--op->ob_refcnt == 0) {
420
17.9M
        _Py_Dealloc(op);
421
17.9M
    }
422
54.9M
}
Unexecuted instantiation: future.c:Py_DECREF
gc.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
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
754k
    _Py_DECREF_STAT_INC();
419
754k
    if (--op->ob_refcnt == 0) {
420
500k
        _Py_Dealloc(op);
421
500k
    }
422
754k
}
Unexecuted instantiation: gc_gil.c:Py_DECREF
getargs.c:Py_DECREF
Line
Count
Source
411
8.78M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
8.78M
    if (_Py_IsImmortal(op)) {
415
8.02M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
8.02M
        return;
417
8.02M
    }
418
762k
    _Py_DECREF_STAT_INC();
419
762k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
762k
}
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
14.7M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
14.7M
    if (_Py_IsImmortal(op)) {
415
2.88M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.88M
        return;
417
2.88M
    }
418
11.9M
    _Py_DECREF_STAT_INC();
419
11.9M
    if (--op->ob_refcnt == 0) {
420
272k
        _Py_Dealloc(op);
421
272k
    }
422
11.9M
}
importdl.c:Py_DECREF
Line
Count
Source
411
2.11k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2.11k
    if (_Py_IsImmortal(op)) {
415
843
        _Py_DECREF_IMMORTAL_STAT_INC();
416
843
        return;
417
843
    }
418
1.26k
    _Py_DECREF_STAT_INC();
419
1.26k
    if (--op->ob_refcnt == 0) {
420
808
        _Py_Dealloc(op);
421
808
    }
422
1.26k
}
initconfig.c:Py_DECREF
Line
Count
Source
411
3.86k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
3.86k
    if (_Py_IsImmortal(op)) {
415
3.10k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
3.10k
        return;
417
3.10k
    }
418
756
    _Py_DECREF_STAT_INC();
419
756
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
756
}
instrumentation.c:Py_DECREF
Line
Count
Source
411
672
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
672
    if (_Py_IsImmortal(op)) {
415
420
        _Py_DECREF_IMMORTAL_STAT_INC();
416
420
        return;
417
420
    }
418
252
    _Py_DECREF_STAT_INC();
419
252
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
252
}
instruction_sequence.c:Py_DECREF
Line
Count
Source
411
1
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
1
    _Py_DECREF_STAT_INC();
419
1
    if (--op->ob_refcnt == 0) {
420
1
        _Py_Dealloc(op);
421
1
    }
422
1
}
intrinsics.c:Py_DECREF
Line
Count
Source
411
52.0k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
52.0k
    if (_Py_IsImmortal(op)) {
415
29.3k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
29.3k
        return;
417
29.3k
    }
418
22.7k
    _Py_DECREF_STAT_INC();
419
22.7k
    if (--op->ob_refcnt == 0) {
420
232
        _Py_Dealloc(op);
421
232
    }
422
22.7k
}
Unexecuted instantiation: legacy_tracing.c:Py_DECREF
Unexecuted instantiation: lock.c:Py_DECREF
marshal.c:Py_DECREF
Line
Count
Source
411
1.40M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.40M
    if (_Py_IsImmortal(op)) {
415
583k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
583k
        return;
417
583k
    }
418
820k
    _Py_DECREF_STAT_INC();
419
820k
    if (--op->ob_refcnt == 0) {
420
7.40k
        _Py_Dealloc(op);
421
7.40k
    }
422
820k
}
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.36M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
4.36M
    if (_Py_IsImmortal(op)) {
415
3.66M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
3.66M
        return;
417
3.66M
    }
418
694k
    _Py_DECREF_STAT_INC();
419
694k
    if (--op->ob_refcnt == 0) {
420
20.9k
        _Py_Dealloc(op);
421
20.9k
    }
422
694k
}
Unexecuted instantiation: pyctype.c:Py_DECREF
Unexecuted instantiation: pyhash.c:Py_DECREF
pylifecycle.c:Py_DECREF
Line
Count
Source
411
1.00k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.00k
    if (_Py_IsImmortal(op)) {
415
196
        _Py_DECREF_IMMORTAL_STAT_INC();
416
196
        return;
417
196
    }
418
812
    _Py_DECREF_STAT_INC();
419
812
    if (--op->ob_refcnt == 0) {
420
84
        _Py_Dealloc(op);
421
84
    }
422
812
}
Unexecuted instantiation: pymath.c:Py_DECREF
Unexecuted instantiation: pystate.c:Py_DECREF
pythonrun.c:Py_DECREF
Line
Count
Source
411
664
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
664
    if (_Py_IsImmortal(op)) {
415
196
        _Py_DECREF_IMMORTAL_STAT_INC();
416
196
        return;
417
196
    }
418
468
    _Py_DECREF_STAT_INC();
419
468
    if (--op->ob_refcnt == 0) {
420
184
        _Py_Dealloc(op);
421
184
    }
422
468
}
Unexecuted instantiation: pytime.c:Py_DECREF
Unexecuted instantiation: qsbr.c:Py_DECREF
Unexecuted instantiation: bootstrap_hash.c:Py_DECREF
specialize.c:Py_DECREF
Line
Count
Source
411
2.34M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2.34M
    if (_Py_IsImmortal(op)) {
415
1.40M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
1.40M
        return;
417
1.40M
    }
418
939k
    _Py_DECREF_STAT_INC();
419
939k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
939k
}
structmember.c:Py_DECREF
Line
Count
Source
411
1.65k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.65k
    if (_Py_IsImmortal(op)) {
415
1.28k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
1.28k
        return;
417
1.28k
    }
418
370
    _Py_DECREF_STAT_INC();
419
370
    if (--op->ob_refcnt == 0) {
420
30
        _Py_Dealloc(op);
421
30
    }
422
370
}
symtable.c:Py_DECREF
Line
Count
Source
411
985k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
985k
    if (_Py_IsImmortal(op)) {
415
460k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
460k
        return;
417
460k
    }
418
524k
    _Py_DECREF_STAT_INC();
419
524k
    if (--op->ob_refcnt == 0) {
420
242k
        _Py_Dealloc(op);
421
242k
    }
422
524k
}
sysmodule.c:Py_DECREF
Line
Count
Source
411
4.65M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
4.65M
    if (_Py_IsImmortal(op)) {
415
1.08M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
1.08M
        return;
417
1.08M
    }
418
3.57M
    _Py_DECREF_STAT_INC();
419
3.57M
    if (--op->ob_refcnt == 0) {
420
2.65M
        _Py_Dealloc(op);
421
2.65M
    }
422
3.57M
}
Unexecuted instantiation: thread.c:Py_DECREF
traceback.c:Py_DECREF
Line
Count
Source
411
161M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
161M
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
161M
    _Py_DECREF_STAT_INC();
419
161M
    if (--op->ob_refcnt == 0) {
420
48.2M
        _Py_Dealloc(op);
421
48.2M
    }
422
161M
}
Unexecuted instantiation: tracemalloc.c:Py_DECREF
Unexecuted instantiation: getopt.c:Py_DECREF
Unexecuted instantiation: pystrcmp.c:Py_DECREF
Unexecuted instantiation: pystrtod.c:Py_DECREF
Unexecuted instantiation: pystrhex.c:Py_DECREF
Unexecuted instantiation: dtoa.c:Py_DECREF
fileutils.c:Py_DECREF
Line
Count
Source
411
10.1k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
10.1k
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
10.1k
    _Py_DECREF_STAT_INC();
419
10.1k
    if (--op->ob_refcnt == 0) {
420
10.1k
        _Py_Dealloc(op);
421
10.1k
    }
422
10.1k
}
Unexecuted instantiation: suggestions.c:Py_DECREF
Unexecuted instantiation: perf_trampoline.c:Py_DECREF
Unexecuted instantiation: perf_jit_trampoline.c:Py_DECREF
Unexecuted instantiation: remote_debugging.c:Py_DECREF
Unexecuted instantiation: dynload_shlib.c:Py_DECREF
Unexecuted instantiation: config.c:Py_DECREF
Unexecuted instantiation: gcmodule.c:Py_DECREF
Unexecuted instantiation: _asynciomodule.c:Py_DECREF
atexitmodule.c:Py_DECREF
Line
Count
Source
411
2
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
2
    _Py_DECREF_STAT_INC();
419
2
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
2
}
Unexecuted instantiation: faulthandler.c:Py_DECREF
posixmodule.c:Py_DECREF
Line
Count
Source
411
4.95M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
4.95M
    if (_Py_IsImmortal(op)) {
415
1.81M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
1.81M
        return;
417
1.81M
    }
418
3.14M
    _Py_DECREF_STAT_INC();
419
3.14M
    if (--op->ob_refcnt == 0) {
420
1.31M
        _Py_Dealloc(op);
421
1.31M
    }
422
3.14M
}
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
687
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
687
    if (_Py_IsImmortal(op)) {
415
141
        _Py_DECREF_IMMORTAL_STAT_INC();
416
141
        return;
417
141
    }
418
546
    _Py_DECREF_STAT_INC();
419
546
    if (--op->ob_refcnt == 0) {
420
21
        _Py_Dealloc(op);
421
21
    }
422
546
}
Unexecuted instantiation: _codecsmodule.c:Py_DECREF
_collectionsmodule.c:Py_DECREF
Line
Count
Source
411
105k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
105k
    if (_Py_IsImmortal(op)) {
415
41.7k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
41.7k
        return;
417
41.7k
    }
418
63.4k
    _Py_DECREF_STAT_INC();
419
63.4k
    if (--op->ob_refcnt == 0) {
420
46.8k
        _Py_Dealloc(op);
421
46.8k
    }
422
63.4k
}
_iomodule.c:Py_DECREF
Line
Count
Source
411
2.64M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2.64M
    if (_Py_IsImmortal(op)) {
415
2.48M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.48M
        return;
417
2.48M
    }
418
156k
    _Py_DECREF_STAT_INC();
419
156k
    if (--op->ob_refcnt == 0) {
420
76.9k
        _Py_Dealloc(op);
421
76.9k
    }
422
156k
}
iobase.c:Py_DECREF
Line
Count
Source
411
2.84M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2.84M
    if (_Py_IsImmortal(op)) {
415
2.74M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.74M
        return;
417
2.74M
    }
418
107k
    _Py_DECREF_STAT_INC();
419
107k
    if (--op->ob_refcnt == 0) {
420
53.9k
        _Py_Dealloc(op);
421
53.9k
    }
422
107k
}
fileio.c:Py_DECREF
Line
Count
Source
411
114k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
114k
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
114k
    _Py_DECREF_STAT_INC();
419
114k
    if (--op->ob_refcnt == 0) {
420
76.5k
        _Py_Dealloc(op);
421
76.5k
    }
422
114k
}
bytesio.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
94.6k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
94.6k
        return;
417
94.6k
    }
418
221k
    _Py_DECREF_STAT_INC();
419
221k
    if (--op->ob_refcnt == 0) {
420
8.49k
        _Py_Dealloc(op);
421
8.49k
    }
422
221k
}
bufferedio.c:Py_DECREF
Line
Count
Source
411
10.1M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
10.1M
    if (_Py_IsImmortal(op)) {
415
9.68M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
9.68M
        return;
417
9.68M
    }
418
508k
    _Py_DECREF_STAT_INC();
419
508k
    if (--op->ob_refcnt == 0) {
420
409k
        _Py_Dealloc(op);
421
409k
    }
422
508k
}
textio.c:Py_DECREF
Line
Count
Source
411
1.05M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
1.05M
    if (_Py_IsImmortal(op)) {
415
284k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
284k
        return;
417
284k
    }
418
769k
    _Py_DECREF_STAT_INC();
419
769k
    if (--op->ob_refcnt == 0) {
420
251k
        _Py_Dealloc(op);
421
251k
    }
422
769k
}
stringio.c:Py_DECREF
Line
Count
Source
411
322k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
322k
    if (_Py_IsImmortal(op)) {
415
166k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
166k
        return;
417
166k
    }
418
156k
    _Py_DECREF_STAT_INC();
419
156k
    if (--op->ob_refcnt == 0) {
420
33.1k
        _Py_Dealloc(op);
421
33.1k
    }
422
156k
}
itertoolsmodule.c:Py_DECREF
Line
Count
Source
411
92.8k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
92.8k
    if (_Py_IsImmortal(op)) {
415
5.13k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
5.13k
        return;
417
5.13k
    }
418
87.7k
    _Py_DECREF_STAT_INC();
419
87.7k
    if (--op->ob_refcnt == 0) {
420
29.3k
        _Py_Dealloc(op);
421
29.3k
    }
422
87.7k
}
sre.c:Py_DECREF
Line
Count
Source
411
440M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
440M
    if (_Py_IsImmortal(op)) {
415
156M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
156M
        return;
417
156M
    }
418
283M
    _Py_DECREF_STAT_INC();
419
283M
    if (--op->ob_refcnt == 0) {
420
20.5M
        _Py_Dealloc(op);
421
20.5M
    }
422
283M
}
Unexecuted instantiation: _sysconfig.c:Py_DECREF
_threadmodule.c:Py_DECREF
Line
Count
Source
411
34.4k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
34.4k
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
34.4k
    _Py_DECREF_STAT_INC();
419
34.4k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
34.4k
}
Unexecuted instantiation: timemodule.c:Py_DECREF
Unexecuted instantiation: _typesmodule.c:Py_DECREF
Unexecuted instantiation: _typingmodule.c:Py_DECREF
Unexecuted instantiation: _weakref.c:Py_DECREF
_abc.c:Py_DECREF
Line
Count
Source
411
102k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
102k
    if (_Py_IsImmortal(op)) {
415
19.9k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
19.9k
        return;
417
19.9k
    }
418
82.6k
    _Py_DECREF_STAT_INC();
419
82.6k
    if (--op->ob_refcnt == 0) {
420
4.98k
        _Py_Dealloc(op);
421
4.98k
    }
422
82.6k
}
_functoolsmodule.c:Py_DECREF
Line
Count
Source
411
753k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
753k
    if (_Py_IsImmortal(op)) {
415
188k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
188k
        return;
417
188k
    }
418
565k
    _Py_DECREF_STAT_INC();
419
565k
    if (--op->ob_refcnt == 0) {
420
376k
        _Py_Dealloc(op);
421
376k
    }
422
565k
}
Unexecuted instantiation: _localemodule.c:Py_DECREF
Unexecuted instantiation: _opcode.c:Py_DECREF
_operator.c:Py_DECREF
Line
Count
Source
411
556k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
556k
    if (_Py_IsImmortal(op)) {
415
278k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
278k
        return;
417
278k
    }
418
278k
    _Py_DECREF_STAT_INC();
419
278k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
278k
}
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.8k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
21.8k
    if (_Py_IsImmortal(op)) {
415
750
        _Py_DECREF_IMMORTAL_STAT_INC();
416
750
        return;
417
750
    }
418
21.0k
    _Py_DECREF_STAT_INC();
419
21.0k
    if (--op->ob_refcnt == 0) {
420
14.8k
        _Py_Dealloc(op);
421
14.8k
    }
422
21.0k
}
Unexecuted instantiation: myreadline.c:Py_DECREF
abstract.c:Py_DECREF
Line
Count
Source
411
745M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
745M
    if (_Py_IsImmortal(op)) {
415
437M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
437M
        return;
417
437M
    }
418
307M
    _Py_DECREF_STAT_INC();
419
307M
    if (--op->ob_refcnt == 0) {
420
2.42M
        _Py_Dealloc(op);
421
2.42M
    }
422
307M
}
Unexecuted instantiation: boolobject.c:Py_DECREF
Unexecuted instantiation: bytes_methods.c:Py_DECREF
bytearrayobject.c:Py_DECREF
Line
Count
Source
411
3.84M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
3.84M
    if (_Py_IsImmortal(op)) {
415
492k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
492k
        return;
417
492k
    }
418
3.35M
    _Py_DECREF_STAT_INC();
419
3.35M
    if (--op->ob_refcnt == 0) {
420
3.35M
        _Py_Dealloc(op);
421
3.35M
    }
422
3.35M
}
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
517k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
517k
    if (_Py_IsImmortal(op)) {
415
62.7k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
62.7k
        return;
417
62.7k
    }
418
455k
    _Py_DECREF_STAT_INC();
419
455k
    if (--op->ob_refcnt == 0) {
420
312k
        _Py_Dealloc(op);
421
312k
    }
422
455k
}
classobject.c:Py_DECREF
Line
Count
Source
411
97.5M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
97.5M
    if (_Py_IsImmortal(op)) {
415
10
        _Py_DECREF_IMMORTAL_STAT_INC();
416
10
        return;
417
10
    }
418
97.5M
    _Py_DECREF_STAT_INC();
419
97.5M
    if (--op->ob_refcnt == 0) {
420
5.84k
        _Py_Dealloc(op);
421
5.84k
    }
422
97.5M
}
codeobject.c:Py_DECREF
Line
Count
Source
411
913k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
913k
    if (_Py_IsImmortal(op)) {
415
405k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
405k
        return;
417
405k
    }
418
508k
    _Py_DECREF_STAT_INC();
419
508k
    if (--op->ob_refcnt == 0) {
420
419k
        _Py_Dealloc(op);
421
419k
    }
422
508k
}
Unexecuted instantiation: complexobject.c:Py_DECREF
descrobject.c:Py_DECREF
Line
Count
Source
411
82.7M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
82.7M
    if (_Py_IsImmortal(op)) {
415
11.4M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
11.4M
        return;
417
11.4M
    }
418
71.3M
    _Py_DECREF_STAT_INC();
419
71.3M
    if (--op->ob_refcnt == 0) {
420
37.4M
        _Py_Dealloc(op);
421
37.4M
    }
422
71.3M
}
enumobject.c:Py_DECREF
Line
Count
Source
411
255M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
255M
    if (_Py_IsImmortal(op)) {
415
92.4M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
92.4M
        return;
417
92.4M
    }
418
163M
    _Py_DECREF_STAT_INC();
419
163M
    if (--op->ob_refcnt == 0) {
420
63.6M
        _Py_Dealloc(op);
421
63.6M
    }
422
163M
}
genobject.c:Py_DECREF
Line
Count
Source
411
58.6M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
58.6M
    if (_Py_IsImmortal(op)) {
415
58.6M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
58.6M
        return;
417
58.6M
    }
418
69.8k
    _Py_DECREF_STAT_INC();
419
69.8k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
69.8k
}
fileobject.c:Py_DECREF
Line
Count
Source
411
387k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
387k
    if (_Py_IsImmortal(op)) {
415
381k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
381k
        return;
417
381k
    }
418
5.81k
    _Py_DECREF_STAT_INC();
419
5.81k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
5.81k
}
frameobject.c:Py_DECREF
Line
Count
Source
411
36.9M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
36.9M
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
36.9M
    _Py_DECREF_STAT_INC();
419
36.9M
    if (--op->ob_refcnt == 0) {
420
8.31M
        _Py_Dealloc(op);
421
8.31M
    }
422
36.9M
}
funcobject.c:Py_DECREF
Line
Count
Source
411
125M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
125M
    if (_Py_IsImmortal(op)) {
415
71.1M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
71.1M
        return;
417
71.1M
    }
418
53.9M
    _Py_DECREF_STAT_INC();
419
53.9M
    if (--op->ob_refcnt == 0) {
420
536k
        _Py_Dealloc(op);
421
536k
    }
422
53.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
3.23M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
3.23M
    if (_Py_IsImmortal(op)) {
415
756k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
756k
        return;
417
756k
    }
418
2.47M
    _Py_DECREF_STAT_INC();
419
2.47M
    if (--op->ob_refcnt == 0) {
420
378k
        _Py_Dealloc(op);
421
378k
    }
422
2.47M
}
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
336M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
336M
    if (_Py_IsImmortal(op)) {
415
7.67M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
7.67M
        return;
417
7.67M
    }
418
329M
    _Py_DECREF_STAT_INC();
419
329M
    if (--op->ob_refcnt == 0) {
420
246M
        _Py_Dealloc(op);
421
246M
    }
422
329M
}
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.66M
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
2.66M
    if (_Py_IsImmortal(op)) {
415
1.46M
        _Py_DECREF_IMMORTAL_STAT_INC();
416
1.46M
        return;
417
1.46M
    }
418
1.19M
    _Py_DECREF_STAT_INC();
419
1.19M
    if (--op->ob_refcnt == 0) {
420
330k
        _Py_Dealloc(op);
421
330k
    }
422
1.19M
}
Unexecuted instantiation: Python-tokenize.c:Py_DECREF
Unexecuted instantiation: asdl.c:Py_DECREF
assemble.c:Py_DECREF
Line
Count
Source
411
57.6k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
57.6k
    if (_Py_IsImmortal(op)) {
415
9.55k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
9.55k
        return;
417
9.55k
    }
418
48.1k
    _Py_DECREF_STAT_INC();
419
48.1k
    if (--op->ob_refcnt == 0) {
420
0
        _Py_Dealloc(op);
421
0
    }
422
48.1k
}
Unexecuted instantiation: ast.c:Py_DECREF
ast_preprocess.c:Py_DECREF
Line
Count
Source
411
3
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
3
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
3
    _Py_DECREF_STAT_INC();
419
3
    if (--op->ob_refcnt == 0) {
420
3
        _Py_Dealloc(op);
421
3
    }
422
3
}
ast_unparse.c:Py_DECREF
Line
Count
Source
411
8
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
8
    if (_Py_IsImmortal(op)) {
415
0
        _Py_DECREF_IMMORTAL_STAT_INC();
416
0
        return;
417
0
    }
418
8
    _Py_DECREF_STAT_INC();
419
8
    if (--op->ob_refcnt == 0) {
420
8
        _Py_Dealloc(op);
421
8
    }
422
8
}
Unexecuted instantiation: critical_section.c:Py_DECREF
Unexecuted instantiation: crossinterp.c:Py_DECREF
Unexecuted instantiation: getcopyright.c:Py_DECREF
Unexecuted instantiation: getplatform.c:Py_DECREF
Unexecuted instantiation: getversion.c:Py_DECREF
Unexecuted instantiation: optimizer.c:Py_DECREF
Unexecuted instantiation: pathconfig.c:Py_DECREF
pegen.c:Py_DECREF
Line
Count
Source
411
127k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
127k
    if (_Py_IsImmortal(op)) {
415
46.9k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
46.9k
        return;
417
46.9k
    }
418
80.2k
    _Py_DECREF_STAT_INC();
419
80.2k
    if (--op->ob_refcnt == 0) {
420
59.6k
        _Py_Dealloc(op);
421
59.6k
    }
422
80.2k
}
pegen_errors.c:Py_DECREF
Line
Count
Source
411
41.2k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
41.2k
    if (_Py_IsImmortal(op)) {
415
2.35k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.35k
        return;
417
2.35k
    }
418
38.8k
    _Py_DECREF_STAT_INC();
419
38.8k
    if (--op->ob_refcnt == 0) {
420
3.18k
        _Py_Dealloc(op);
421
3.18k
    }
422
38.8k
}
Unexecuted instantiation: parser.c:Py_DECREF
Unexecuted instantiation: buffer.c:Py_DECREF
lexer.c:Py_DECREF
Line
Count
Source
411
12.5k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
12.5k
    if (_Py_IsImmortal(op)) {
415
855
        _Py_DECREF_IMMORTAL_STAT_INC();
416
855
        return;
417
855
    }
418
11.6k
    _Py_DECREF_STAT_INC();
419
11.6k
    if (--op->ob_refcnt == 0) {
420
11.6k
        _Py_Dealloc(op);
421
11.6k
    }
422
11.6k
}
state.c:Py_DECREF
Line
Count
Source
411
21.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
398
        _Py_DECREF_IMMORTAL_STAT_INC();
416
398
        return;
417
398
    }
418
20.9k
    _Py_DECREF_STAT_INC();
419
20.9k
    if (--op->ob_refcnt == 0) {
420
2.36k
        _Py_Dealloc(op);
421
2.36k
    }
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
42.1k
{
412
    // Non-limited C API and limited C API for Python 3.9 and older access
413
    // directly PyObject.ob_refcnt.
414
42.1k
    if (_Py_IsImmortal(op)) {
415
2.66k
        _Py_DECREF_IMMORTAL_STAT_INC();
416
2.66k
        return;
417
2.66k
    }
418
39.4k
    _Py_DECREF_STAT_INC();
419
39.4k
    if (--op->ob_refcnt == 0) {
420
39.4k
        _Py_Dealloc(op);
421
39.4k
    }
422
39.4k
}
423
20.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.41G
    do { \
478
2.41G
        _Py_TYPEOF(op)* _tmp_op_ptr = &(op); \
479
2.41G
        _Py_TYPEOF(op) _tmp_old_op = (*_tmp_op_ptr); \
480
2.41G
        if (_tmp_old_op != NULL) { \
481
540M
            *_tmp_op_ptr = _Py_NULL; \
482
540M
            Py_DECREF(_tmp_old_op); \
483
540M
        } \
484
2.41G
    } while (0)
485
#else
486
#define Py_CLEAR(op) \
487
    do { \
488
        PyObject **_tmp_op_ptr = _Py_CAST(PyObject**, &(op)); \
489
        PyObject *_tmp_old_op = (*_tmp_op_ptr); \
490
        if (_tmp_old_op != NULL) { \
491
            PyObject *_null_ptr = _Py_NULL; \
492
            memcpy(_tmp_op_ptr, &_null_ptr, sizeof(PyObject*)); \
493
            Py_DECREF(_tmp_old_op); \
494
        } \
495
    } while (0)
496
#endif
497
498
499
/* Function to use in case the object pointer can be NULL: */
500
static inline void Py_XINCREF(PyObject *op)
501
2.11G
{
502
2.11G
    if (op != _Py_NULL) {
503
921M
        Py_INCREF(op);
504
921M
    }
505
2.11G
}
Unexecuted instantiation: bytesobject.c:Py_XINCREF
Unexecuted instantiation: call.c:Py_XINCREF
exceptions.c:Py_XINCREF
Line
Count
Source
501
113M
{
502
113M
    if (op != _Py_NULL) {
503
21.2M
        Py_INCREF(op);
504
21.2M
    }
505
113M
}
Unexecuted instantiation: genericaliasobject.c:Py_XINCREF
Unexecuted instantiation: floatobject.c:Py_XINCREF
listobject.c:Py_XINCREF
Line
Count
Source
501
7.30M
{
502
7.30M
    if (op != _Py_NULL) {
503
7.30M
        Py_INCREF(op);
504
7.30M
    }
505
7.30M
}
Unexecuted instantiation: longobject.c:Py_XINCREF
dictobject.c:Py_XINCREF
Line
Count
Source
501
715M
{
502
715M
    if (op != _Py_NULL) {
503
223M
        Py_INCREF(op);
504
223M
    }
505
715M
}
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
60.8M
{
502
60.8M
    if (op != _Py_NULL) {
503
60.5M
        Py_INCREF(op);
504
60.5M
    }
505
60.8M
}
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
304k
{
502
304k
    if (op != _Py_NULL) {
503
32.2k
        Py_INCREF(op);
504
32.2k
    }
505
304k
}
Unexecuted instantiation: _warnings.c:Py_XINCREF
bltinmodule.c:Py_XINCREF
Line
Count
Source
501
561
{
502
561
    if (op != _Py_NULL) {
503
561
        Py_INCREF(op);
504
561
    }
505
561
}
ceval.c:Py_XINCREF
Line
Count
Source
501
313M
{
502
313M
    if (op != _Py_NULL) {
503
89.7M
        Py_INCREF(op);
504
89.7M
    }
505
313M
}
Unexecuted instantiation: codecs.c:Py_XINCREF
Unexecuted instantiation: codegen.c:Py_XINCREF
compile.c:Py_XINCREF
Line
Count
Source
501
11.8k
{
502
11.8k
    if (op != _Py_NULL) {
503
5.86k
        Py_INCREF(op);
504
5.86k
    }
505
11.8k
}
context.c:Py_XINCREF
Line
Count
Source
501
271k
{
502
271k
    if (op != _Py_NULL) {
503
0
        Py_INCREF(op);
504
0
    }
505
271k
}
errors.c:Py_XINCREF
Line
Count
Source
501
43.6M
{
502
43.6M
    if (op != _Py_NULL) {
503
43.5M
        Py_INCREF(op);
504
43.5M
    }
505
43.6M
}
Unexecuted instantiation: flowgraph.c:Py_XINCREF
Unexecuted instantiation: frame.c:Py_XINCREF
Unexecuted instantiation: future.c:Py_XINCREF
Unexecuted instantiation: gc.c:Py_XINCREF
Unexecuted instantiation: gc_gil.c:Py_XINCREF
Unexecuted instantiation: getargs.c:Py_XINCREF
Unexecuted instantiation: ceval_gil.c:Py_XINCREF
Unexecuted instantiation: hamt.c:Py_XINCREF
Unexecuted instantiation: hashtable.c:Py_XINCREF
import.c:Py_XINCREF
Line
Count
Source
501
34.5k
{
502
34.5k
    if (op != _Py_NULL) {
503
28.3k
        Py_INCREF(op);
504
28.3k
    }
505
34.5k
}
Unexecuted instantiation: importdl.c:Py_XINCREF
Unexecuted instantiation: initconfig.c:Py_XINCREF
Unexecuted instantiation: instrumentation.c:Py_XINCREF
Unexecuted instantiation: instruction_sequence.c:Py_XINCREF
Unexecuted instantiation: intrinsics.c:Py_XINCREF
Unexecuted instantiation: legacy_tracing.c:Py_XINCREF
Unexecuted instantiation: lock.c:Py_XINCREF
Unexecuted instantiation: marshal.c:Py_XINCREF
Unexecuted instantiation: modsupport.c:Py_XINCREF
Unexecuted instantiation: mysnprintf.c:Py_XINCREF
Unexecuted instantiation: parking_lot.c:Py_XINCREF
Unexecuted instantiation: preconfig.c:Py_XINCREF
Unexecuted instantiation: pyarena.c:Py_XINCREF
Unexecuted instantiation: pyctype.c:Py_XINCREF
Unexecuted instantiation: pyhash.c:Py_XINCREF
Unexecuted instantiation: pylifecycle.c:Py_XINCREF
Unexecuted instantiation: pymath.c:Py_XINCREF
pystate.c:Py_XINCREF
Line
Count
Source
501
1.20M
{
502
1.20M
    if (op != _Py_NULL) {
503
1.20M
        Py_INCREF(op);
504
1.20M
    }
505
1.20M
}
Unexecuted instantiation: pythonrun.c:Py_XINCREF
Unexecuted instantiation: pytime.c:Py_XINCREF
Unexecuted instantiation: qsbr.c:Py_XINCREF
Unexecuted instantiation: bootstrap_hash.c:Py_XINCREF
Unexecuted instantiation: specialize.c:Py_XINCREF
structmember.c:Py_XINCREF
Line
Count
Source
501
2.82M
{
502
2.82M
    if (op != _Py_NULL) {
503
1.90M
        Py_INCREF(op);
504
1.90M
    }
505
2.82M
}
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
122M
{
502
122M
    if (op != _Py_NULL) {
503
80.9M
        Py_INCREF(op);
504
80.9M
    }
505
122M
}
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
190k
{
502
190k
    if (op != _Py_NULL) {
503
190k
        Py_INCREF(op);
504
190k
    }
505
190k
}
Unexecuted instantiation: signalmodule.c:Py_XINCREF
Unexecuted instantiation: _tracemalloc.c:Py_XINCREF
Unexecuted instantiation: _suggestions.c:Py_XINCREF
_datetimemodule.c:Py_XINCREF
Line
Count
Source
501
56
{
502
56
    if (op != _Py_NULL) {
503
0
        Py_INCREF(op);
504
0
    }
505
56
}
Unexecuted instantiation: _codecsmodule.c:Py_XINCREF
_collectionsmodule.c:Py_XINCREF
Line
Count
Source
501
4
{
502
4
    if (op != _Py_NULL) {
503
4
        Py_INCREF(op);
504
4
    }
505
4
}
Unexecuted instantiation: errnomodule.c:Py_XINCREF
Unexecuted instantiation: _iomodule.c:Py_XINCREF
Unexecuted instantiation: iobase.c:Py_XINCREF
Unexecuted instantiation: fileio.c:Py_XINCREF
Unexecuted instantiation: bytesio.c:Py_XINCREF
bufferedio.c:Py_XINCREF
Line
Count
Source
501
5.81k
{
502
5.81k
    if (op != _Py_NULL) {
503
5.81k
        Py_INCREF(op);
504
5.81k
    }
505
5.81k
}
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
46.3M
{
502
46.3M
    if (op != _Py_NULL) {
503
44.9M
        Py_INCREF(op);
504
44.9M
    }
505
46.3M
}
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.54M
{
502
8.54M
    if (op != _Py_NULL) {
503
156k
        Py_INCREF(op);
504
156k
    }
505
8.54M
}
Unexecuted instantiation: classobject.c:Py_XINCREF
codeobject.c:Py_XINCREF
Line
Count
Source
501
7.73k
{
502
7.73k
    if (op != _Py_NULL) {
503
7.73k
        Py_INCREF(op);
504
7.73k
    }
505
7.73k
}
Unexecuted instantiation: complexobject.c:Py_XINCREF
descrobject.c:Py_XINCREF
Line
Count
Source
501
79.7k
{
502
79.7k
    if (op != _Py_NULL) {
503
76.8k
        Py_INCREF(op);
504
76.8k
    }
505
79.7k
}
Unexecuted instantiation: enumobject.c:Py_XINCREF
genobject.c:Py_XINCREF
Line
Count
Source
501
2.30k
{
502
2.30k
    if (op != _Py_NULL) {
503
0
        Py_INCREF(op);
504
0
    }
505
2.30k
}
Unexecuted instantiation: fileobject.c:Py_XINCREF
frameobject.c:Py_XINCREF
Line
Count
Source
501
18.5M
{
502
18.5M
    if (op != _Py_NULL) {
503
18.5M
        Py_INCREF(op);
504
18.5M
    }
505
18.5M
}
funcobject.c:Py_XINCREF
Line
Count
Source
501
18.7k
{
502
18.7k
    if (op != _Py_NULL) {
503
18
        Py_INCREF(op);
504
18
    }
505
18.7k
}
Unexecuted instantiation: interpolationobject.c:Py_XINCREF
Unexecuted instantiation: iterobject.c:Py_XINCREF
Unexecuted instantiation: odictobject.c:Py_XINCREF
methodobject.c:Py_XINCREF
Line
Count
Source
501
655M
{
502
655M
    if (op != _Py_NULL) {
503
327M
        Py_INCREF(op);
504
327M
    }
505
655M
}
Unexecuted instantiation: namespaceobject.c:Py_XINCREF
Unexecuted instantiation: _contextvars.c:Py_XINCREF
Unexecuted instantiation: Python-ast.c:Py_XINCREF
Unexecuted instantiation: Python-tokenize.c:Py_XINCREF
Unexecuted instantiation: asdl.c:Py_XINCREF
Unexecuted instantiation: assemble.c:Py_XINCREF
Unexecuted instantiation: ast.c:Py_XINCREF
Unexecuted instantiation: ast_preprocess.c:Py_XINCREF
Unexecuted instantiation: ast_unparse.c:Py_XINCREF
Unexecuted instantiation: critical_section.c:Py_XINCREF
Unexecuted instantiation: crossinterp.c:Py_XINCREF
Unexecuted instantiation: getcopyright.c:Py_XINCREF
Unexecuted instantiation: getplatform.c:Py_XINCREF
Unexecuted instantiation: getversion.c:Py_XINCREF
Unexecuted instantiation: optimizer.c:Py_XINCREF
Unexecuted instantiation: pathconfig.c:Py_XINCREF
pegen.c:Py_XINCREF
Line
Count
Source
501
18.5k
{
502
18.5k
    if (op != _Py_NULL) {
503
453
        Py_INCREF(op);
504
453
    }
505
18.5k
}
Unexecuted instantiation: pegen_errors.c:Py_XINCREF
Unexecuted instantiation: parser.c:Py_XINCREF
Unexecuted instantiation: buffer.c:Py_XINCREF
Unexecuted instantiation: lexer.c:Py_XINCREF
Unexecuted instantiation: state.c:Py_XINCREF
Unexecuted instantiation: readline_tokenizer.c:Py_XINCREF
Unexecuted instantiation: string_tokenizer.c:Py_XINCREF
Unexecuted instantiation: utf8_tokenizer.c:Py_XINCREF
Unexecuted instantiation: getcompiler.c:Py_XINCREF
Unexecuted instantiation: mystrtoul.c:Py_XINCREF
Unexecuted instantiation: token.c:Py_XINCREF
Unexecuted instantiation: action_helpers.c:Py_XINCREF
Unexecuted instantiation: string_parser.c:Py_XINCREF
506
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
507
2.11G
#  define Py_XINCREF(op) Py_XINCREF(_PyObject_CAST(op))
508
#endif
509
510
static inline void Py_XDECREF(PyObject *op)
511
13.8G
{
512
13.8G
    if (op != _Py_NULL) {
513
12.6G
        Py_DECREF(op);
514
12.6G
    }
515
13.8G
}
bytesobject.c:Py_XDECREF
Line
Count
Source
511
9.25M
{
512
9.25M
    if (op != _Py_NULL) {
513
105k
        Py_DECREF(op);
514
105k
    }
515
9.25M
}
Unexecuted instantiation: call.c:Py_XDECREF
exceptions.c:Py_XDECREF
Line
Count
Source
511
116M
{
512
116M
    if (op != _Py_NULL) {
513
58.8M
        Py_DECREF(op);
514
58.8M
    }
515
116M
}
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
849k
{
512
849k
    if (op != _Py_NULL) {
513
161k
        Py_DECREF(op);
514
161k
    }
515
849k
}
listobject.c:Py_XDECREF
Line
Count
Source
511
1.67G
{
512
1.67G
    if (op != _Py_NULL) {
513
1.63G
        Py_DECREF(op);
514
1.63G
    }
515
1.67G
}
longobject.c:Py_XDECREF
Line
Count
Source
511
8.18M
{
512
8.18M
    if (op != _Py_NULL) {
513
2.75M
        Py_DECREF(op);
514
2.75M
    }
515
8.18M
}
dictobject.c:Py_XDECREF
Line
Count
Source
511
852M
{
512
852M
    if (op != _Py_NULL) {
513
844M
        Py_DECREF(op);
514
844M
    }
515
852M
}
Unexecuted instantiation: memoryobject.c:Py_XDECREF
moduleobject.c:Py_XDECREF
Line
Count
Source
511
21.9k
{
512
21.9k
    if (op != _Py_NULL) {
513
14.9k
        Py_DECREF(op);
514
14.9k
    }
515
21.9k
}
object.c:Py_XDECREF
Line
Count
Source
511
11.7M
{
512
11.7M
    if (op != _Py_NULL) {
513
46.8k
        Py_DECREF(op);
514
46.8k
    }
515
11.7M
}
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
302k
{
512
302k
    if (op != _Py_NULL) {
513
28
        Py_DECREF(op);
514
28
    }
515
302k
}
Unexecuted instantiation: sliceobject.c:Py_XDECREF
structseq.c:Py_XDECREF
Line
Count
Source
511
8.75M
{
512
8.75M
    if (op != _Py_NULL) {
513
8.75M
        Py_DECREF(op);
514
8.75M
    }
515
8.75M
}
Unexecuted instantiation: templateobject.c:Py_XDECREF
tupleobject.c:Py_XDECREF
Line
Count
Source
511
9.30G
{
512
9.30G
    if (op != _Py_NULL) {
513
9.30G
        Py_DECREF(op);
514
9.30G
    }
515
9.30G
}
typeobject.c:Py_XDECREF
Line
Count
Source
511
40.9M
{
512
40.9M
    if (op != _Py_NULL) {
513
23.5M
        Py_DECREF(op);
514
23.5M
    }
515
40.9M
}
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
564
{
512
564
    if (op != _Py_NULL) {
513
256
        Py_DECREF(op);
514
256
    }
515
564
}
Unexecuted instantiation: unicode_writer.c:Py_XDECREF
Unexecuted instantiation: unicodectype.c:Py_XDECREF
unicodeobject.c:Py_XDECREF
Line
Count
Source
511
111M
{
512
111M
    if (op != _Py_NULL) {
513
79.7M
        Py_DECREF(op);
514
79.7M
    }
515
111M
}
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
310k
{
512
310k
    if (op != _Py_NULL) {
513
5.10k
        Py_DECREF(op);
514
5.10k
    }
515
310k
}
_warnings.c:Py_XDECREF
Line
Count
Source
511
7.32M
{
512
7.32M
    if (op != _Py_NULL) {
513
6.37M
        Py_DECREF(op);
514
6.37M
    }
515
7.32M
}
bltinmodule.c:Py_XDECREF
Line
Count
Source
511
14.7M
{
512
14.7M
    if (op != _Py_NULL) {
513
670k
        Py_DECREF(op);
514
670k
    }
515
14.7M
}
ceval.c:Py_XDECREF
Line
Count
Source
511
369k
{
512
369k
    if (op != _Py_NULL) {
513
5.34k
        Py_DECREF(op);
514
5.34k
    }
515
369k
}
codecs.c:Py_XDECREF
Line
Count
Source
511
190k
{
512
190k
    if (op != _Py_NULL) {
513
127k
        Py_DECREF(op);
514
127k
    }
515
190k
}
Unexecuted instantiation: codegen.c:Py_XDECREF
compile.c:Py_XDECREF
Line
Count
Source
511
33.1k
{
512
33.1k
    if (op != _Py_NULL) {
513
10.1k
        Py_DECREF(op);
514
10.1k
    }
515
33.1k
}
Unexecuted instantiation: context.c:Py_XDECREF
errors.c:Py_XDECREF
Line
Count
Source
511
270M
{
512
270M
    if (op != _Py_NULL) {
513
34.5M
        Py_DECREF(op);
514
34.5M
    }
515
270M
}
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
176k
{
512
176k
    if (op != _Py_NULL) {
513
0
        Py_DECREF(op);
514
0
    }
515
176k
}
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.89M
{
512
6.89M
    if (op != _Py_NULL) {
513
6.86M
        Py_DECREF(op);
514
6.86M
    }
515
6.89M
}
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
16.4k
{
512
16.4k
    if (op != _Py_NULL) {
513
0
        Py_DECREF(op);
514
0
    }
515
16.4k
}
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.38M
{
512
1.38M
    if (op != _Py_NULL) {
513
1.38M
        Py_DECREF(op);
514
1.38M
    }
515
1.38M
}
modsupport.c:Py_XDECREF
Line
Count
Source
511
11.2k
{
512
11.2k
    if (op != _Py_NULL) {
513
11.2k
        Py_DECREF(op);
514
11.2k
    }
515
11.2k
}
Unexecuted instantiation: mysnprintf.c:Py_XDECREF
Unexecuted instantiation: parking_lot.c:Py_XDECREF
Unexecuted instantiation: preconfig.c:Py_XDECREF
Unexecuted instantiation: pyarena.c:Py_XDECREF
Unexecuted instantiation: pyctype.c:Py_XDECREF
Unexecuted instantiation: pyhash.c:Py_XDECREF
pylifecycle.c:Py_XDECREF
Line
Count
Source
511
168
{
512
168
    if (op != _Py_NULL) {
513
168
        Py_DECREF(op);
514
168
    }
515
168
}
Unexecuted instantiation: pymath.c:Py_XDECREF
Unexecuted instantiation: pystate.c:Py_XDECREF
pythonrun.c:Py_XDECREF
Line
Count
Source
511
552
{
512
552
    if (op != _Py_NULL) {
513
368
        Py_DECREF(op);
514
368
    }
515
552
}
Unexecuted instantiation: pytime.c:Py_XDECREF
Unexecuted instantiation: qsbr.c:Py_XDECREF
Unexecuted instantiation: bootstrap_hash.c:Py_XDECREF
specialize.c:Py_XDECREF
Line
Count
Source
511
4.18M
{
512
4.18M
    if (op != _Py_NULL) {
513
2.34M
        Py_DECREF(op);
514
2.34M
    }
515
4.18M
}
structmember.c:Py_XDECREF
Line
Count
Source
511
1.87M
{
512
1.87M
    if (op != _Py_NULL) {
513
1.65k
        Py_DECREF(op);
514
1.65k
    }
515
1.87M
}
symtable.c:Py_XDECREF
Line
Count
Source
511
200k
{
512
200k
    if (op != _Py_NULL) {
513
157k
        Py_DECREF(op);
514
157k
    }
515
200k
}
sysmodule.c:Py_XDECREF
Line
Count
Source
511
3.56M
{
512
3.56M
    if (op != _Py_NULL) {
513
2.67M
        Py_DECREF(op);
514
2.67M
    }
515
3.56M
}
Unexecuted instantiation: thread.c:Py_XDECREF
traceback.c:Py_XDECREF
Line
Count
Source
511
245M
{
512
245M
    if (op != _Py_NULL) {
513
161M
        Py_DECREF(op);
514
161M
    }
515
245M
}
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.58M
{
512
1.58M
    if (op != _Py_NULL) {
513
1.32M
        Py_DECREF(op);
514
1.32M
    }
515
1.58M
}
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
47
{
512
47
    if (op != _Py_NULL) {
513
30
        Py_DECREF(op);
514
30
    }
515
47
}
Unexecuted instantiation: _codecsmodule.c:Py_XDECREF
_collectionsmodule.c:Py_XDECREF
Line
Count
Source
511
4
{
512
4
    if (op != _Py_NULL) {
513
0
        Py_DECREF(op);
514
0
    }
515
4
}
Unexecuted instantiation: errnomodule.c:Py_XDECREF
Unexecuted instantiation: _iomodule.c:Py_XDECREF
Unexecuted instantiation: iobase.c:Py_XDECREF
Unexecuted instantiation: fileio.c:Py_XDECREF
bytesio.c:Py_XDECREF
Line
Count
Source
511
39.9k
{
512
39.9k
    if (op != _Py_NULL) {
513
39.9k
        Py_DECREF(op);
514
39.9k
    }
515
39.9k
}
bufferedio.c:Py_XDECREF
Line
Count
Source
511
61.7k
{
512
61.7k
    if (op != _Py_NULL) {
513
5.81k
        Py_DECREF(op);
514
5.81k
    }
515
61.7k
}
textio.c:Py_XDECREF
Line
Count
Source
511
33.3k
{
512
33.3k
    if (op != _Py_NULL) {
513
56
        Py_DECREF(op);
514
56
    }
515
33.3k
}
Unexecuted instantiation: stringio.c:Py_XDECREF
itertoolsmodule.c:Py_XDECREF
Line
Count
Source
511
32.3k
{
512
32.3k
    if (op != _Py_NULL) {
513
5.22k
        Py_DECREF(op);
514
5.22k
    }
515
32.3k
}
sre.c:Py_XDECREF
Line
Count
Source
511
88.8M
{
512
88.8M
    if (op != _Py_NULL) {
513
88.8M
        Py_DECREF(op);
514
88.8M
    }
515
88.8M
}
Unexecuted instantiation: _sysconfig.c:Py_XDECREF
Unexecuted instantiation: _threadmodule.c:Py_XDECREF
Unexecuted instantiation: timemodule.c:Py_XDECREF
Unexecuted instantiation: _typesmodule.c:Py_XDECREF
Unexecuted instantiation: _typingmodule.c:Py_XDECREF
Unexecuted instantiation: _weakref.c:Py_XDECREF
_abc.c:Py_XDECREF
Line
Count
Source
511
29.4k
{
512
29.4k
    if (op != _Py_NULL) {
513
27.7k
        Py_DECREF(op);
514
27.7k
    }
515
29.4k
}
_functoolsmodule.c:Py_XDECREF
Line
Count
Source
511
77
{
512
77
    if (op != _Py_NULL) {
513
0
        Py_DECREF(op);
514
0
    }
515
77
}
Unexecuted instantiation: _localemodule.c:Py_XDECREF
Unexecuted instantiation: _opcode.c:Py_XDECREF
Unexecuted instantiation: _operator.c:Py_XDECREF
Unexecuted instantiation: _stat.c:Py_XDECREF
Unexecuted instantiation: symtablemodule.c:Py_XDECREF
Unexecuted instantiation: pwdmodule.c:Py_XDECREF
Unexecuted instantiation: getpath.c:Py_XDECREF
Unexecuted instantiation: frozen.c:Py_XDECREF
Unexecuted instantiation: getbuildinfo.c:Py_XDECREF
Unexecuted instantiation: peg_api.c:Py_XDECREF
Unexecuted instantiation: file_tokenizer.c:Py_XDECREF
helpers.c:Py_XDECREF
Line
Count
Source
511
3.12k
{
512
3.12k
    if (op != _Py_NULL) {
513
3.12k
        Py_DECREF(op);
514
3.12k
    }
515
3.12k
}
Unexecuted instantiation: myreadline.c:Py_XDECREF
abstract.c:Py_XDECREF
Line
Count
Source
511
408k
{
512
408k
    if (op != _Py_NULL) {
513
251k
        Py_DECREF(op);
514
251k
    }
515
408k
}
Unexecuted instantiation: boolobject.c:Py_XDECREF
Unexecuted instantiation: bytes_methods.c:Py_XDECREF
bytearrayobject.c:Py_XDECREF
Line
Count
Source
511
3.84M
{
512
3.84M
    if (op != _Py_NULL) {
513
3.84M
        Py_DECREF(op);
514
3.84M
    }
515
3.84M
}
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.53M
{
512
8.53M
    if (op != _Py_NULL) {
513
517k
        Py_DECREF(op);
514
517k
    }
515
8.53M
}
classobject.c:Py_XDECREF
Line
Count
Source
511
48.7M
{
512
48.7M
    if (op != _Py_NULL) {
513
48.7M
        Py_DECREF(op);
514
48.7M
    }
515
48.7M
}
codeobject.c:Py_XDECREF
Line
Count
Source
511
1.02M
{
512
1.02M
    if (op != _Py_NULL) {
513
877k
        Py_DECREF(op);
514
877k
    }
515
1.02M
}
Unexecuted instantiation: complexobject.c:Py_XDECREF
descrobject.c:Py_XDECREF
Line
Count
Source
511
33.4M
{
512
33.4M
    if (op != _Py_NULL) {
513
23.7M
        Py_DECREF(op);
514
23.7M
    }
515
33.4M
}
enumobject.c:Py_XDECREF
Line
Count
Source
511
25.8M
{
512
25.8M
    if (op != _Py_NULL) {
513
17.2M
        Py_DECREF(op);
514
17.2M
    }
515
25.8M
}
genobject.c:Py_XDECREF
Line
Count
Source
511
1.15k
{
512
1.15k
    if (op != _Py_NULL) {
513
0
        Py_DECREF(op);
514
0
    }
515
1.15k
}
Unexecuted instantiation: fileobject.c:Py_XDECREF
Unexecuted instantiation: frameobject.c:Py_XDECREF
funcobject.c:Py_XDECREF
Line
Count
Source
511
4.76k
{
512
4.76k
    if (op != _Py_NULL) {
513
1.64k
        Py_DECREF(op);
514
1.64k
    }
515
4.76k
}
Unexecuted instantiation: interpolationobject.c:Py_XDECREF
iterobject.c:Py_XDECREF
Line
Count
Source
511
3.23M
{
512
3.23M
    if (op != _Py_NULL) {
513
378k
        Py_DECREF(op);
514
378k
    }
515
3.23M
}
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
982M
{
512
982M
    if (op != _Py_NULL) {
513
336M
        Py_DECREF(op);
514
336M
    }
515
982M
}
Unexecuted instantiation: namespaceobject.c:Py_XDECREF
Unexecuted instantiation: _contextvars.c:Py_XDECREF
Python-ast.c:Py_XDECREF
Line
Count
Source
511
312
{
512
312
    if (op != _Py_NULL) {
513
208
        Py_DECREF(op);
514
208
    }
515
312
}
Unexecuted instantiation: Python-tokenize.c:Py_XDECREF
Unexecuted instantiation: asdl.c:Py_XDECREF
assemble.c:Py_XDECREF
Line
Count
Source
511
57.6k
{
512
57.6k
    if (op != _Py_NULL) {
513
57.6k
        Py_DECREF(op);
514
57.6k
    }
515
57.6k
}
Unexecuted instantiation: ast.c:Py_XDECREF
Unexecuted instantiation: ast_preprocess.c:Py_XDECREF
Unexecuted instantiation: ast_unparse.c:Py_XDECREF
Unexecuted instantiation: critical_section.c:Py_XDECREF
Unexecuted instantiation: crossinterp.c:Py_XDECREF
Unexecuted instantiation: getcopyright.c:Py_XDECREF
Unexecuted instantiation: getplatform.c:Py_XDECREF
Unexecuted instantiation: getversion.c:Py_XDECREF
Unexecuted instantiation: optimizer.c:Py_XDECREF
Unexecuted instantiation: pathconfig.c:Py_XDECREF
pegen.c:Py_XDECREF
Line
Count
Source
511
30.5k
{
512
30.5k
    if (op != _Py_NULL) {
513
1.51k
        Py_DECREF(op);
514
1.51k
    }
515
30.5k
}
pegen_errors.c:Py_XDECREF
Line
Count
Source
511
10.6k
{
512
10.6k
    if (op != _Py_NULL) {
513
9.01k
        Py_DECREF(op);
514
9.01k
    }
515
10.6k
}
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
32.3k
{
512
32.3k
    if (op != _Py_NULL) {
513
32.3k
        Py_DECREF(op);
514
32.3k
    }
515
32.3k
}
516
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
517
13.9G
#  define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op))
518
#endif
519
520
// Create a new strong reference to an object:
521
// increment the reference count of the object and return the object.
522
PyAPI_FUNC(PyObject*) Py_NewRef(PyObject *obj);
523
524
// Similar to Py_NewRef(), but the object can be NULL.
525
PyAPI_FUNC(PyObject*) Py_XNewRef(PyObject *obj);
526
527
static inline PyObject* _Py_NewRef(PyObject *obj)
528
15.6G
{
529
15.6G
    Py_INCREF(obj);
530
15.6G
    return obj;
531
15.6G
}
bytesobject.c:_Py_NewRef
Line
Count
Source
528
546k
{
529
546k
    Py_INCREF(obj);
530
546k
    return obj;
531
546k
}
call.c:_Py_NewRef
Line
Count
Source
528
30.3M
{
529
30.3M
    Py_INCREF(obj);
530
30.3M
    return obj;
531
30.3M
}
exceptions.c:_Py_NewRef
Line
Count
Source
528
155M
{
529
155M
    Py_INCREF(obj);
530
155M
    return obj;
531
155M
}
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.33G
{
529
1.33G
    Py_INCREF(obj);
530
1.33G
    return obj;
531
1.33G
}
longobject.c:_Py_NewRef
Line
Count
Source
528
7.54M
{
529
7.54M
    Py_INCREF(obj);
530
7.54M
    return obj;
531
7.54M
}
dictobject.c:_Py_NewRef
Line
Count
Source
528
1.56G
{
529
1.56G
    Py_INCREF(obj);
530
1.56G
    return obj;
531
1.56G
}
memoryobject.c:_Py_NewRef
Line
Count
Source
528
2.91M
{
529
2.91M
    Py_INCREF(obj);
530
2.91M
    return obj;
531
2.91M
}
moduleobject.c:_Py_NewRef
Line
Count
Source
528
6.76k
{
529
6.76k
    Py_INCREF(obj);
530
6.76k
    return obj;
531
6.76k
}
object.c:_Py_NewRef
Line
Count
Source
528
165M
{
529
165M
    Py_INCREF(obj);
530
165M
    return obj;
531
165M
}
Unexecuted instantiation: obmalloc.c:_Py_NewRef
Unexecuted instantiation: picklebufobject.c:_Py_NewRef
rangeobject.c:_Py_NewRef
Line
Count
Source
528
84
{
529
84
    Py_INCREF(obj);
530
84
    return obj;
531
84
}
setobject.c:_Py_NewRef
Line
Count
Source
528
8.11M
{
529
8.11M
    Py_INCREF(obj);
530
8.11M
    return obj;
531
8.11M
}
sliceobject.c:_Py_NewRef
Line
Count
Source
528
88.9M
{
529
88.9M
    Py_INCREF(obj);
530
88.9M
    return obj;
531
88.9M
}
Unexecuted instantiation: structseq.c:_Py_NewRef
templateobject.c:_Py_NewRef
Line
Count
Source
528
4
{
529
4
    Py_INCREF(obj);
530
4
    return obj;
531
4
}
tupleobject.c:_Py_NewRef
Line
Count
Source
528
8.99G
{
529
8.99G
    Py_INCREF(obj);
530
8.99G
    return obj;
531
8.99G
}
typeobject.c:_Py_NewRef
Line
Count
Source
528
151M
{
529
151M
    Py_INCREF(obj);
530
151M
    return obj;
531
151M
}
typevarobject.c:_Py_NewRef
Line
Count
Source
528
188
{
529
188
    Py_INCREF(obj);
530
188
    return obj;
531
188
}
unicode_format.c:_Py_NewRef
Line
Count
Source
528
57.1M
{
529
57.1M
    Py_INCREF(obj);
530
57.1M
    return obj;
531
57.1M
}
Unexecuted instantiation: unicode_formatter.c:_Py_NewRef
unicode_writer.c:_Py_NewRef
Line
Count
Source
528
9.16k
{
529
9.16k
    Py_INCREF(obj);
530
9.16k
    return obj;
531
9.16k
}
Unexecuted instantiation: unicodectype.c:_Py_NewRef
unicodeobject.c:_Py_NewRef
Line
Count
Source
528
201M
{
529
201M
    Py_INCREF(obj);
530
201M
    return obj;
531
201M
}
Unexecuted instantiation: unionobject.c:_Py_NewRef
Unexecuted instantiation: weakrefobject.c:_Py_NewRef
_warnings.c:_Py_NewRef
Line
Count
Source
528
2.68M
{
529
2.68M
    Py_INCREF(obj);
530
2.68M
    return obj;
531
2.68M
}
bltinmodule.c:_Py_NewRef
Line
Count
Source
528
31.7M
{
529
31.7M
    Py_INCREF(obj);
530
31.7M
    return obj;
531
31.7M
}
ceval.c:_Py_NewRef
Line
Count
Source
528
1.60G
{
529
1.60G
    Py_INCREF(obj);
530
1.60G
    return obj;
531
1.60G
}
codecs.c:_Py_NewRef
Line
Count
Source
528
4.76M
{
529
4.76M
    Py_INCREF(obj);
530
4.76M
    return obj;
531
4.76M
}
codegen.c:_Py_NewRef
Line
Count
Source
528
3.43k
{
529
3.43k
    Py_INCREF(obj);
530
3.43k
    return obj;
531
3.43k
}
compile.c:_Py_NewRef
Line
Count
Source
528
128k
{
529
128k
    Py_INCREF(obj);
530
128k
    return obj;
531
128k
}
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
43.6M
{
529
43.6M
    Py_INCREF(obj);
530
43.6M
    return obj;
531
43.6M
}
flowgraph.c:_Py_NewRef
Line
Count
Source
528
114k
{
529
114k
    Py_INCREF(obj);
530
114k
    return obj;
531
114k
}
frame.c:_Py_NewRef
Line
Count
Source
528
36.9M
{
529
36.9M
    Py_INCREF(obj);
530
36.9M
    return obj;
531
36.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.90M
{
529
2.90M
    Py_INCREF(obj);
530
2.90M
    return obj;
531
2.90M
}
Unexecuted instantiation: ceval_gil.c:_Py_NewRef
Unexecuted instantiation: hamt.c:_Py_NewRef
Unexecuted instantiation: hashtable.c:_Py_NewRef
import.c:_Py_NewRef
Line
Count
Source
528
5.77M
{
529
5.77M
    Py_INCREF(obj);
530
5.77M
    return obj;
531
5.77M
}
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
28.0k
{
529
28.0k
    Py_INCREF(obj);
530
28.0k
    return obj;
531
28.0k
}
Unexecuted instantiation: legacy_tracing.c:_Py_NewRef
Unexecuted instantiation: lock.c:_Py_NewRef
marshal.c:_Py_NewRef
Line
Count
Source
528
1.46M
{
529
1.46M
    Py_INCREF(obj);
530
1.46M
    return obj;
531
1.46M
}
Unexecuted instantiation: modsupport.c:_Py_NewRef
Unexecuted instantiation: mysnprintf.c:_Py_NewRef
Unexecuted instantiation: parking_lot.c:_Py_NewRef
Unexecuted instantiation: preconfig.c:_Py_NewRef
Unexecuted instantiation: pyarena.c:_Py_NewRef
Unexecuted instantiation: pyctype.c:_Py_NewRef
Unexecuted instantiation: pyhash.c:_Py_NewRef
pylifecycle.c:_Py_NewRef
Line
Count
Source
528
28
{
529
28
    Py_INCREF(obj);
530
28
    return obj;
531
28
}
Unexecuted instantiation: pymath.c:_Py_NewRef
Unexecuted instantiation: pystate.c:_Py_NewRef
Unexecuted instantiation: pythonrun.c:_Py_NewRef
Unexecuted instantiation: pytime.c:_Py_NewRef
Unexecuted instantiation: qsbr.c:_Py_NewRef
Unexecuted instantiation: bootstrap_hash.c:_Py_NewRef
Unexecuted instantiation: specialize.c:_Py_NewRef
Unexecuted instantiation: structmember.c:_Py_NewRef
symtable.c:_Py_NewRef
Line
Count
Source
528
341k
{
529
341k
    Py_INCREF(obj);
530
341k
    return obj;
531
341k
}
sysmodule.c:_Py_NewRef
Line
Count
Source
528
1.34k
{
529
1.34k
    Py_INCREF(obj);
530
1.34k
    return obj;
531
1.34k
}
Unexecuted instantiation: thread.c:_Py_NewRef
Unexecuted instantiation: traceback.c:_Py_NewRef
Unexecuted instantiation: tracemalloc.c:_Py_NewRef
Unexecuted instantiation: getopt.c:_Py_NewRef
Unexecuted instantiation: pystrcmp.c:_Py_NewRef
Unexecuted instantiation: pystrtod.c:_Py_NewRef
Unexecuted instantiation: pystrhex.c:_Py_NewRef
Unexecuted instantiation: dtoa.c:_Py_NewRef
Unexecuted instantiation: fileutils.c:_Py_NewRef
Unexecuted instantiation: suggestions.c:_Py_NewRef
Unexecuted instantiation: perf_trampoline.c:_Py_NewRef
Unexecuted instantiation: perf_jit_trampoline.c:_Py_NewRef
Unexecuted instantiation: remote_debugging.c:_Py_NewRef
Unexecuted instantiation: dynload_shlib.c:_Py_NewRef
Unexecuted instantiation: config.c:_Py_NewRef
Unexecuted instantiation: gcmodule.c:_Py_NewRef
Unexecuted instantiation: _asynciomodule.c:_Py_NewRef
atexitmodule.c:_Py_NewRef
Line
Count
Source
528
2
{
529
2
    Py_INCREF(obj);
530
2
    return obj;
531
2
}
Unexecuted instantiation: faulthandler.c:_Py_NewRef
posixmodule.c:_Py_NewRef
Line
Count
Source
528
2.02M
{
529
2.02M
    Py_INCREF(obj);
530
2.02M
    return obj;
531
2.02M
}
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
103
{
529
103
    Py_INCREF(obj);
530
103
    return obj;
531
103
}
Unexecuted instantiation: _codecsmodule.c:_Py_NewRef
_collectionsmodule.c:_Py_NewRef
Line
Count
Source
528
25.0M
{
529
25.0M
    Py_INCREF(obj);
530
25.0M
    return obj;
531
25.0M
}
Unexecuted instantiation: errnomodule.c:_Py_NewRef
_iomodule.c:_Py_NewRef
Line
Count
Source
528
353
{
529
353
    Py_INCREF(obj);
530
353
    return obj;
531
353
}
iobase.c:_Py_NewRef
Line
Count
Source
528
116k
{
529
116k
    Py_INCREF(obj);
530
116k
    return obj;
531
116k
}
Unexecuted instantiation: fileio.c:_Py_NewRef
bytesio.c:_Py_NewRef
Line
Count
Source
528
59.5k
{
529
59.5k
    Py_INCREF(obj);
530
59.5k
    return obj;
531
59.5k
}
bufferedio.c:_Py_NewRef
Line
Count
Source
528
11.7k
{
529
11.7k
    Py_INCREF(obj);
530
11.7k
    return obj;
531
11.7k
}
textio.c:_Py_NewRef
Line
Count
Source
528
333k
{
529
333k
    Py_INCREF(obj);
530
333k
    return obj;
531
333k
}
stringio.c:_Py_NewRef
Line
Count
Source
528
22.5k
{
529
22.5k
    Py_INCREF(obj);
530
22.5k
    return obj;
531
22.5k
}
itertoolsmodule.c:_Py_NewRef
Line
Count
Source
528
43.4k
{
529
43.4k
    Py_INCREF(obj);
530
43.4k
    return obj;
531
43.4k
}
sre.c:_Py_NewRef
Line
Count
Source
528
174M
{
529
174M
    Py_INCREF(obj);
530
174M
    return obj;
531
174M
}
Unexecuted instantiation: _sysconfig.c:_Py_NewRef
_threadmodule.c:_Py_NewRef
Line
Count
Source
528
2
{
529
2
    Py_INCREF(obj);
530
2
    return obj;
531
2
}
Unexecuted instantiation: timemodule.c:_Py_NewRef
Unexecuted instantiation: _typesmodule.c:_Py_NewRef
Unexecuted instantiation: _typingmodule.c:_Py_NewRef
Unexecuted instantiation: _weakref.c:_Py_NewRef
_abc.c:_Py_NewRef
Line
Count
Source
528
12.5k
{
529
12.5k
    Py_INCREF(obj);
530
12.5k
    return obj;
531
12.5k
}
_functoolsmodule.c:_Py_NewRef
Line
Count
Source
528
380k
{
529
380k
    Py_INCREF(obj);
530
380k
    return obj;
531
380k
}
Unexecuted instantiation: _localemodule.c:_Py_NewRef
Unexecuted instantiation: _opcode.c:_Py_NewRef
_operator.c:_Py_NewRef
Line
Count
Source
528
1.37M
{
529
1.37M
    Py_INCREF(obj);
530
1.37M
    return obj;
531
1.37M
}
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
761M
{
529
761M
    Py_INCREF(obj);
530
761M
    return obj;
531
761M
}
Unexecuted instantiation: boolobject.c:_Py_NewRef
Unexecuted instantiation: bytes_methods.c:_Py_NewRef
bytearrayobject.c:_Py_NewRef
Line
Count
Source
528
378k
{
529
378k
    Py_INCREF(obj);
530
378k
    return obj;
531
378k
}
Unexecuted instantiation: capsule.c:_Py_NewRef
Unexecuted instantiation: cellobject.c:_Py_NewRef
classobject.c:_Py_NewRef
Line
Count
Source
528
97.5M
{
529
97.5M
    Py_INCREF(obj);
530
97.5M
    return obj;
531
97.5M
}
codeobject.c:_Py_NewRef
Line
Count
Source
528
1.50M
{
529
1.50M
    Py_INCREF(obj);
530
1.50M
    return obj;
531
1.50M
}
Unexecuted instantiation: complexobject.c:_Py_NewRef
descrobject.c:_Py_NewRef
Line
Count
Source
528
23.8M
{
529
23.8M
    Py_INCREF(obj);
530
23.8M
    return obj;
531
23.8M
}
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.7M
{
529
45.7M
    Py_INCREF(obj);
530
45.7M
    return obj;
531
45.7M
}
Unexecuted instantiation: fileobject.c:_Py_NewRef
frameobject.c:_Py_NewRef
Line
Count
Source
528
19.7M
{
529
19.7M
    Py_INCREF(obj);
530
19.7M
    return obj;
531
19.7M
}
funcobject.c:_Py_NewRef
Line
Count
Source
528
35.0M
{
529
35.0M
    Py_INCREF(obj);
530
35.0M
    return obj;
531
35.0M
}
Unexecuted instantiation: interpolationobject.c:_Py_NewRef
iterobject.c:_Py_NewRef
Line
Count
Source
528
2.85M
{
529
2.85M
    Py_INCREF(obj);
530
2.85M
    return obj;
531
2.85M
}
odictobject.c:_Py_NewRef
Line
Count
Source
528
192
{
529
192
    Py_INCREF(obj);
530
192
    return obj;
531
192
}
methodobject.c:_Py_NewRef
Line
Count
Source
528
9.44M
{
529
9.44M
    Py_INCREF(obj);
530
9.44M
    return obj;
531
9.44M
}
Unexecuted instantiation: namespaceobject.c:_Py_NewRef
Unexecuted instantiation: _contextvars.c:_Py_NewRef
Python-ast.c:_Py_NewRef
Line
Count
Source
528
387k
{
529
387k
    Py_INCREF(obj);
530
387k
    return obj;
531
387k
}
Unexecuted instantiation: Python-tokenize.c:_Py_NewRef
Unexecuted instantiation: asdl.c:_Py_NewRef
assemble.c:_Py_NewRef
Line
Count
Source
528
56.2k
{
529
56.2k
    Py_INCREF(obj);
530
56.2k
    return obj;
531
56.2k
}
Unexecuted instantiation: ast.c:_Py_NewRef
Unexecuted instantiation: ast_preprocess.c:_Py_NewRef
Unexecuted instantiation: ast_unparse.c:_Py_NewRef
Unexecuted instantiation: critical_section.c:_Py_NewRef
Unexecuted instantiation: crossinterp.c:_Py_NewRef
Unexecuted instantiation: getcopyright.c:_Py_NewRef
Unexecuted instantiation: getplatform.c:_Py_NewRef
Unexecuted instantiation: getversion.c:_Py_NewRef
Unexecuted instantiation: optimizer.c:_Py_NewRef
Unexecuted instantiation: pathconfig.c:_Py_NewRef
pegen.c:_Py_NewRef
Line
Count
Source
528
18.5k
{
529
18.5k
    Py_INCREF(obj);
530
18.5k
    return obj;
531
18.5k
}
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.78G
{
535
1.78G
    Py_XINCREF(obj);
536
1.78G
    return obj;
537
1.78G
}
Unexecuted instantiation: bytesobject.c:_Py_XNewRef
Unexecuted instantiation: call.c:_Py_XNewRef
exceptions.c:_Py_XNewRef
Line
Count
Source
534
113M
{
535
113M
    Py_XINCREF(obj);
536
113M
    return obj;
537
113M
}
Unexecuted instantiation: genericaliasobject.c:_Py_XNewRef
Unexecuted instantiation: floatobject.c:_Py_XNewRef
listobject.c:_Py_XNewRef
Line
Count
Source
534
7.30M
{
535
7.30M
    Py_XINCREF(obj);
536
7.30M
    return obj;
537
7.30M
}
Unexecuted instantiation: longobject.c:_Py_XNewRef
dictobject.c:_Py_XNewRef
Line
Count
Source
534
715M
{
535
715M
    Py_XINCREF(obj);
536
715M
    return obj;
537
715M
}
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
275k
{
535
275k
    Py_XINCREF(obj);
536
275k
    return obj;
537
275k
}
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
304k
{
535
304k
    Py_XINCREF(obj);
536
304k
    return obj;
537
304k
}
Unexecuted instantiation: _warnings.c:_Py_XNewRef
bltinmodule.c:_Py_XNewRef
Line
Count
Source
534
561
{
535
561
    Py_XINCREF(obj);
536
561
    return obj;
537
561
}
ceval.c:_Py_XNewRef
Line
Count
Source
534
89.6M
{
535
89.6M
    Py_XINCREF(obj);
536
89.6M
    return obj;
537
89.6M
}
Unexecuted instantiation: codecs.c:_Py_XNewRef
Unexecuted instantiation: codegen.c:_Py_XNewRef
compile.c:_Py_XNewRef
Line
Count
Source
534
11.8k
{
535
11.8k
    Py_XINCREF(obj);
536
11.8k
    return obj;
537
11.8k
}
context.c:_Py_XNewRef
Line
Count
Source
534
42
{
535
42
    Py_XINCREF(obj);
536
42
    return obj;
537
42
}
Unexecuted instantiation: errors.c:_Py_XNewRef
Unexecuted instantiation: flowgraph.c:_Py_XNewRef
Unexecuted instantiation: frame.c:_Py_XNewRef
Unexecuted instantiation: future.c:_Py_XNewRef
Unexecuted instantiation: gc.c:_Py_XNewRef
Unexecuted instantiation: gc_gil.c:_Py_XNewRef
Unexecuted instantiation: getargs.c:_Py_XNewRef
Unexecuted instantiation: ceval_gil.c:_Py_XNewRef
Unexecuted instantiation: hamt.c:_Py_XNewRef
Unexecuted instantiation: hashtable.c:_Py_XNewRef
import.c:_Py_XNewRef
Line
Count
Source
534
34.5k
{
535
34.5k
    Py_XINCREF(obj);
536
34.5k
    return obj;
537
34.5k
}
Unexecuted instantiation: importdl.c:_Py_XNewRef
Unexecuted instantiation: initconfig.c:_Py_XNewRef
Unexecuted instantiation: instrumentation.c:_Py_XNewRef
Unexecuted instantiation: instruction_sequence.c:_Py_XNewRef
Unexecuted instantiation: intrinsics.c:_Py_XNewRef
Unexecuted instantiation: legacy_tracing.c:_Py_XNewRef
Unexecuted instantiation: lock.c:_Py_XNewRef
Unexecuted instantiation: marshal.c:_Py_XNewRef
Unexecuted instantiation: modsupport.c:_Py_XNewRef
Unexecuted instantiation: mysnprintf.c:_Py_XNewRef
Unexecuted instantiation: parking_lot.c:_Py_XNewRef
Unexecuted instantiation: preconfig.c:_Py_XNewRef
Unexecuted instantiation: pyarena.c:_Py_XNewRef
Unexecuted instantiation: pyctype.c:_Py_XNewRef
Unexecuted instantiation: pyhash.c:_Py_XNewRef
Unexecuted instantiation: pylifecycle.c:_Py_XNewRef
Unexecuted instantiation: pymath.c:_Py_XNewRef
pystate.c:_Py_XNewRef
Line
Count
Source
534
1.20M
{
535
1.20M
    Py_XINCREF(obj);
536
1.20M
    return obj;
537
1.20M
}
Unexecuted instantiation: pythonrun.c:_Py_XNewRef
Unexecuted instantiation: pytime.c:_Py_XNewRef
Unexecuted instantiation: qsbr.c:_Py_XNewRef
Unexecuted instantiation: bootstrap_hash.c:_Py_XNewRef
Unexecuted instantiation: specialize.c:_Py_XNewRef
structmember.c:_Py_XNewRef
Line
Count
Source
534
1.87M
{
535
1.87M
    Py_XINCREF(obj);
536
1.87M
    return obj;
537
1.87M
}
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
122M
{
535
122M
    Py_XINCREF(obj);
536
122M
    return obj;
537
122M
}
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
190k
{
535
190k
    Py_XINCREF(obj);
536
190k
    return obj;
537
190k
}
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
46.3M
{
535
46.3M
    Py_XINCREF(obj);
536
46.3M
    return obj;
537
46.3M
}
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.54M
{
535
8.54M
    Py_XINCREF(obj);
536
8.54M
    return obj;
537
8.54M
}
Unexecuted instantiation: classobject.c:_Py_XNewRef
codeobject.c:_Py_XNewRef
Line
Count
Source
534
7.73k
{
535
7.73k
    Py_XINCREF(obj);
536
7.73k
    return obj;
537
7.73k
}
Unexecuted instantiation: complexobject.c:_Py_XNewRef
descrobject.c:_Py_XNewRef
Line
Count
Source
534
79.7k
{
535
79.7k
    Py_XINCREF(obj);
536
79.7k
    return obj;
537
79.7k
}
Unexecuted instantiation: enumobject.c:_Py_XNewRef
Unexecuted instantiation: genobject.c:_Py_XNewRef
Unexecuted instantiation: fileobject.c:_Py_XNewRef
frameobject.c:_Py_XNewRef
Line
Count
Source
534
18.5M
{
535
18.5M
    Py_XINCREF(obj);
536
18.5M
    return obj;
537
18.5M
}
funcobject.c:_Py_XNewRef
Line
Count
Source
534
18.7k
{
535
18.7k
    Py_XINCREF(obj);
536
18.7k
    return obj;
537
18.7k
}
Unexecuted instantiation: interpolationobject.c:_Py_XNewRef
Unexecuted instantiation: iterobject.c:_Py_XNewRef
Unexecuted instantiation: odictobject.c:_Py_XNewRef
methodobject.c:_Py_XNewRef
Line
Count
Source
534
655M
{
535
655M
    Py_XINCREF(obj);
536
655M
    return obj;
537
655M
}
Unexecuted instantiation: namespaceobject.c:_Py_XNewRef
Unexecuted instantiation: _contextvars.c:_Py_XNewRef
Unexecuted instantiation: Python-ast.c:_Py_XNewRef
Unexecuted instantiation: Python-tokenize.c:_Py_XNewRef
Unexecuted instantiation: asdl.c:_Py_XNewRef
Unexecuted instantiation: assemble.c:_Py_XNewRef
Unexecuted instantiation: ast.c:_Py_XNewRef
Unexecuted instantiation: ast_preprocess.c:_Py_XNewRef
Unexecuted instantiation: ast_unparse.c:_Py_XNewRef
Unexecuted instantiation: critical_section.c:_Py_XNewRef
Unexecuted instantiation: crossinterp.c:_Py_XNewRef
Unexecuted instantiation: getcopyright.c:_Py_XNewRef
Unexecuted instantiation: getplatform.c:_Py_XNewRef
Unexecuted instantiation: getversion.c:_Py_XNewRef
Unexecuted instantiation: optimizer.c:_Py_XNewRef
Unexecuted instantiation: pathconfig.c:_Py_XNewRef
pegen.c:_Py_XNewRef
Line
Count
Source
534
18.5k
{
535
18.5k
    Py_XINCREF(obj);
536
18.5k
    return obj;
537
18.5k
}
Unexecuted instantiation: pegen_errors.c:_Py_XNewRef
Unexecuted instantiation: parser.c:_Py_XNewRef
Unexecuted instantiation: buffer.c:_Py_XNewRef
Unexecuted instantiation: lexer.c:_Py_XNewRef
Unexecuted instantiation: state.c:_Py_XNewRef
Unexecuted instantiation: readline_tokenizer.c:_Py_XNewRef
Unexecuted instantiation: string_tokenizer.c:_Py_XNewRef
Unexecuted instantiation: utf8_tokenizer.c:_Py_XNewRef
Unexecuted instantiation: getcompiler.c:_Py_XNewRef
Unexecuted instantiation: mystrtoul.c:_Py_XNewRef
Unexecuted instantiation: token.c:_Py_XNewRef
Unexecuted instantiation: action_helpers.c:_Py_XNewRef
Unexecuted instantiation: string_parser.c:_Py_XNewRef
538
539
// Py_NewRef() and Py_XNewRef() are exported as functions for the stable ABI.
540
// Names overridden with macros by static inline functions for best
541
// performances.
542
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
543
15.5G
#  define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj))
544
1.75G
#  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