File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
compiler/rustc_expand/src Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,12 @@ pub(super) fn provide_derive_macro_expansion<'tcx>(
1818
1919 let res = with_context ( |( ecx, client) | {
2020 let span = invoc_id. expn_data ( ) . call_site ;
21- let _timer =
22- ecx. sess . prof . generic_activity_with_arg_recorder ( "expand_proc_macro" , |recorder| {
21+ let _timer = ecx. sess . prof . generic_activity_with_arg_recorder (
22+ "expand_derive_proc_macro_inner" ,
23+ |recorder| {
2324 recorder. record_arg_with_span ( ecx. sess . source_map ( ) , ecx. expansion_descr ( ) , span) ;
24- } ) ;
25+ } ,
26+ ) ;
2527 let proc_macro_backtrace = ecx. ecfg . proc_macro_backtrace ;
2628 let strategy = crate :: proc_macro:: exec_strategy ( ecx) ;
2729 let server = crate :: proc_macro_server:: Rustc :: new ( ecx) ;
Original file line number Diff line number Diff line change @@ -115,6 +115,13 @@ impl MultiItemModifier for DeriveProcMacro {
115115 item : Annotatable ,
116116 _is_derive_const : bool ,
117117 ) -> ExpandResult < Vec < Annotatable > , Annotatable > {
118+ let _timer = ecx. sess . prof . generic_activity_with_arg_recorder (
119+ "expand_derive_proc_macro_outer" ,
120+ |recorder| {
121+ recorder. record_arg_with_span ( ecx. sess . source_map ( ) , ecx. expansion_descr ( ) , span) ;
122+ } ,
123+ ) ;
124+
118125 // We need special handling for statement items
119126 // (e.g. `fn foo() { #[derive(Debug)] struct Bar; }`)
120127 let is_stmt = matches ! ( item, Annotatable :: Stmt ( ..) ) ;
You can’t perform that action at this time.
0 commit comments