@@ -259,7 +259,7 @@ fn generate_lto_work<B: ExtraBackendMethods>(
259
259
needs_thin_lto : Vec < ( String , B :: ThinBuffer ) > ,
260
260
import_only_modules : Vec < ( SerializedModule < B :: ModuleBuffer > , WorkProduct ) >
261
261
) -> Vec < ( WorkItem < B > , u64 ) > {
262
- let _prof_timer = cgcx. prof . generic_activity ( "codegen_run_lto " ) ;
262
+ let _prof_timer = cgcx. prof . generic_activity ( "codegen_generate_lto_work " ) ;
263
263
264
264
let ( lto_modules, copy_jobs) = if !needs_fat_lto. is_empty ( ) {
265
265
assert ! ( needs_thin_lto. is_empty( ) ) ;
@@ -674,11 +674,11 @@ impl<B: WriteBackendMethods> WorkItem<B> {
674
674
}
675
675
}
676
676
677
- pub fn name ( & self ) -> String {
677
+ fn profiling_event_id ( & self ) -> & ' static str {
678
678
match * self {
679
- WorkItem :: Optimize ( ref m ) => format ! ( "optimize: {}" , m . name ) ,
680
- WorkItem :: CopyPostLtoArtifacts ( ref m ) => format ! ( "copy post LTO artifacts: {}" , m . name ) ,
681
- WorkItem :: LTO ( ref m ) => format ! ( "lto: {}" , m . name ( ) ) ,
679
+ WorkItem :: Optimize ( _ ) => "codegen_module_optimize" ,
680
+ WorkItem :: CopyPostLtoArtifacts ( _ ) => "codegen_copy_artifacts_from_incr_cache" ,
681
+ WorkItem :: LTO ( _ ) => "codegen_module_perform_lto" ,
682
682
}
683
683
}
684
684
}
@@ -1587,7 +1587,7 @@ fn spawn_work<B: ExtraBackendMethods>(
1587
1587
// as a diagnostic was already sent off to the main thread - just
1588
1588
// surface that there was an error in this worker.
1589
1589
bomb. result = {
1590
- let _prof_timer = cgcx. prof . generic_activity ( & work. name ( ) ) ;
1590
+ let _prof_timer = cgcx. prof . generic_activity ( work. profiling_event_id ( ) ) ;
1591
1591
execute_work_item ( & cgcx, work) . ok ( )
1592
1592
} ;
1593
1593
} ) ;
0 commit comments