Quiet noisy JIT compilation logs: only log slow (>500ms) or failed compiles
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -825,8 +825,9 @@ let register_jit_hook env =
|
|||||||
let compiled = Sx_vm.jit_compile_lambda l (env_to_vm_globals env) in
|
let compiled = Sx_vm.jit_compile_lambda l (env_to_vm_globals env) in
|
||||||
let dt = Unix.gettimeofday () -. t0 in
|
let dt = Unix.gettimeofday () -. t0 in
|
||||||
_jit_compiling := false;
|
_jit_compiling := false;
|
||||||
Printf.eprintf "[jit] %s compile %s in %.3fs\n%!"
|
if dt > 0.5 || (match compiled with None -> true | _ -> false) then
|
||||||
fn_name (match compiled with Some _ -> "OK" | None -> "FAIL") dt;
|
Printf.eprintf "[jit] %s compile %s in %.3fs\n%!"
|
||||||
|
fn_name (match compiled with Some _ -> "OK" | None -> "FAIL") dt;
|
||||||
match compiled with
|
match compiled with
|
||||||
| Some cl ->
|
| Some cl ->
|
||||||
l.l_compiled <- Some cl;
|
l.l_compiled <- Some cl;
|
||||||
|
|||||||
Reference in New Issue
Block a user