diff options
| author | Stypox <stypox@pm.me> | 2025-07-31 00:27:42 +0200 |
|---|---|---|
| committer | Stypox <stypox@pm.me> | 2025-07-31 21:51:29 +0200 |
| commit | 188f7367bff680a9e3ef2141a08cec24163ba70d (patch) | |
| tree | 7680ed02b3618aa9b138007d12dd2d20e4b06662 /compiler/rustc_const_eval/src/interpret/call.rs | |
| parent | 4e806c8a342589f64f61119f69fc68c565e331c8 (diff) | |
| download | rust-188f7367bff680a9e3ef2141a08cec24163ba70d.tar.gz rust-188f7367bff680a9e3ef2141a08cec24163ba70d.zip | |
Add tracing to more functions related to step.rs
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/call.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/call.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/call.rs b/compiler/rustc_const_eval/src/interpret/call.rs index 5b3adba0265..24c44084422 100644 --- a/compiler/rustc_const_eval/src/interpret/call.rs +++ b/compiler/rustc_const_eval/src/interpret/call.rs @@ -11,6 +11,7 @@ use rustc_middle::ty::{self, AdtDef, Instance, Ty, VariantDef}; use rustc_middle::{bug, mir, span_bug}; use rustc_span::sym; use rustc_target::callconv::{ArgAbi, FnAbi, PassMode}; +use tracing::field::Empty; use tracing::{info, instrument, trace}; use super::{ @@ -18,7 +19,7 @@ use super::{ Projectable, Provenance, ReturnAction, ReturnContinuation, Scalar, StackPopInfo, interp_ok, throw_ub, throw_ub_custom, throw_unsup_format, }; -use crate::fluent_generated as fluent; +use crate::{enter_trace_span, fluent_generated as fluent}; /// An argument passed to a function. #[derive(Clone, Debug)] @@ -344,6 +345,8 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { destination: &PlaceTy<'tcx, M::Provenance>, mut cont: ReturnContinuation, ) -> InterpResult<'tcx> { + let _span = enter_trace_span!(M, step::init_stack_frame, %instance, tracing_separate_thread = Empty); + // Compute callee information. // FIXME: for variadic support, do we have to somehow determine callee's extra_args? let callee_fn_abi = self.fn_abi_of_instance(instance, ty::List::empty())?; @@ -523,6 +526,8 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { target: Option<mir::BasicBlock>, unwind: mir::UnwindAction, ) -> InterpResult<'tcx> { + let _span = + enter_trace_span!(M, step::init_fn_call, tracing_separate_thread = Empty, ?fn_val); trace!("init_fn_call: {:#?}", fn_val); let instance = match fn_val { |
