Fix crossgen2 nobubble memory leak#123627
Conversation
--out-near-input and --single-file-compilation options without inputbubble option leads to memory leak. Co-authored-by: Dong-Heon Jung <dheon.jung@samsung.com>
|
It is not clear why the code is clearing this particular table and none of the other ones. This feels very ad-hoc and likely leaving a number of issues behind. What is the state that you want to be preserved between different compilations? |
Between different compilations we want to preserve opened modules: |
|
Would it better to let the whole |
It was intention of #51154: As far as I see, here is loop reference like Along with #23103 it may lead to memory leak. One of solutions discussed in #23103 is clear |
...ot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ManifestMetadataTableNode.cs
Outdated
Show resolved
Hide resolved
src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs
Outdated
Show resolved
Hide resolved
Crossgen2 --out-near-input and --single-file-compilation options without inputbubble option leads to memory leak. This patch reduces memory consumption. Measurement on armel shows reduce peak Rss consumption from 825 Mb to 312 Mb for launch: ``` ./corerun ./crossgen2/crossgen2.dll -r:`pwd`/*.dll --jitpath ./libclrjit.so --targetarch armel -O --out-near-input --single-file-compilation *.dll ``` cc @clamp03 @gbalykov --------- Co-authored-by: Dong-Heon Jung <dheon.jung@samsung.com> Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Crossgen2 --out-near-input and --single-file-compilation options without inputbubble option leads to memory leak. This patch reduces memory consumption. Measurement on armel shows reduce peak Rss consumption from 825 Mb to 312 Mb for launch:
cc @clamp03 @gbalykov