about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/queries.rs
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-11-09 17:58:29 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-12-06 18:42:30 +0000
commitea6f5cbd2f8271b073d7902f43b12154b4685aca (patch)
tree290a85098897fb4c2c1f726f850818373e5de457 /compiler/rustc_interface/src/queries.rs
parent84873f86138bd5a2f7de73ef3b746f419ed13b8b (diff)
downloadrust-ea6f5cbd2f8271b073d7902f43b12154b4685aca.tar.gz
rust-ea6f5cbd2f8271b073d7902f43b12154b4685aca.zip
Move some timers around
Diffstat (limited to 'compiler/rustc_interface/src/queries.rs')
-rw-r--r--compiler/rustc_interface/src/queries.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_interface/src/queries.rs b/compiler/rustc_interface/src/queries.rs
index cd3a2fb7049..62da5c13d88 100644
--- a/compiler/rustc_interface/src/queries.rs
+++ b/compiler/rustc_interface/src/queries.rs
@@ -154,13 +154,16 @@ impl Linker {
     }
 
     pub fn link(self, sess: &Session, codegen_backend: &dyn CodegenBackend) -> Result<()> {
-        let (codegen_results, work_products) =
-            codegen_backend.join_codegen(self.ongoing_codegen, sess, &self.output_filenames);
+        let (codegen_results, work_products) = sess.time("finish_ongoing_codegen", || {
+            codegen_backend.join_codegen(self.ongoing_codegen, sess, &self.output_filenames)
+        });
 
         if let Some(guar) = sess.dcx().has_errors() {
             return Err(guar);
         }
 
+        let _timer = sess.timer("link");
+
         sess.time("serialize_work_products", || {
             rustc_incremental::save_work_product_index(sess, &self.dep_graph, work_products)
         });