Skip to content

Commit f3b2d37

Browse files
committed
Record object file artifact size in self profile data
1 parent b91ecc7 commit f3b2d37

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/driver/aot.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ fn emit_module(
5656

5757
let tmp_file = tcx.output_filenames(()).temp_path(OutputType::Object, Some(&name));
5858
let obj = product.object.write().unwrap();
59+
60+
tcx.sess.prof.artifact_size("object_file", name.clone(), obj.len().try_into().unwrap());
61+
5962
if let Err(err) = std::fs::write(&tmp_file, obj) {
6063
tcx.sess.fatal(&format!("error writing object file: {}", err));
6164
}

0 commit comments

Comments
 (0)