Skip to content

Commit 1906b7e

Browse files
committed
port codegen_module activity to arg recorder API
1 parent b6a7b5a commit 1906b7e

File tree

1 file changed

+5
-4
lines changed
  • compiler/rustc_codegen_llvm/src

1 file changed

+5
-4
lines changed

compiler/rustc_codegen_llvm/src/base.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ pub fn compile_codegen_unit(tcx: TyCtxt<'_>, cgu_name: Symbol) -> (ModuleCodegen
7474

7575
fn module_codegen(tcx: TyCtxt<'_>, cgu_name: Symbol) -> ModuleCodegen<ModuleLlvm> {
7676
let cgu = tcx.codegen_unit(cgu_name);
77-
let _prof_timer = tcx.prof.generic_activity_with_args(
78-
"codegen_module",
79-
&[cgu_name.to_string(), cgu.size_estimate().to_string()],
80-
);
77+
let _prof_timer =
78+
tcx.prof.generic_activity_with_arg_recorder("codegen_module", |recorder| {
79+
recorder.record_arg(cgu_name.to_string());
80+
recorder.record_arg(cgu.size_estimate().to_string());
81+
});
8182
// Instantiate monomorphizations without filling out definitions yet...
8283
let llvm_module = ModuleLlvm::new(tcx, cgu_name.as_str());
8384
{

0 commit comments

Comments
 (0)