Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/librustc_mir/monomorphize/partitioning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -774,18 +777,19 @@ 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();
let symbol_hash_start = symbol_name.rfind('h');
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!("");
Expand Down