From 23ec55e3a505d9fca611d6554ee0c82327cca267 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Fri, 9 Dec 2022 12:12:00 -0700 Subject: [PATCH 1/6] Add struct _tracemalloc_runtime_state. --- Include/internal/pycore_pymem.h | 22 ------------ Include/internal/pycore_runtime.h | 5 ++- Include/internal/pycore_runtime_init.h | 4 +-- Include/internal/pycore_tracemalloc.h | 48 ++++++++++++++++++++++++++ Makefile.pre.in | 1 + PCbuild/pythoncore.vcxproj | 1 + PCbuild/pythoncore.vcxproj.filters | 3 ++ 7 files changed, 56 insertions(+), 28 deletions(-) create mode 100644 Include/internal/pycore_tracemalloc.h diff --git a/Include/internal/pycore_pymem.h b/Include/internal/pycore_pymem.h index 5749af7465f6f0..4cc953d8d779c9 100644 --- a/Include/internal/pycore_pymem.h +++ b/Include/internal/pycore_pymem.h @@ -90,28 +90,6 @@ PyAPI_FUNC(int) _PyMem_GetAllocatorName( PYMEM_ALLOCATOR_NOT_SET does nothing. */ PyAPI_FUNC(int) _PyMem_SetupAllocators(PyMemAllocatorName allocator); -struct _PyTraceMalloc_Config { - /* Module initialized? - Variable protected by the GIL */ - enum { - TRACEMALLOC_NOT_INITIALIZED, - TRACEMALLOC_INITIALIZED, - TRACEMALLOC_FINALIZED - } initialized; - - /* Is tracemalloc tracing memory allocations? - Variable protected by the GIL */ - int tracing; - - /* limit of the number of frames in a traceback, 1 by default. - Variable protected by the GIL. */ - int max_nframe; -}; - -#define _PyTraceMalloc_Config_INIT \ - {.initialized = TRACEMALLOC_NOT_INITIALIZED, \ - .tracing = 0, \ - .max_nframe = 1} #ifdef __cplusplus } diff --git a/Include/internal/pycore_runtime.h b/Include/internal/pycore_runtime.h index fe2de5feb47ae3..99ec6fc8862b93 100644 --- a/Include/internal/pycore_runtime.h +++ b/Include/internal/pycore_runtime.h @@ -23,6 +23,7 @@ extern "C" { #include "pycore_pythread.h" // struct _pythread_runtime_state #include "pycore_obmalloc.h" // struct obmalloc_state #include "pycore_time.h" // struct _time_runtime_state +#include "pycore_tracemalloc.h" // struct _tracemalloc_runtime_state #include "pycore_unicodeobject.h" // struct _Py_unicode_runtime_ids struct _getargs_runtime_state { @@ -137,11 +138,9 @@ typedef struct pyruntimestate { struct _ceval_runtime_state ceval; struct _gilstate_runtime_state gilstate; struct _getargs_runtime_state getargs; - struct { - struct _PyTraceMalloc_Config config; - } tracemalloc; struct _dtoa_runtime_state dtoa; struct _fileutils_state fileutils; + struct _tracemalloc_runtime_state tracemalloc; PyPreConfig preconfig; diff --git a/Include/internal/pycore_runtime_init.h b/Include/internal/pycore_runtime_init.h index b569e5833f1da6..029357dedf3ea4 100644 --- a/Include/internal/pycore_runtime_init.h +++ b/Include/internal/pycore_runtime_init.h @@ -50,13 +50,11 @@ extern "C" { in accordance with the specification. */ \ .autoTSSkey = Py_tss_NEEDS_INIT, \ }, \ - .tracemalloc = { \ - .config = _PyTraceMalloc_Config_INIT, \ - }, \ .dtoa = _dtoa_runtime_state_INIT(runtime), \ .fileutils = { \ .force_ascii = -1, \ }, \ + .tracemalloc = _tracemalloc_runtime_state_INIT, \ .float_state = { \ .float_format = _py_float_format_unknown, \ .double_format = _py_float_format_unknown, \ diff --git a/Include/internal/pycore_tracemalloc.h b/Include/internal/pycore_tracemalloc.h new file mode 100644 index 00000000000000..1315ff86939282 --- /dev/null +++ b/Include/internal/pycore_tracemalloc.h @@ -0,0 +1,48 @@ +#ifndef Py_INTERNAL_TRACEMALLOC_H +#define Py_INTERNAL_TRACEMALLOC_H +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef Py_BUILD_CORE +# error "this header requires Py_BUILD_CORE define" +#endif + + +struct _PyTraceMalloc_Config { + /* Module initialized? + Variable protected by the GIL */ + enum { + TRACEMALLOC_NOT_INITIALIZED, + TRACEMALLOC_INITIALIZED, + TRACEMALLOC_FINALIZED + } initialized; + + /* Is tracemalloc tracing memory allocations? + Variable protected by the GIL */ + int tracing; + + /* limit of the number of frames in a traceback, 1 by default. + Variable protected by the GIL. */ + int max_nframe; +}; + + +struct _tracemalloc_runtime_state { + struct _PyTraceMalloc_Config config; +}; + +#define _tracemalloc_runtime_state_INIT \ + { \ + .config = { \ + .initialized = TRACEMALLOC_NOT_INITIALIZED, \ + .tracing = 0, \ + .max_nframe = 1, \ + }, \ + } + + +#ifdef __cplusplus +} +#endif +#endif // !Py_INTERNAL_TRACEMALLOC_H diff --git a/Makefile.pre.in b/Makefile.pre.in index de42d684f16602..6f4e8b74bc431a 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1677,6 +1677,7 @@ PYTHON_HEADERS= \ $(srcdir)/Include/internal/pycore_time.h \ $(srcdir)/Include/internal/pycore_token.h \ $(srcdir)/Include/internal/pycore_traceback.h \ + $(srcdir)/Include/internal/pycore_tracemalloc.h \ $(srcdir)/Include/internal/pycore_tuple.h \ $(srcdir)/Include/internal/pycore_typeobject.h \ $(srcdir)/Include/internal/pycore_ucnhash.h \ diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index 35fbff320f4661..25572d6ebcd5d6 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -259,6 +259,7 @@ + diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters index 19cb5cf1c80735..d45b50c5d62d76 100644 --- a/PCbuild/pythoncore.vcxproj.filters +++ b/PCbuild/pythoncore.vcxproj.filters @@ -678,6 +678,9 @@ Include\internal + + Include\internal + Include\internal From efad7242b07ccf2ac849c0c9d2b324cf359e2006 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Fri, 9 Dec 2022 12:29:42 -0700 Subject: [PATCH 2/6] Move the tracemalloc allocators to _PyRuntimeState. --- Include/internal/pycore_tracemalloc.h | 6 ++++++ Modules/_tracemalloc.c | 7 +------ Tools/c-analyzer/cpython/globals-to-fix.tsv | 1 - 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Include/internal/pycore_tracemalloc.h b/Include/internal/pycore_tracemalloc.h index 1315ff86939282..dc7bd6431c93e6 100644 --- a/Include/internal/pycore_tracemalloc.h +++ b/Include/internal/pycore_tracemalloc.h @@ -30,6 +30,12 @@ struct _PyTraceMalloc_Config { struct _tracemalloc_runtime_state { struct _PyTraceMalloc_Config config; + /* Protected by the GIL */ + struct { + PyMemAllocatorEx mem; + PyMemAllocatorEx raw; + PyMemAllocatorEx obj; + } allocators; }; #define _tracemalloc_runtime_state_INIT \ diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c index 0d70f0cf34c8d6..8c1576256c42bc 100644 --- a/Modules/_tracemalloc.c +++ b/Modules/_tracemalloc.c @@ -35,12 +35,7 @@ static void raw_free(void *ptr); #define TO_PTR(key) ((const void *)(uintptr_t)(key)) #define FROM_PTR(key) ((uintptr_t)(key)) -/* Protected by the GIL */ -static struct { - PyMemAllocatorEx mem; - PyMemAllocatorEx raw; - PyMemAllocatorEx obj; -} allocators; +#define allocators _PyRuntime.tracemalloc.allocators #if defined(TRACE_RAW_MALLOC) diff --git a/Tools/c-analyzer/cpython/globals-to-fix.tsv b/Tools/c-analyzer/cpython/globals-to-fix.tsv index 94e9831db1fdb6..387e48ad9d4d32 100644 --- a/Tools/c-analyzer/cpython/globals-to-fix.tsv +++ b/Tools/c-analyzer/cpython/globals-to-fix.tsv @@ -377,7 +377,6 @@ Modules/faulthandler.c - old_stack - ##----------------------- ## state -Modules/_tracemalloc.c - allocators - Modules/_tracemalloc.c - tables_lock - Modules/_tracemalloc.c - tracemalloc_empty_traceback - Modules/_tracemalloc.c - tracemalloc_traced_memory - From 43e66af99edfad0ce7c1bfed66bc52920ea105e0 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Fri, 9 Dec 2022 13:36:21 -0700 Subject: [PATCH 3/6] Move tables_lock to _PyRuntimeState. --- Include/internal/pycore_tracemalloc.h | 7 +++++++ Modules/_tracemalloc.c | 5 +---- Tools/c-analyzer/cpython/globals-to-fix.tsv | 1 - 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Include/internal/pycore_tracemalloc.h b/Include/internal/pycore_tracemalloc.h index dc7bd6431c93e6..384b5ae984fc6c 100644 --- a/Include/internal/pycore_tracemalloc.h +++ b/Include/internal/pycore_tracemalloc.h @@ -9,6 +9,10 @@ extern "C" { #endif +/* Trace memory blocks allocated by PyMem_RawMalloc() */ +#define TRACE_RAW_MALLOC + + struct _PyTraceMalloc_Config { /* Module initialized? Variable protected by the GIL */ @@ -36,6 +40,9 @@ struct _tracemalloc_runtime_state { PyMemAllocatorEx raw; PyMemAllocatorEx obj; } allocators; +#if defined(TRACE_RAW_MALLOC) + PyThread_type_lock tables_lock; +#endif }; #define _tracemalloc_runtime_state_INIT \ diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c index 8c1576256c42bc..9ba9b311fa1681 100644 --- a/Modules/_tracemalloc.c +++ b/Modules/_tracemalloc.c @@ -20,9 +20,6 @@ module _tracemalloc _Py_DECLARE_STR(anon_unknown, ""); -/* Trace memory blocks allocated by PyMem_RawMalloc() */ -#define TRACE_RAW_MALLOC - /* Forward declaration */ static void tracemalloc_stop(void); static void* raw_malloc(size_t size); @@ -42,7 +39,7 @@ static void raw_free(void *ptr); /* This lock is needed because tracemalloc_free() is called without the GIL held from PyMem_RawFree(). It cannot acquire the lock because it would introduce a deadlock in _PyThreadState_DeleteCurrent(). */ -static PyThread_type_lock tables_lock; +# define tables_lock _PyRuntime.tracemalloc.tables_lock # define TABLES_LOCK() PyThread_acquire_lock(tables_lock, 1) # define TABLES_UNLOCK() PyThread_release_lock(tables_lock) #else diff --git a/Tools/c-analyzer/cpython/globals-to-fix.tsv b/Tools/c-analyzer/cpython/globals-to-fix.tsv index 387e48ad9d4d32..f4e6ca2a482f2c 100644 --- a/Tools/c-analyzer/cpython/globals-to-fix.tsv +++ b/Tools/c-analyzer/cpython/globals-to-fix.tsv @@ -377,7 +377,6 @@ Modules/faulthandler.c - old_stack - ##----------------------- ## state -Modules/_tracemalloc.c - tables_lock - Modules/_tracemalloc.c - tracemalloc_empty_traceback - Modules/_tracemalloc.c - tracemalloc_traced_memory - Modules/_tracemalloc.c - tracemalloc_peak_traced_memory - From 0f84737bf2917327057f6aa671f8f864b48a15a4 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Fri, 9 Dec 2022 13:54:37 -0700 Subject: [PATCH 4/6] Move most of the tracemalloc_* globals to _PyRuntimeState. --- Include/internal/pycore_tracemalloc.h | 53 +++++++++++++++++ Modules/_tracemalloc.c | 65 +++------------------ Tools/c-analyzer/cpython/globals-to-fix.tsv | 7 --- 3 files changed, 62 insertions(+), 63 deletions(-) diff --git a/Include/internal/pycore_tracemalloc.h b/Include/internal/pycore_tracemalloc.h index 384b5ae984fc6c..baa4beeba5d7ee 100644 --- a/Include/internal/pycore_tracemalloc.h +++ b/Include/internal/pycore_tracemalloc.h @@ -8,6 +8,8 @@ extern "C" { # error "this header requires Py_BUILD_CORE define" #endif +#include "pycore_hashtable.h" // _Py_hashtable_t + /* Trace memory blocks allocated by PyMem_RawMalloc() */ #define TRACE_RAW_MALLOC @@ -32,6 +34,34 @@ struct _PyTraceMalloc_Config { }; +/* Pack the frame_t structure to reduce the memory footprint on 64-bit + architectures: 12 bytes instead of 16. */ +struct +#ifdef __GNUC__ +__attribute__((packed)) +#elif defined(_MSC_VER) +#pragma pack(push, 4) +#endif +tracemalloc_frame { + /* filename cannot be NULL: "" is used if the Python frame + filename is NULL */ + PyObject *filename; + unsigned int lineno; +}; +#ifdef _MSC_VER +#pragma pack(pop) +#endif + +struct tracemalloc_traceback { + Py_uhash_t hash; + /* Number of frames stored */ + uint16_t nframe; + /* Total number of frames the traceback had */ + uint16_t total_nframe; + struct tracemalloc_frame frames[1]; +}; + + struct _tracemalloc_runtime_state { struct _PyTraceMalloc_Config config; /* Protected by the GIL */ @@ -43,6 +73,29 @@ struct _tracemalloc_runtime_state { #if defined(TRACE_RAW_MALLOC) PyThread_type_lock tables_lock; #endif + /* Size in bytes of currently traced memory. + Protected by TABLES_LOCK(). */ + size_t traced_memory; + /* Peak size in bytes of traced memory. + Protected by TABLES_LOCK(). */ + size_t peak_traced_memory; + /* Hash table used as a set to intern filenames: + PyObject* => PyObject*. + Protected by the GIL */ + _Py_hashtable_t *filenames; + /* Buffer to store a new traceback in traceback_new(). + Protected by the GIL. */ + struct tracemalloc_traceback *traceback; + /* Hash table used as a set to intern tracebacks: + traceback_t* => traceback_t* + Protected by the GIL */ + _Py_hashtable_t *tracebacks; + /* pointer (void*) => trace (trace_t*). + Protected by TABLES_LOCK(). */ + _Py_hashtable_t *traces; + /* domain (unsigned int) => traces (_Py_hashtable_t). + Protected by TABLES_LOCK(). */ + _Py_hashtable_t *domains; }; #define _tracemalloc_runtime_state_INIT \ diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c index 9ba9b311fa1681..07eee168e94a31 100644 --- a/Modules/_tracemalloc.c +++ b/Modules/_tracemalloc.c @@ -51,33 +51,8 @@ static void raw_free(void *ptr); #define DEFAULT_DOMAIN 0 -/* Pack the frame_t structure to reduce the memory footprint on 64-bit - architectures: 12 bytes instead of 16. */ -typedef struct -#ifdef __GNUC__ -__attribute__((packed)) -#elif defined(_MSC_VER) -#pragma pack(push, 4) -#endif -{ - /* filename cannot be NULL: "" is used if the Python frame - filename is NULL */ - PyObject *filename; - unsigned int lineno; -} frame_t; -#ifdef _MSC_VER -#pragma pack(pop) -#endif - - -typedef struct { - Py_uhash_t hash; - /* Number of frames stored */ - uint16_t nframe; - /* Total number of frames the traceback had */ - uint16_t total_nframe; - frame_t frames[1]; -} traceback_t; +typedef struct tracemalloc_frame frame_t; +typedef struct tracemalloc_traceback traceback_t; #define TRACEBACK_SIZE(NFRAME) \ (sizeof(traceback_t) + sizeof(frame_t) * (NFRAME - 1)) @@ -100,35 +75,13 @@ typedef struct { } trace_t; -/* Size in bytes of currently traced memory. - Protected by TABLES_LOCK(). */ -static size_t tracemalloc_traced_memory = 0; - -/* Peak size in bytes of traced memory. - Protected by TABLES_LOCK(). */ -static size_t tracemalloc_peak_traced_memory = 0; - -/* Hash table used as a set to intern filenames: - PyObject* => PyObject*. - Protected by the GIL */ -static _Py_hashtable_t *tracemalloc_filenames = NULL; - -/* Buffer to store a new traceback in traceback_new(). - Protected by the GIL. */ -static traceback_t *tracemalloc_traceback = NULL; - -/* Hash table used as a set to intern tracebacks: - traceback_t* => traceback_t* - Protected by the GIL */ -static _Py_hashtable_t *tracemalloc_tracebacks = NULL; - -/* pointer (void*) => trace (trace_t*). - Protected by TABLES_LOCK(). */ -static _Py_hashtable_t *tracemalloc_traces = NULL; - -/* domain (unsigned int) => traces (_Py_hashtable_t). - Protected by TABLES_LOCK(). */ -static _Py_hashtable_t *tracemalloc_domains = NULL; +#define tracemalloc_traced_memory _PyRuntime.tracemalloc.traced_memory +#define tracemalloc_peak_traced_memory _PyRuntime.tracemalloc.peak_traced_memory +#define tracemalloc_filenames _PyRuntime.tracemalloc.filenames +#define tracemalloc_traceback _PyRuntime.tracemalloc.traceback +#define tracemalloc_tracebacks _PyRuntime.tracemalloc.tracebacks +#define tracemalloc_traces _PyRuntime.tracemalloc.traces +#define tracemalloc_domains _PyRuntime.tracemalloc.domains #ifdef TRACE_DEBUG diff --git a/Tools/c-analyzer/cpython/globals-to-fix.tsv b/Tools/c-analyzer/cpython/globals-to-fix.tsv index f4e6ca2a482f2c..ded17fd3fc0e05 100644 --- a/Tools/c-analyzer/cpython/globals-to-fix.tsv +++ b/Tools/c-analyzer/cpython/globals-to-fix.tsv @@ -378,13 +378,6 @@ Modules/faulthandler.c - old_stack - ## state Modules/_tracemalloc.c - tracemalloc_empty_traceback - -Modules/_tracemalloc.c - tracemalloc_traced_memory - -Modules/_tracemalloc.c - tracemalloc_peak_traced_memory - -Modules/_tracemalloc.c - tracemalloc_filenames - -Modules/_tracemalloc.c - tracemalloc_traceback - -Modules/_tracemalloc.c - tracemalloc_tracebacks - -Modules/_tracemalloc.c - tracemalloc_traces - -Modules/_tracemalloc.c - tracemalloc_domains - Modules/_tracemalloc.c - tracemalloc_reentrant_key - Modules/faulthandler.c faulthandler_dump_traceback reentrant - Modules/signalmodule.c - is_tripped - From 75528df1f75b3a991f5b58170345b9f6e4040802 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Fri, 9 Dec 2022 14:00:23 -0700 Subject: [PATCH 5/6] Move tracemalloc_reentrant_key to _PyRuntimeState. --- Include/internal/pycore_tracemalloc.h | 5 +++++ Modules/_tracemalloc.c | 2 +- Tools/c-analyzer/cpython/globals-to-fix.tsv | 1 - 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Include/internal/pycore_tracemalloc.h b/Include/internal/pycore_tracemalloc.h index baa4beeba5d7ee..71533056bc73ff 100644 --- a/Include/internal/pycore_tracemalloc.h +++ b/Include/internal/pycore_tracemalloc.h @@ -64,12 +64,14 @@ struct tracemalloc_traceback { struct _tracemalloc_runtime_state { struct _PyTraceMalloc_Config config; + /* Protected by the GIL */ struct { PyMemAllocatorEx mem; PyMemAllocatorEx raw; PyMemAllocatorEx obj; } allocators; + #if defined(TRACE_RAW_MALLOC) PyThread_type_lock tables_lock; #endif @@ -96,6 +98,8 @@ struct _tracemalloc_runtime_state { /* domain (unsigned int) => traces (_Py_hashtable_t). Protected by TABLES_LOCK(). */ _Py_hashtable_t *domains; + + Py_tss_t reentrant_key; }; #define _tracemalloc_runtime_state_INIT \ @@ -105,6 +109,7 @@ struct _tracemalloc_runtime_state { .tracing = 0, \ .max_nframe = 1, \ }, \ + .reentrant_key = Py_tss_NEEDS_INIT, \ } diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c index 07eee168e94a31..ec9ff44b98a074 100644 --- a/Modules/_tracemalloc.c +++ b/Modules/_tracemalloc.c @@ -102,7 +102,7 @@ tracemalloc_error(const char *format, ...) #if defined(TRACE_RAW_MALLOC) #define REENTRANT_THREADLOCAL -static Py_tss_t tracemalloc_reentrant_key = Py_tss_NEEDS_INIT; +#define tracemalloc_reentrant_key _PyRuntime.tracemalloc.reentrant_key /* Any non-NULL pointer can be used */ #define REENTRANT Py_True diff --git a/Tools/c-analyzer/cpython/globals-to-fix.tsv b/Tools/c-analyzer/cpython/globals-to-fix.tsv index ded17fd3fc0e05..7b0418b31e56e3 100644 --- a/Tools/c-analyzer/cpython/globals-to-fix.tsv +++ b/Tools/c-analyzer/cpython/globals-to-fix.tsv @@ -378,7 +378,6 @@ Modules/faulthandler.c - old_stack - ## state Modules/_tracemalloc.c - tracemalloc_empty_traceback - -Modules/_tracemalloc.c - tracemalloc_reentrant_key - Modules/faulthandler.c faulthandler_dump_traceback reentrant - Modules/signalmodule.c - is_tripped - Modules/signalmodule.c - signal_global_state - From 95f51a21d2fcaa571dc7880a497840156ae50ea5 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Fri, 9 Dec 2022 14:02:37 -0700 Subject: [PATCH 6/6] Move tracemalloc_empty_traceback to _PyRuntimeState. --- Include/internal/pycore_tracemalloc.h | 2 ++ Modules/_tracemalloc.c | 3 ++- Tools/c-analyzer/cpython/globals-to-fix.tsv | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Include/internal/pycore_tracemalloc.h b/Include/internal/pycore_tracemalloc.h index 71533056bc73ff..08d7d1096c78ce 100644 --- a/Include/internal/pycore_tracemalloc.h +++ b/Include/internal/pycore_tracemalloc.h @@ -99,6 +99,8 @@ struct _tracemalloc_runtime_state { Protected by TABLES_LOCK(). */ _Py_hashtable_t *domains; + struct tracemalloc_traceback empty_traceback; + Py_tss_t reentrant_key; }; diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c index ec9ff44b98a074..ac16626f2101ba 100644 --- a/Modules/_tracemalloc.c +++ b/Modules/_tracemalloc.c @@ -63,7 +63,8 @@ typedef struct tracemalloc_traceback traceback_t; static const unsigned long MAX_NFRAME = Py_MIN(UINT16_MAX, ((SIZE_MAX - sizeof(traceback_t)) / sizeof(frame_t) + 1)); -static traceback_t tracemalloc_empty_traceback; +#define tracemalloc_empty_traceback _PyRuntime.tracemalloc.empty_traceback + /* Trace of a memory block */ typedef struct { diff --git a/Tools/c-analyzer/cpython/globals-to-fix.tsv b/Tools/c-analyzer/cpython/globals-to-fix.tsv index 7b0418b31e56e3..5dcd396c5487e3 100644 --- a/Tools/c-analyzer/cpython/globals-to-fix.tsv +++ b/Tools/c-analyzer/cpython/globals-to-fix.tsv @@ -377,7 +377,6 @@ Modules/faulthandler.c - old_stack - ##----------------------- ## state -Modules/_tracemalloc.c - tracemalloc_empty_traceback - Modules/faulthandler.c faulthandler_dump_traceback reentrant - Modules/signalmodule.c - is_tripped - Modules/signalmodule.c - signal_global_state -