@@ -9,13 +9,14 @@ use rustc_middle::ty::{self, Instance, Ty};
9
9
use rustc_middle:: { bug, mir, span_bug} ;
10
10
use rustc_span:: source_map:: Spanned ;
11
11
use rustc_target:: callconv:: FnAbi ;
12
+ use tracing:: field:: Empty ;
12
13
use tracing:: { info, instrument, trace} ;
13
14
14
15
use super :: {
15
16
FnArg , FnVal , ImmTy , Immediate , InterpCx , InterpResult , Machine , MemPlaceMeta , PlaceTy ,
16
17
Projectable , Scalar , interp_ok, throw_ub, throw_unsup_format,
17
18
} ;
18
- use crate :: util;
19
+ use crate :: { enter_trace_span , util} ;
19
20
20
21
struct EvaluatedCalleeAndArgs < ' tcx , M : Machine < ' tcx > > {
21
22
callee : FnVal < ' tcx , M :: ExtraFnVal > ,
@@ -74,7 +75,14 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
74
75
///
75
76
/// This does NOT move the statement counter forward, the caller has to do that!
76
77
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) ;
78
86
79
87
use rustc_middle:: mir:: StatementKind :: * ;
80
88
@@ -456,7 +464,14 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
456
464
}
457
465
458
466
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) ;
460
475
461
476
use rustc_middle:: mir:: TerminatorKind :: * ;
462
477
match terminator. kind {
0 commit comments