Uniform enter_trace_span! and add documentation

The macro was uniformed between rustc_const_eval and miri
This commit is contained in:
Stypox
2025-07-30 17:33:28 +02:00
parent e5e79f8bd4
commit 8e786169e8
3 changed files with 65 additions and 20 deletions

View File

@@ -397,9 +397,9 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
// Finish things up.
M::after_stack_push(self)?;
self.frame_mut().loc = Left(mir::Location::START);
// `tracing_separate_thread` is used to instruct the chrome_tracing [tracing::Layer] in Miri
// `tracing_separate_thread` is used to instruct the tracing_chrome [tracing::Layer] in Miri
// to put the "frame" span on a separate trace thread/line than other spans, to make the
// visualization in https://ui.perfetto.dev easier to interpret. It is set to a value of
// visualization in <https://ui.perfetto.dev> easier to interpret. It is set to a value of
// [tracing::field::Empty] so that other tracing layers (e.g. the logger) will ignore it.
let span = info_span!("frame", tracing_separate_thread = Empty, "{}", instance);
self.frame_mut().tracing_span.enter(span);