@@ -9,13 +9,14 @@ use rustc_middle::ty::{self, Instance, Ty};
99use rustc_middle:: { bug, mir, span_bug} ;
1010use rustc_span:: source_map:: Spanned ;
1111use rustc_target:: callconv:: FnAbi ;
12+ use tracing:: field:: Empty ;
1213use tracing:: { info, instrument, trace} ;
1314
1415use super :: {
1516 FnArg , FnVal , ImmTy , Immediate , InterpCx , InterpResult , Machine , MemPlaceMeta , PlaceTy ,
1617 Projectable , Scalar , interp_ok, throw_ub, throw_unsup_format,
1718} ;
18- use crate :: util;
19+ use crate :: { enter_trace_span , util} ;
1920
2021struct EvaluatedCalleeAndArgs < ' tcx , M : Machine < ' tcx > > {
2122 callee : FnVal < ' tcx , M :: ExtraFnVal > ,
@@ -74,7 +75,14 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
7475 ///
7576 /// This does NOT move the statement counter forward, the caller has to do that!
7677 pub fn eval_statement ( & mut self , stmt : & mir:: Statement < ' tcx > ) -> InterpResult < ' tcx > {
77- info ! ( "{:?}" , stmt) ;
78+ let _span = enter_trace_span ! (
79+ M ,
80+ step:: eval_statement,
81+ stmt = ?stmt. kind,
82+ span = ?stmt. source_info. span,
83+ tracing_separate_thread = Empty ,
84+ ) ;
85+ info ! ( stmt = ?stmt. kind) ;
7886
7987 use rustc_middle:: mir:: StatementKind :: * ;
8088
@@ -456,7 +464,14 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
456464 }
457465
458466 fn eval_terminator ( & mut self , terminator : & mir:: Terminator < ' tcx > ) -> InterpResult < ' tcx > {
459- info ! ( "{:?}" , terminator. kind) ;
467+ let _span = enter_trace_span ! (
468+ M ,
469+ step:: eval_terminator,
470+ terminator = ?terminator. kind,
471+ span = ?terminator. source_info. span,
472+ tracing_separate_thread = Empty ,
473+ ) ;
474+ info ! ( terminator = ?terminator. kind) ;
460475
461476 use rustc_middle:: mir:: TerminatorKind :: * ;
462477 match terminator. kind {
0 commit comments