Skip to content

Commit 60073d7

Browse files
committed
fix pc logging
1 parent 65f4e69 commit 60073d7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

crates/vm/derive/src/tco.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub fn tco_impl(item: TokenStream) -> TokenStream {
7070
#where_clause
7171
{
7272
use ::openvm_circuit::arch::ExecutionError;
73-
exec_state.vm_state.log_pc();
73+
::openvm_circuit::arch::interpreter::InterpretedInstance::<#f_type, #ctx_type>::log_pc(pc);
7474
let pre_compute = interpreter.get_pre_compute(pc);
7575
#execute_stmt
7676

crates/vm/src/arch/interpreter.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,10 @@ where
259259
let pc_idx = get_pc_index(pc);
260260
self.handlers.get(pc_idx).copied()
261261
}
262+
263+
pub fn log_pc(pc: u32) {
264+
tracing::trace!(pc = pc, "executing instruction");
265+
}
262266
}
263267

264268
impl<'a, F, Ctx> InterpretedInstance<'a, F, Ctx>
@@ -592,7 +596,7 @@ unsafe fn execute_trampoline<F: PrimeField32, Ctx: ExecutionCtxTrait>(
592596
.as_ref()
593597
.is_ok_and(|exit_code| exit_code.is_none())
594598
{
595-
tracing::trace!(pc = pc, "executing instruction");
599+
InterpretedInstance::<F, Ctx>::log_pc(pc);
596600
if Ctx::should_suspend(instret, pc, arg, exec_state) {
597601
break;
598602
}

0 commit comments

Comments
 (0)