@@ -11,14 +11,16 @@ use rustc_middle::ty::{self, AdtDef, Instance, Ty, VariantDef};
1111use  rustc_middle:: { bug,  mir,  span_bug} ; 
1212use  rustc_span:: sym; 
1313use  rustc_target:: callconv:: { ArgAbi ,  FnAbi ,  PassMode } ; 
14+ use  tracing:: field:: Empty ; 
1415use  tracing:: { info,  instrument,  trace} ; 
1516
1617use  super :: { 
1718    CtfeProvenance ,  FnVal ,  ImmTy ,  InterpCx ,  InterpResult ,  MPlaceTy ,  Machine ,  OpTy ,  PlaceTy , 
1819    Projectable ,  Provenance ,  ReturnAction ,  ReturnContinuation ,  Scalar ,  StackPopInfo ,  interp_ok, 
1920    throw_ub,  throw_ub_custom,  throw_unsup_format, 
2021} ; 
21- use  crate :: fluent_generated as  fluent; 
22+ use  crate :: interpret:: EnteredTraceSpan ; 
23+ use  crate :: { enter_trace_span,  fluent_generated as  fluent} ; 
2224
2325/// An argument passed to a function. 
2426#[ derive( Clone ,  Debug ) ]  
@@ -344,6 +346,8 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
344346        destination :  & PlaceTy < ' tcx ,  M :: Provenance > , 
345347        mut  cont :  ReturnContinuation , 
346348    )  -> InterpResult < ' tcx >  { 
349+         let  _span = enter_trace_span ! ( M ,  step:: init_stack_frame,  %instance,  tracing_separate_thread = Empty ) ; 
350+ 
347351        // Compute callee information. 
348352        // FIXME: for variadic support, do we have to somehow determine callee's extra_args? 
349353        let  callee_fn_abi = self . fn_abi_of_instance ( instance,  ty:: List :: empty ( ) ) ?; 
@@ -523,7 +527,9 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
523527        target :  Option < mir:: BasicBlock > , 
524528        unwind :  mir:: UnwindAction , 
525529    )  -> InterpResult < ' tcx >  { 
526-         trace ! ( "init_fn_call: {:#?}" ,  fn_val) ; 
530+         let  _span =
531+             enter_trace_span ! ( M ,  step:: init_fn_call,  tracing_separate_thread = Empty ,  ?fn_val) 
532+                 . or_if_tracing_disabled ( || trace ! ( "init_fn_call: {:#?}" ,  fn_val) ) ; 
527533
528534        let  instance = match  fn_val { 
529535            FnVal :: Instance ( instance)  => instance, 
0 commit comments