-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Compilation memory spikes during LTO #65431
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-bug
Category: This is a bug.
I-compilemem
Issue: Problems and improvements with respect to memory usage during compilation.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
With the recent nightly compiler the memory usage in linking stage was reduced drastically for me. It may be that the GCC upgrade for ARM caused this improvement. No more OOM there! |
@tiagolam could you post your Rust version ( |
@mati865 Here:
|
Closing as I can no longer reproduce this on the latest nightly and
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-bug
Category: This is a bug.
I-compilemem
Issue: Problems and improvements with respect to memory usage during compilation.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Test case:
(with the dependency
tokio = "^0.2.0-alpha.3"
added toCargo.toml
)The
FILLER
is there so we can simulate a binary of a certain size.Compiling with:
Generates memory spikes of around 12GiB, which sometimes means the compilation fails as it ends up being killed by the OS (
signal: 9, SIGKILL: kill
).Further analysis suggests it has to do with lto
cargo rustc --release -p spike -- -Ztime-passes
:The issue can be worked around by either disabling LTO with
RUSTFLAGS='-C lto=no'
or change the FILLER to be a static array of 0's:The text was updated successfully, but these errors were encountered: