12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758typespan=int(* technically, [span] is [(bool,uint32)], but since tracy required 64 bits,
it always fits *)external_tracy_enter:file:string->fun_:string->line:int->name:string->depth:int->span="ml_tracy_enter"[@@noalloc]external_tracy_exit:span->unit="ml_tracy_exit"[@@noalloc]external_tracy_name_thread:string->unit="ml_tracy_name_thread"external_tracy_msg:string->unit="ml_tracy_msg"[@@noalloc]external_tracy_plot:string->float->unit="ml_tracy_plot"[@@noalloc](* TODO external _tracy_set_plot_unit : string -> float -> unit = "ml_tracy_plot" *)external_tracy_app_info:string->unit="ml_tracy_app_info"external_tracy_span_text:span->string->unit="ml_tracy_span_text"[@@noalloc]external_tracy_span_value:span->int64->unit="ml_tracy_span_value"[@@noalloc]external_tracy_span_color:span->int->unit="ml_tracy_span_color"[@@noalloc]letenter?cs_depth~__FILE__:file~__LINE__:line?(__FUNCTION__="<fun>")name:span=letdepth=matchcs_depthwith|None->0|Somei->iin_tracy_enter~file~fun_:__FUNCTION__~line~name~depth(* TODO: in enter/tracy_enter,
use ___tracy_emit_zone_value/color/text for bonus items *)letexit=_tracy_exitletname_thread=_tracy_name_threadletmessage=_tracy_msgletplot=_tracy_plotletset_color=_tracy_span_colorletadd_value=_tracy_span_valueletadd_text=_tracy_span_textletset_app_info=_tracy_app_infoletmessage_fk=k(funfmt->Format.kasprintfmessagefmt)letadd_text_fspk=k(funfmt->Format.kasprintf(add_textsp)fmt)let[@inline]with_?cs_depth~__FILE__~__LINE__?__FUNCTION__namef=let_sp=enter?cs_depth~__FILE__~__LINE__?__FUNCTION__nameintryletx=f_spinexit_sp;xwithe->exit_sp;raisee