* Optimize tracemalloc_add_trace(): modify hashtable entry data (trace) if the
  memory block is already tracked, rather than trying to remove the old trace
  and then add a new trace.
* Add _Py_HASHTABLE_ENTRY_WRITE_DATA() macro
This commit is contained in:
Victor Stinner 2016-03-23 09:38:54 +01:00
parent e8c6b2fd1b
commit ca79ccd9e6
3 changed files with 31 additions and 12 deletions

View file

@ -34,7 +34,7 @@ typedef unsigned int _PyTraceMalloc_domain_t;
Return -2 if tracemalloc is disabled.
If memory block was already tracked, begin by removing the old trace. */
If memory block is already tracked, update the existing trace. */
PyAPI_FUNC(int) _PyTraceMalloc_Track(
_PyTraceMalloc_domain_t domain,
Py_uintptr_t ptr,