aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_tracemalloc.py
Commit message (Collapse)AuthorAge
* bpo-32121: Add most_recent_first parameter to tracemalloc.Traceback.format ↵Jesse-Bakker2017-11-30
| | | | | | | | (#4534) * Add most_recent_first parameter to tracemalloc.Traceback.format to allow reversing the order of the frames in the output * Reversed default sorting of tracemalloc.Traceback frames * Allowed negative limit, truncating from the other side.
* bpo-32030: Enhance Py_Main() (#4412)Victor Stinner2017-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parse more env vars in Py_Main(): * Add more options to _PyCoreConfig: * faulthandler * tracemalloc * importtime * Move code to parse environment variables from _Py_InitializeCore() to Py_Main(). This change fixes a regression from Python 3.6: PYTHONUNBUFFERED is now read before calling pymain_init_stdio(). * _PyFaulthandler_Init() and _PyTraceMalloc_Init() now take an argument to decide if the module has to be enabled at startup. * tracemalloc_start() is now responsible to check the maximum number of frames. Other changes: * Cleanup Py_Main(): * Rename some pymain_xxx() subfunctions * Add pymain_run_python() subfunction * Cleanup Py_NewInterpreter() * _PyInterpreterState_Enable() now reports failure * init_hash_secret() now considers pyurandom() failure as an "user error": don't fail with abort(). * pymain_optlist_append() and pymain_strdup() now sets err on memory allocation failure.
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-07
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* bpo-29845: Mark tests that use _testcapi as CPython-only (#711)Serhiy Storchaka2017-03-19
|
* Merge doc and comment fixes from 3.5Martin Panter2016-04-19
|\
| * Fix spelling (inital), grammar (may translates) in documentation, commentsMartin Panter2016-04-19
| |
* | Issue #26588: remove debug traces from _tracemalloc.Victor Stinner2016-03-22
| |
* | Issue #26588: add debug tracesVictor Stinner2016-03-22
| | | | | | | | Try to debug random failure on buildbots.
* | Add C functions _PyTraceMalloc_Track()Victor Stinner2016-03-22
| | | | | | | | | | | | | | | | Issue #26530: * Add C functions _PyTraceMalloc_Track() and _PyTraceMalloc_Untrack() to track memory blocks using the tracemalloc module. * Add _PyTraceMalloc_GetTraceback() to get the traceback of an object.
* | tracemalloc now supports domainsVictor Stinner2016-03-22
|/ | | | | | | | | | | | | | | | | Issue #26588: * The _tracemalloc now supports tracing memory allocations of multiple address spaces (domains). * Add domain parameter to tracemalloc_add_trace() and tracemalloc_remove_trace(). * tracemalloc_add_trace() now starts by removing the previous trace, if any. * _tracemalloc._get_traces() now returns a list of (domain, size, traceback_frames): the domain is new. * Add tracemalloc.DomainFilter * tracemalloc.Filter: add an optional domain parameter to the constructor and a domain attribute * Sublte change: use Py_uintptr_t rather than void* in the traces key. * Add tracemalloc_config.use_domain, currently hardcoded to 1
* Issue #23731: Fix tracemalloc test on Windows.Zachary Ware2015-05-13
| | | | 'a.pyo' can no longer match 'a.py', so 'a.PYO' can't either.
* Issue #9517: Move script_helper to the support package.Berker Peksag2015-05-06
| | | | Patch by Christie Wilson.
* Issue #23731: Implement PEP 488.Brett Cannon2015-04-13
| | | | | | The concept of .pyo files no longer exists. Now .pyc files have an optional `opt-` tag which specifies if any extra optimizations beyond the peepholer were applied.
* Skip some tests that require a subinterpreter launched with -E or -I when theGregory P. Smith2015-02-04
|\ | | | | | | | | | | | | | | interpreter under test is being run in an environment that requires the use of environment variables such as PYTHONHOME in order to function at all. Adds a test.script_helper.interpreter_requires_environment() function to be used with @unittest.skipIf on stdlib test methods requiring this.
| * Skip some tests that require a subinterpreter launched with -E or -I when theGregory P. Smith2015-02-04
|/ | | | | | | | interpreter under test is being run in an environment that requires the use of environment variables such as PYTHONHOME in order to function at all. Adds a private test.script_helper._interpreter_requires_environment() function to be used with @unittest.skipIf on stdlib test methods requiring this.
* Break up TestCommandLine.test_env_var into four distinct tests.Gregory P. Smith2015-01-22
|
* Issue #21639: Add a test to check that PyMem_Malloc(0) with tracemalloc enabledVictor Stinner2014-06-02
| | | | does not crash.
* tracemalloc: filter_traces() raises a TypeError if filters is not an iterableVictor Stinner2014-03-10
|
* Issue #20616: Add a format() method to tracemalloc.Traceback.Victor Stinner2014-02-16
|
* tracemalloc: Fix slicing traces and fix slicing a traceback.Victor Stinner2014-02-01
|
* Closes #19786: tracemalloc, remove the arbitrary limit of 100 framesVictor Stinner2013-11-27
| | | | | | | | The limit is now 178,956,969 on 64 bit (it is greater on 32 bit because structures are smaller). Use int instead of Py_ssize_t to store the number of frames to have smaller traceback_t objects.
* Close #19798: replace "maximum" term with "peak" in get_traced_memory()Victor Stinner2013-11-27
| | | | documentation. Use also the term "current" for the current size.
* Cleanup test_tracemalloc.py. Patch written by Vajrasky Kok.Victor Stinner2013-11-25
|
* Issue #18874: Remove tracemalloc.set_traceback_limit()Victor Stinner2013-11-23
| | | | tracemalloc.start() now has an option nframe parameter
* Issue #18874: Implement the PEP 454 (tracemalloc)Victor Stinner2013-11-23