Use domain ID instead of thread ID in Eio collector

Eio programs are not generally expected to use threads for concurrency,
but they may well use different domains which we'd want to track during
debugging.
This commit is contained in:
Shon Feder 2025-09-07 10:45:49 -04:00
parent c30f3b1c0c
commit 474d43bdad
No known key found for this signature in database

View file

@ -15,8 +15,6 @@ let ( let@ ) = ( @@ )
let spf = Printf.sprintf
let tid () = Thread.id @@ Thread.self ()
let set_headers = Config.Env.set_headers
let get_headers = Config.Env.get_headers
@ -330,7 +328,7 @@ let mk_emitter ~stop ~net (config : Config.t) : (module EMITTER) =
let tick () =
if Config.Env.get_debug () then
Printf.eprintf "tick (from %d)\n%!" (tid ());
Printf.eprintf "tick (from domain %d)\n%!" (Domain.self () :> int);
run_tick_callbacks ();
sample_gc_metrics_if_needed ();
emit_all ~force:false