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.
This commit is contained in:
Victor Stinner 2025-01-15 21:22:44 +01:00 committed by GitHub
parent 080f444a58
commit 36c5e3bcc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 302 additions and 364 deletions

File diff suppressed because it is too large Load diff