8000 bpo-36560: Fix reference leak huting in regrtest by vstinner · Pull Request #12744 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-36560: Fix reference leak huting in regrtest #12744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2019
Merged

bpo-36560: Fix reference leak huting in regrtest #12744

merged 1 commit into from
Apr 9, 2019

Conversation

vstinner
Copy link
Member
@vstinner vstinner commented Apr 9, 2019

dash_R() now always fill "deltas" variables, not only for
i >= nwarmup, to fill all caches earlier.

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().

https://bugs.python.org/issue36560

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.

dash_R() now always fill "deltas" variables, not only for
i >= nwarmup, to fill all caches earlier.

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().
@vstinner vstinner merged commit 5aaac94 into python:master Apr 9, 2019
@vstinner vstinner deleted the refleak_fix branch April 9, 2019 12:26
@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

vstinner added a commit that referenced this pull request Apr 9, 2019
Fix reference leak hunting in regrtest: compute also deltas (of
reference count and 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() in clear_caches()
* 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().

(cherry picked from commit 5aaac94)
vstinner added a commit that referenced this pull request Apr 9, 2019
…12749)

* 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().

(cherry picked from commit 5aaac94)

* bpo-36560: regrtest: don't collect the GC twice (GH-12747)

dash_R() function of libregrtest doesn't call support.gc_collect()
directly anymore: it's already called by dash_R_cleanup().

Call dash_R_cleanup() before starting the loop.

(cherry picked from commit bb44478)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0