Self-Profiling: Make names of existing events more consistent and use new API.

This commit is contained in:
Michael Woerister
2019-09-27 14:04:36 +02:00
parent b0b073cdb0
commit d94262272b
11 changed files with 122 additions and 158 deletions

View File

@@ -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)