| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
Always set MAX_NFRAME to UINT16_MAX.
Avoid the complicated code which emitted a compiler warning.
|
| |
|
|
|
|
| |
Move _PyInterpreterFrame and associated functions
to a new pycore_interpframe.h header.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Since tracemalloc uses PyMutex, it becomes safe to use TABLES_LOCK()
even after _PyTraceMalloc_Fini(): remove the "pre-check" in
PyTraceMalloc_Track() and PyTraceMalloc_Untrack().
PyTraceMalloc_Untrack() no longer needs to acquire the GIL.
_PyTraceMalloc_Fini() can be called earlier during Python
finalization.
|
| |
|
|
|
| |
Always build tracemalloc with PyMem_RawMalloc() hooks.
|
|
|
|
|
|
|
|
|
| |
Support calling PyTraceMalloc_Track() and PyTraceMalloc_Untrack()
during late Python finalization.
* Call _PyTraceMalloc_Fini() later in Python finalization.
* Test also PyTraceMalloc_Untrack() without the GIL
* PyTraceMalloc_Untrack() now gets the GIL.
* Test also PyTraceMalloc_Untrack() in test_tracemalloc_track_race().
|
|
|
|
| |
Replace uncommon PyGILState_GetThisThreadState() with common
_PyThreadState_GET().
|
|
|
|
|
| |
state (#128361)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|
|
|
|
|
|
|
| |
tracemalloc_alloc(), tracemalloc_realloc(), tracemalloc_free(),
_PyTraceMalloc_TraceRef() and _PyTraceMalloc_GetMemory() now check
'tracemalloc_config.tracing' after calling TABLES_LOCK().
_PyTraceMalloc_TraceRef() now always returns 0.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
(#123924)
Use a `_PyStackRef` and defer the reference to `f_executable` when
possible. This avoids some reference count contention in the common case
of executing the same code object from multiple threads concurrently in
the free-threaded build.
|
|
|
|
|
|
| |
The tracemalloc_tracebacks hash table has traceback keys and NULL
values, but its destructors do not reflect this -- key_destroy_func is
NULL while value_destroy_func is raw_free. Swap these to free the
traceback keys instead.
|
| |
|
|
|
|
| |
(#115945)
|
|
|
| |
Mention one symbol imported by each #include.
|
|
|
|
| |
Code using _Py_write_noraise() usually cannot report. Ignore errors
is the least surprising behavior for users.
|
|
|
|
|
|
|
|
|
|
| |
internal frame. (GH-105727)
* Add table describing possible executable classes for out-of-process debuggers.
* Remove shim code object creation code as it is no longer needed.
* Make lltrace a bit more robust w.r.t. non-standard frames.
|
|
Modules. (#104508)
|