mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
bpo-36560: Fix reference leak hunting in regrtest (GH-12744)
Fix reference leak hunting in regrtest: compute also deltas (of reference count, allocated memory blocks, file descriptor count) during warmup, to ensure that everything is initialized before starting to hunt reference leaks. Other changes: * Replace gc.collect() with support.gc_collect() * Move calls to read memory statistics from dash_R_cleanup() to dash_R() * Pass regrtest 'ns' to dash_R() * dash_R() is now more quiet with --quiet option (don't display progress). * Precompute the full range for "for it in range(repcount):" to ensure that the iteration doesn't allocate anything new. * dash_R() now is responsible to call warm_caches().
This commit is contained in:
parent
e16467af0b
commit
5aaac94eeb
4 changed files with 46 additions and 33 deletions
|
@ -177,7 +177,7 @@ def runtest_inner(ns, test, display_failure=True):
|
|||
raise Exception("errors while loading tests")
|
||||
support.run_unittest(tests)
|
||||
if ns.huntrleaks:
|
||||
refleak = dash_R(the_module, test, test_runner, ns.huntrleaks)
|
||||
refleak = dash_R(ns, the_module, test, test_runner)
|
||||
else:
|
||||
test_runner()
|
||||
test_time = time.perf_counter() - start_time
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue