1
Fork 0

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

@ -108,6 +108,7 @@ pub fn compile_codegen_unit(
cgu_name: InternedString,
tx_to_llvm_workers: &std::sync::mpsc::Sender<Box<dyn std::any::Any + Send>>,
) {
let prof_timer = tcx.prof.generic_activity("codegen_module");
let start_time = Instant::now();
let dep_node = tcx.codegen_unit(cgu_name).codegen_dep_node(tcx);
@ -119,6 +120,7 @@ pub fn compile_codegen_unit(
dep_graph::hash_result,
);
let time_to_codegen = start_time.elapsed();
drop(prof_timer);
// We assume that the cost to run LLVM on a CGU is proportional to
// the time we needed for codegenning it.