]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-128679: Redesign tracemalloc locking (#128888)
authorVictor Stinner <vstinner@python.org>
Wed, 15 Jan 2025 20:22:44 +0000 (21:22 +0100)
committerGitHub <noreply@github.com>
Wed, 15 Jan 2025 20:22:44 +0000 (20:22 +0000)
commit36c5e3bcc25700645d19eba65dcdf22acd99a7a8
treeca64b1a7a0cb8b37c35550b53f9ffd5e4dbc82b7
parent080f444a58dae1bb76a87ce746a09fd499792cfb
gh-128679: Redesign tracemalloc locking (#128888)

* Use TABLES_LOCK() to protect 'tracemalloc_config.tracing'.
* Hold TABLES_LOCK() longer while accessing tables.
* tracemalloc_realloc() and tracemalloc_free() no longer
  remove the trace on reentrant call.
* _PyTraceMalloc_Stop() unregisters _PyTraceMalloc_TraceRef().
* _PyTraceMalloc_GetTraces() sets the reentrant flag.
* tracemalloc_clear_traces_unlocked() sets the reentrant flag.
Include/internal/pycore_object.h
Include/internal/pycore_tracemalloc.h
Modules/_tracemalloc.c
Python/pylifecycle.c
Python/tracemalloc.c