@@ -41,21 +41,27 @@ let get_fiber t id =
4141 t.fibers < - Fibers. add id x t.fibers;
4242 x
4343
44+ let phase_useful = function
45+ | Runtime_events. EV_DOMAIN_CONDITION_WAIT -> false (* We don't know what systhread it came from *)
46+ | _ -> true
47+
4448let callbacks t =
4549 Runtime_events.Callbacks. create ()
4650 ~runtime_begin: (fun ring ts phase ->
47- Write. duration_begin t.fxt
48- ~thread: (ring_thread t ring)
49- ~name: (Runtime_events. runtime_phase_name phase)
50- ~category: " gc"
51- ~ts: (Runtime_events.Timestamp. to_int64 ts)
51+ if phase_useful phase then
52+ Write. duration_begin t.fxt
53+ ~thread: (ring_thread t ring)
54+ ~name: (Runtime_events. runtime_phase_name phase)
55+ ~category: " gc"
56+ ~ts: (Runtime_events.Timestamp. to_int64 ts)
5257 )
5358 ~runtime_end: (fun ring ts phase ->
54- Write. duration_end t.fxt
55- ~thread: (ring_thread t ring)
56- ~name: (Runtime_events. runtime_phase_name phase)
57- ~category: " gc"
58- ~ts: (Runtime_events.Timestamp. to_int64 ts)
59+ if phase_useful phase then
60+ Write. duration_end t.fxt
61+ ~thread: (ring_thread t ring)
62+ ~name: (Runtime_events. runtime_phase_name phase)
63+ ~category: " gc"
64+ ~ts: (Runtime_events.Timestamp. to_int64 ts)
5965 )
6066 ~lost_events: (fun ring n -> traceln " Warning: ring %d lost %d events" ring n)
6167 |> Eio_runtime_events. add_callbacks
0 commit comments