Skip to content

Commit 5e10828

Browse files
committed
Add tracing for instantiate_from_frame_and_normalize_erasing_regions
1 parent df32e15 commit 5e10828

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

compiler/rustc_const_eval/src/interpret/eval_context.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use super::{
2121
MemPlaceMeta, Memory, OpTy, Place, PlaceTy, PointerArithmetic, Projectable, Provenance,
2222
err_inval, interp_ok, throw_inval, throw_ub, throw_ub_custom,
2323
};
24-
use crate::{ReportErrorExt, fluent_generated as fluent, util};
24+
use crate::{ReportErrorExt, enter_trace_span, fluent_generated as fluent, util};
2525

2626
pub struct InterpCx<'tcx, M: Machine<'tcx>> {
2727
/// Stores the `Machine` instance.
@@ -284,6 +284,12 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
284284
frame: &Frame<'tcx, M::Provenance, M::FrameExtra>,
285285
value: T,
286286
) -> Result<T, ErrorHandled> {
287+
let _span = enter_trace_span!(
288+
M,
289+
"instantiate_from_frame_and_normalize_erasing_regions",
290+
"{}",
291+
frame.instance
292+
);
287293
frame
288294
.instance
289295
.try_instantiate_mir_and_normalize_erasing_regions(

0 commit comments

Comments
 (0)