about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/base.rs
diff options
context:
space:
mode:
authorRémy Rakic <remy.rakic+github@gmail.com>2022-04-07 10:32:58 +0200
committerRémy Rakic <remy.rakic+github@gmail.com>2022-04-07 15:47:20 +0200
commit1906b7e967f98e8c735054af61906e86cfc80ac7 (patch)
treebbe61745a56ffd6c5f742d2046fea17f16a36221 /compiler/rustc_codegen_llvm/src/base.rs
parentb6a7b5accd03da6655e8150bcbd36defe1e43081 (diff)
downloadrust-1906b7e967f98e8c735054af61906e86cfc80ac7.tar.gz
rust-1906b7e967f98e8c735054af61906e86cfc80ac7.zip
port `codegen_module` activity to arg recorder API
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/base.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/base.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/base.rs b/compiler/rustc_codegen_llvm/src/base.rs
index dd3ada44389..7a7335f2be2 100644
--- a/compiler/rustc_codegen_llvm/src/base.rs
+++ b/compiler/rustc_codegen_llvm/src/base.rs
@@ -74,10 +74,11 @@ pub fn compile_codegen_unit(tcx: TyCtxt<'_>, cgu_name: Symbol) -> (ModuleCodegen
 
     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()],
-        );
+        let _prof_timer =
+            tcx.prof.generic_activity_with_arg_recorder("codegen_module", |recorder| {
+                recorder.record_arg(cgu_name.to_string());
+                recorder.record_arg(cgu.size_estimate().to_string());
+            });
         // Instantiate monomorphizations without filling out definitions yet...
         let llvm_module = ModuleLlvm::new(tcx, cgu_name.as_str());
         {