diff options
| author | bors <bors@rust-lang.org> | 2020-11-17 15:27:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-11-17 15:27:29 +0000 |
| commit | c919f490bbcd2b29b74016101f7ec71aaa24bdbb (patch) | |
| tree | ce8406ee4a726bc8db7c864518f3d8ea16ea8c6e /compiler/rustc_codegen_llvm/src | |
| parent | e0ef0fc392963438af5f0343bf7caa46fb9c3ec3 (diff) | |
| parent | f698505177eb1853b3d905bbe1005140acd50d53 (diff) | |
| download | rust-c919f490bbcd2b29b74016101f7ec71aaa24bdbb.tar.gz rust-c919f490bbcd2b29b74016101f7ec71aaa24bdbb.zip | |
Auto merge of #79138 - m-ou-se:rollup-owel5ld, r=m-ou-se
Rollup of 8 pull requests
Successful merges:
- #74293 (Rustdoc test compiler output color)
- #78702 ([self-profiling] Include the estimated size of each cgu in the profile)
- #79069 (Get rid of `highlight::Class::None`)
- #79072 (Fix exhaustiveness in case a byte string literal is used at slice type)
- #79120 (update rustfmt to v1.4.27)
- #79125 (Get rid of clean::{Method, TyMethod})
- #79126 (Remove duplicate `Trait::auto` field)
- #79130 (extend macro braces test)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/base.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/base.rs b/compiler/rustc_codegen_llvm/src/base.rs index 1090d4a25c7..7d01f6a5499 100644 --- a/compiler/rustc_codegen_llvm/src/base.rs +++ b/compiler/rustc_codegen_llvm/src/base.rs @@ -97,14 +97,12 @@ pub fn compile_codegen_unit( tcx: TyCtxt<'tcx>, cgu_name: Symbol, ) -> (ModuleCodegen<ModuleLlvm>, u64) { - let prof_timer = tcx.prof.generic_activity_with_arg("codegen_module", cgu_name.to_string()); let start_time = Instant::now(); let dep_node = tcx.codegen_unit(cgu_name).codegen_dep_node(tcx); let (module, _) = tcx.dep_graph.with_task(dep_node, tcx, cgu_name, module_codegen, 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. @@ -112,6 +110,10 @@ pub fn compile_codegen_unit( fn module_codegen(tcx: TyCtxt<'_>, cgu_name: Symbol) -> ModuleCodegen<ModuleLlvm> { let cgu = tcx.codegen_unit(cgu_name); + let _prof_timer = tcx.prof.generic_activity_with_args( + "codegen_module", + &[cgu_name.to_string(), cgu.size_estimate().to_string()], + ); // Instantiate monomorphizations without filling out definitions yet... let llvm_module = ModuleLlvm::new(tcx, &cgu_name.as_str()); { |
