1
Fork 0

prefer instrumentation over entry/exit tracing statements

This commit is contained in:
Oli Scherer 2024-01-24 11:05:14 +00:00
parent 7a2b66319e
commit b6d0225caf

View file

@ -22,12 +22,13 @@ use crate::interpret::{
}; };
// Returns a pointer to where the result lives // Returns a pointer to where the result lives
#[instrument(level = "trace", skip(ecx, body), ret)]
fn eval_body_using_ecx<'mir, 'tcx>( fn eval_body_using_ecx<'mir, 'tcx>(
ecx: &mut CompileTimeEvalContext<'mir, 'tcx>, ecx: &mut CompileTimeEvalContext<'mir, 'tcx>,
cid: GlobalId<'tcx>, cid: GlobalId<'tcx>,
body: &'mir mir::Body<'tcx>, body: &'mir mir::Body<'tcx>,
) -> InterpResult<'tcx, MPlaceTy<'tcx>> { ) -> InterpResult<'tcx, MPlaceTy<'tcx>> {
debug!("eval_body_using_ecx: {:?}, {:?}", cid, ecx.param_env); trace!(?ecx.param_env);
let tcx = *ecx.tcx; let tcx = *ecx.tcx;
assert!( assert!(
cid.promoted.is_some() cid.promoted.is_some()
@ -75,7 +76,6 @@ fn eval_body_using_ecx<'mir, 'tcx>(
}; };
intern_const_alloc_recursive(ecx, intern_kind, &ret)?; intern_const_alloc_recursive(ecx, intern_kind, &ret)?;
debug!("eval_body_using_ecx done: {:?}", ret);
Ok(ret) Ok(ret)
} }