Skip to content

Commit

Permalink
Show MIR bytes separately in -Zmeta-stats output
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiasko committed Feb 7, 2021
1 parent 36ecbc9 commit a14ec1c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion compiler/rustc_metadata/src/rmeta/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,10 +572,14 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {

let tcx = self.tcx;

// Encode MIR.
i = self.position();
self.encode_mir();
let mir_bytes = self.position() - i;

// Encode the items.
i = self.position();
self.encode_def_ids();
self.encode_mir();
self.encode_info_for_items();
let item_bytes = self.position() - i;

Expand Down Expand Up @@ -700,6 +704,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
println!(" exp. symbols bytes: {}", exported_symbols_bytes);
println!(" def-path table bytes: {}", def_path_table_bytes);
println!(" proc-macro-data-bytes: {}", proc_macro_data_bytes);
println!(" mir bytes: {}", mir_bytes);
println!(" item bytes: {}", item_bytes);
println!(" table bytes: {}", tables_bytes);
println!(" hygiene bytes: {}", hygiene_bytes);
Expand Down

0 comments on commit a14ec1c

Please sign in to comment.