diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-09 05:31:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-09 05:31:38 +0200 |
| commit | e27f0298363f6ca60bb5761a8c74d52b3999a061 (patch) | |
| tree | 907f93d50a06e4997a8b0b29214bc219243810c6 | |
| parent | 5bbdcb67340679d4f8da31af091d97e7f8ec487f (diff) | |
| parent | 50932ea1dae96a15e8f457e4e038d0e5218d2cad (diff) | |
| download | rust-e27f0298363f6ca60bb5761a8c74d52b3999a061.tar.gz rust-e27f0298363f6ca60bb5761a8c74d52b3999a061.zip | |
Rollup merge of #65175 - andjo403:partitioning, r=zackmdavis
add more info in debug traces for gcu merging to help in investigation of CGU partitioning problems e.g https://github.com/rust-lang/rust/issues/64913
| -rw-r--r-- | src/librustc_mir/monomorphize/partitioning.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/librustc_mir/monomorphize/partitioning.rs b/src/librustc_mir/monomorphize/partitioning.rs index c193911247e..61868b24c0b 100644 --- a/src/librustc_mir/monomorphize/partitioning.rs +++ b/src/librustc_mir/monomorphize/partitioning.rs @@ -494,6 +494,9 @@ fn merge_codegen_units<'tcx>( for (k, v) in smallest.items_mut().drain() { second_smallest.items_mut().insert(k, v); } + debug!("CodegenUnit {} merged in to CodegenUnit {}", + smallest.name(), + second_smallest.name()); } let cgu_name_builder = &mut CodegenUnitNameBuilder::new(tcx); @@ -774,7 +777,7 @@ where if cfg!(debug_assertions) { debug!("{}", label); for cgu in cgus { - debug!("CodegenUnit {}:", cgu.name()); + debug!("CodegenUnit {} estimated size {} :", cgu.name(), cgu.size_estimate()); for (mono_item, linkage) in cgu.items() { let symbol_name = mono_item.symbol_name(tcx).name.as_str(); @@ -782,10 +785,11 @@ where let symbol_hash = symbol_hash_start.map(|i| &symbol_name[i ..]) .unwrap_or("<no hash>"); - debug!(" - {} [{:?}] [{}]", + debug!(" - {} [{:?}] [{}] estimated size {}", mono_item.to_string(tcx, true), linkage, - symbol_hash); + symbol_hash, + mono_item.size_estimate(tcx)); } debug!(""); |
