diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2021-11-08 16:59:36 +0100 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2021-11-08 17:02:40 +0100 |
| commit | fefe1e9192696c07f1655ed2726c4e114b70b096 (patch) | |
| tree | 0beead3daa202ec305dc36e55ed8566d3453cb9a /compiler/rustc_monomorphize/src/partitioning/mod.rs | |
| parent | 3e3890c9d4064253aaa8c51f5d5458d2dc6dab77 (diff) | |
| download | rust-fefe1e9192696c07f1655ed2726c4e114b70b096.tar.gz rust-fefe1e9192696c07f1655ed2726c4e114b70b096.zip | |
Record more artifact sizes during self-profiling.
Diffstat (limited to 'compiler/rustc_monomorphize/src/partitioning/mod.rs')
| -rw-r--r-- | compiler/rustc_monomorphize/src/partitioning/mod.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_monomorphize/src/partitioning/mod.rs b/compiler/rustc_monomorphize/src/partitioning/mod.rs index 7a7a56a034e..658c9028ca1 100644 --- a/compiler/rustc_monomorphize/src/partitioning/mod.rs +++ b/compiler/rustc_monomorphize/src/partitioning/mod.rs @@ -361,6 +361,17 @@ fn collect_and_partition_mono_items<'tcx>( ) }); + if tcx.prof.enabled() { + // Record CGU size estimates for self-profiling. + for cgu in codegen_units { + tcx.prof.artifact_size( + "codegen_unit_size_estimate", + &cgu.name().as_str()[..], + cgu.size_estimate() as u64, + ); + } + } + let mono_items: DefIdSet = items .iter() .filter_map(|mono_item| match *mono_item { |
