Skip to content

Remove test leak, improve leak check - #5274

Open
davidmorgan wants to merge 2 commits into
dart-lang:masterfrom
davidmorgan:wren/leak-check
Open

davidmorgan wants to merge 2 commits into
dart-lang:masterfrom
davidmorgan:wren/leak-check

Conversation

@davidmorgan

Copy link
Copy Markdown
Contributor

Fix a test-only InputTracker leak; make the leak check measure after warm-up

The leak check failed once at 17,523 bytes/build against a limit of 15,000. A 400,000-build run showed RSS growing ~3 KB per build without bound. The cause was InputTracker.inputTrackersForTesting, a static map that build_test enables; it kept every build's filesystem and trackers alive. Real builds never enable it.

  • Make inputTrackersForTesting an Expando, so trackers are freed with their filesystem. Heap growth after GC falls from 3,010 to 296 bytes/build; the rest is JIT code and the profiler's own objects.
  • Make the leak checker warm up for 5,000 builds before measuring the next 5,000, so it measures growth rather than cache fill. Five runs read -611, 974, -189, -453, -634; the limit drops from 15,000 to 2,000.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant