[Python-Dev] PEP 454: tracemalloc (n-th version) (original) (raw)
Victor Stinner victor.stinner at gmail.com
Sun Nov 3 14:34:48 CET 2013
- Previous message: [Python-Dev] cpython (3.2): Update NEWS for 265d369ad3b9.
- Next message: [Python-Dev] PEP 454: tracemalloc (n-th version)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"n-th version": Sorry, I don't remember the version number of the PEP :-)
http://www.python.org/dev/peps/pep-0454/
Lastest changes:
- rename disable/enable/is_enabled() to stop/start/is_tracing()
- Snapshot.apply_filters() now returns a new Snapshot instance
- a traceback now always contains a least 1 frame, use (('', 0),) if the traceback cannot read or if the traceback limit is 0
- Rename Filter.traceback to Filter.all_frames
- write more documentation on filter functions
Charles-François doesn't look convinced that disabling temporarily tracing is useful, me neither. Another concern is that it is not possible to disable completly tracing, only disable tracing new allocations, deallocations are still tracing. I chose a simpler API with limitations.
The PEP is not completly different than my first proposition. Even if the latest PEP has fewer functions and classes, it's almost as powerful. I replaced complex classes and high-level API with short examples in the documentation:
http://www.haypocalc.com/tmp/tracemalloc/library/tracemalloc.html#examples
For the implementation of tracemalloc, see:
http://bugs.python.org/issue18874
Rietveld link to the latest patch:
http://bugs.python.org/review/18874/#ps9797
Victor
- Previous message: [Python-Dev] cpython (3.2): Update NEWS for 265d369ad3b9.
- Next message: [Python-Dev] PEP 454: tracemalloc (n-th version)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]