File tree 2 files changed +12
-3
lines changed
compiler/rustc_expand/src
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>(
18
18
19
19
let res = with_context ( |( ecx, client) | {
20
20
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| {
23
24
recorder. record_arg_with_span ( ecx. sess . source_map ( ) , ecx. expansion_descr ( ) , span) ;
24
- } ) ;
25
+ } ,
26
+ ) ;
25
27
let proc_macro_backtrace = ecx. ecfg . proc_macro_backtrace ;
26
28
let strategy = crate :: proc_macro:: exec_strategy ( ecx) ;
27
29
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 {
115
115
item : Annotatable ,
116
116
_is_derive_const : bool ,
117
117
) -> 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
+
118
125
// We need special handling for statement items
119
126
// (e.g. `fn foo() { #[derive(Debug)] struct Bar; }`)
120
127
let is_stmt = matches ! ( item, Annotatable :: Stmt ( ..) ) ;
You can’t perform that action at this time.
0 commit comments