Repository navigation
Merged
Conversation
…ith its free's backtrace #3087's measurement put 90% of the compiler's 2.6 billion map lookups on 40,178 maps created and freed during one check, and the runtime could not say which. A setting of 2 or more is now also a threshold: a map freed after at least that many lookups is reported at its free, with the backtrace of the free, which names the owner whose drop freed it and so the site that made it.
ehartford
marked this pull request as ready for review
November 8, 2026 20:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #3093 (closed with its measurement). A setting of 2 or more is also a threshold: a map freed after at least that many lookups is reported at its free with the backtrace of the free, which names the owner whose drop freed it. Documented in deep-debugging-tools.md's switch table.
What it found, posted on #3093: the lookup volume is Sema's module-wide tables (61% freed by the compilation's own drop at the end of
main, 28% the D89/D93 re-check rounds', 5% the type-candidate index rebuilt nine times), not many short-lived maps. The two leads are #3099 (the re-check rounds) and #3100 (a tombstone-heavy table with 306M lookups).Stacked on #3098; one battery on this top covers both.