Skip to content
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

[DWARFLinker] Release input DWARF after object has been linked (#68376) #7588

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

JDevlieghere
Copy link

dsymutil is using an excessive amount of memory because it's holding on to the DWARF Context, even after it's done processing the corresponding object file. This patch releases the input DWARF after cloning, at which point it is no longer needed. This has always been the intended behavior, though I didn't bisect to figure out when this regressed.

When linking swift, this reduces peak (dirty) memory usage from 25 to 15 gigabytes.

rdar://111525100
(cherry picked from commit 29a1567)

…68376)

dsymutil is using an excessive amount of memory because it's holding on
to the DWARF Context, even after it's done processing the corresponding
object file. This patch releases the input DWARF after cloning, at which
point it is no longer needed. This has always been the intended
behavior, though I didn't bisect to figure out when this regressed.

When linking swift, this reduces peak (dirty) memory usage from 25 to 15
gigabytes.

rdar://111525100
(cherry picked from commit 29a1567)
@JDevlieghere JDevlieghere merged commit 4f759ff into stable/20230725 Oct 6, 2023
@JDevlieghere JDevlieghere deleted the cherrypick/rebranch/29a1567435ed branch October 6, 2023 15:21
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.

1 participant