@@ -259,7 +259,7 @@ fn generate_lto_work<B: ExtraBackendMethods>(
259259    needs_thin_lto :  Vec < ( String ,  B :: ThinBuffer ) > , 
260260    import_only_modules :  Vec < ( SerializedModule < B :: ModuleBuffer > ,  WorkProduct ) > 
261261)  -> 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 " ) ; 
263263
264264    let  ( lto_modules,  copy_jobs)  = if  !needs_fat_lto. is_empty ( )  { 
265265        assert ! ( needs_thin_lto. is_empty( ) ) ; 
@@ -674,11 +674,11 @@ impl<B: WriteBackendMethods> WorkItem<B> {
674674        } 
675675    } 
676676
677-     pub   fn  name ( & self )  -> String  { 
677+     fn  profiling_event_id ( & self )  -> & ' static   str  { 
678678        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" , 
682682        } 
683683    } 
684684} 
@@ -1587,7 +1587,7 @@ fn spawn_work<B: ExtraBackendMethods>(
15871587        // as a diagnostic was already sent off to the main thread - just 
15881588        // surface that there was an error in this worker. 
15891589        bomb. result  = { 
1590-             let  _prof_timer = cgcx. prof . generic_activity ( & work. name ( ) ) ; 
1590+             let  _prof_timer = cgcx. prof . generic_activity ( work. profiling_event_id ( ) ) ; 
15911591            execute_work_item ( & cgcx,  work) . ok ( ) 
15921592        } ; 
15931593    } ) ; 
0 commit comments