diff --git a/hosts/ocaml/lib/sx_ref.ml b/hosts/ocaml/lib/sx_ref.ml index e1becc3b..9c9a2f22 100644 --- a/hosts/ocaml/lib/sx_ref.ml +++ b/hosts/ocaml/lib/sx_ref.ml @@ -388,7 +388,12 @@ and cek_run state = if n land 4095 = 0 then begin let lim = Atomic.get _step_limit in if lim > 0 && n >= lim then - raise (Eval_error (Printf.sprintf "Render step limit exceeded (%d steps)" n)) + raise (Eval_error (Printf.sprintf "Render step limit exceeded (%d steps)" n)); + if n land 1048575 = 0 && n > 0 then + Printf.eprintf "[cek] %d steps, phase=%s control=%s\n%!" n + (match cek_phase !s with String p -> p | _ -> "?") + (String.sub (Sx_runtime.value_to_str (cek_control !s)) 0 + (min 80 (String.length (Sx_runtime.value_to_str (cek_control !s))))) end done; cek_value !s