From b6a7b5accd03da6655e8150bcbd36defe1e43081 Mon Sep 17 00:00:00 2001 From: Rémy Rakic Date: Fri, 1 Apr 2022 21:10:44 +0200 Subject: remove allocation from a self-profiling call in the LLVM backend --- compiler/rustc_codegen_llvm/src/back/lto.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_codegen_llvm/src/back') diff --git a/compiler/rustc_codegen_llvm/src/back/lto.rs b/compiler/rustc_codegen_llvm/src/back/lto.rs index 0f5b1c08ec2..7a747a9cdee 100644 --- a/compiler/rustc_codegen_llvm/src/back/lto.rs +++ b/compiler/rustc_codegen_llvm/src/back/lto.rs @@ -313,7 +313,9 @@ fn fat_lto( for (bc_decoded, name) in serialized_modules { let _timer = cgcx .prof - .generic_activity_with_arg("LLVM_fat_lto_link_module", format!("{:?}", name)); + .generic_activity_with_arg_recorder("LLVM_fat_lto_link_module", |recorder| { + recorder.record_arg(format!("{:?}", name)) + }); info!("linking {:?}", name); let data = bc_decoded.data(); linker.add(data).map_err(|()| { -- cgit 1.4.1-3-g733a5