You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When profiling Clippy either with Valgrind or with cargo lintcheck --perf, we can see that Clippy does a lot of use out of LLVM symbols. We need to investigate why is that the case and how can we remediate it.
Using Valgrind (specifically Callgrind), turns out that we are spending a lot of resources on LLVM symbols that cargo check does not spend resources on.
Where are the LLVM calls coming from? I have some theories.
We are using a query/function that triggers codegen.
Clippy does not actually deactivate codegen (weird)
#![feature(rustc_private)] for importing rustc_hir and such automatically imports LLVM and performs some internal LLVM function.
Some time ago I talked about why does Clippy have so many relocations, and how it could be caused by the dynamic linking. Since then I've had a chat with someone that mentioned that LLVM compilation suffers from a lot of relocations, and how that could be the reason.
The text was updated successfully, but these errors were encountered:
Also, note that currently, libLLVM.so is making the most allocations in the whole proyect. Via profiling allocations using heaptrack we concluded that libLLVM.so allocates more than 170 Kb of RAM!
I tried to b a few LLVM symbols in gdb and they all comes from module inits. Meanwhile libLLVM itself is introduced by librustc_driver. So I wonder if this is really a clippy problem.
When profiling Clippy either with Valgrind or with
cargo lintcheck --perf
, we can see that Clippy does a lot of use out of LLVM symbols. We need to investigate why is that the case and how can we remediate it.Using Valgrind (specifically Callgrind), turns out that we are spending a lot of resources on LLVM symbols that
cargo check
does not spend resources on.Where are the LLVM calls coming from? I have some theories.
#![feature(rustc_private)]
for importingrustc_hir
and such automatically imports LLVM and performs some internal LLVM function.Some time ago I talked about why does Clippy have so many relocations, and how it could be caused by the dynamic linking. Since then I've had a chat with someone that mentioned that LLVM compilation suffers from a lot of relocations, and how that could be the reason.
The text was updated successfully, but these errors were encountered: