about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/lib.rs
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2019-09-27 14:04:36 +0200
committerMichael Woerister <michaelwoerister@posteo>2019-09-30 13:31:56 +0200
commitd94262272bbdc700689a012a2e8a34adbe2a0f18 (patch)
tree4e5820ff332bf14b9b4d7708626352fc023a9de3 /src/librustc_codegen_llvm/lib.rs
parentb0b073cdb07ccd392747fcaf1f1e949fe8921c1b (diff)
downloadrust-d94262272bbdc700689a012a2e8a34adbe2a0f18.tar.gz
rust-d94262272bbdc700689a012a2e8a34adbe2a0f18.zip
Self-Profiling: Make names of existing events more consistent and use new API.
Diffstat (limited to 'src/librustc_codegen_llvm/lib.rs')
-rw-r--r--src/librustc_codegen_llvm/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_codegen_llvm/lib.rs b/src/librustc_codegen_llvm/lib.rs
index 2a63011c2f5..9bacd8a5f56 100644
--- a/src/librustc_codegen_llvm/lib.rs
+++ b/src/librustc_codegen_llvm/lib.rs
@@ -323,8 +323,9 @@ impl CodegenBackend for LlvmCodegenBackend {
 
         // Run the linker on any artifacts that resulted from the LLVM run.
         // This should produce either a finished executable or library.
-        sess.profiler(|p| p.start_activity("link_crate"));
         time(sess, "linking", || {
+            let _prof_timer = sess.prof.generic_activity("link_crate");
+
             use rustc_codegen_ssa::back::link::link_binary;
             use crate::back::archive::LlvmArchiveBuilder;
 
@@ -337,7 +338,6 @@ impl CodegenBackend for LlvmCodegenBackend {
                 target_cpu,
             );
         });
-        sess.profiler(|p| p.end_activity("link_crate"));
 
         // Now that we won't touch anything in the incremental compilation directory
         // any more, we can finalize it (which involves renaming it)