diff --git a/example/burn.ml b/example/burn.ml index 84a63ce..bc87300 100644 --- a/example/burn.ml +++ b/example/burn.ml @@ -1,17 +1,17 @@ open Eio let woops_sleepy ~clock = - Private.Ctf.set_name "sleeper"; + Private.Tracing.set_name "sleeper"; Switch.run ~name:"sleeper" @@ fun sw -> Fiber.fork ~sw (fun () -> - Private.Ctf.set_name "unix sleeper"; + Private.Tracing.set_name "unix sleeper"; (* Woops! Wrong sleep function, we blocked the fiber *) traceln "Woops! Blocked by Unix.sleepf"; Unix.sleepf 5.; Time.sleep clock 10.) let spawn ~clock min max = - Private.Ctf.set_name (Fmt.str "spawn %d %d" min max); + Private.Tracing.set_name (Fmt.str "spawn %d %d" min max); (* Some GC action *) for _i = 0 to 100 do ignore (Sys.opaque_identity @@ Array.init 1000000 float_of_int) @@ -19,7 +19,7 @@ let spawn ~clock min max = Switch.run @@ fun sw -> for i = min to max do Fiber.fork ~sw (fun () -> - Private.Ctf.set_name (Fmt.str "worker>%d" i); + Private.Tracing.set_name (Fmt.str "worker>%d" i); for i = 0 to max do (* Some more GC action *) for _i = 0 to 100 do @@ -39,7 +39,7 @@ let main clock = Switch.run ~name:"main" @@ fun sw -> (* A long running task *) Fiber.fork ~sw (fun () -> - Private.Ctf.set_name "waiter"; + Private.Tracing.set_name "waiter"; traceln "stuck waiting :("; Promise.await p; traceln "Done"); @@ -53,6 +53,6 @@ let main clock = let () = Eio_main.run @@ fun env -> - Ctf.with_tracing @@ fun () -> + Tracing.with_tracing @@ fun () -> let clock = Stdenv.clock env in main clock diff --git a/example/burn_domains.ml b/example/burn_domains.ml index 73da2ec..a1574a2 100644 --- a/example/burn_domains.ml +++ b/example/burn_domains.ml @@ -42,7 +42,7 @@ let main dom_mgr clock = let () = Eio_main.run @@ fun env -> - Ctf.with_tracing @@ fun () -> + Tracing.with_tracing @@ fun () -> let clock = Stdenv.clock env in let dom_mgr = Stdenv.domain_mgr env in main dom_mgr clock diff --git a/example/deadlock.ml b/example/deadlock.ml index 86bb168..d80dd6c 100644 --- a/example/deadlock.ml +++ b/example/deadlock.ml @@ -4,7 +4,7 @@ let fork wait = Switch.run @@ fun sw -> Fiber.fork ~sw (fun () -> (* Also add a really big label to test the handling of that in CTF. *) - Eio.Private.Ctf.log (String.make 5000 'e'); + Eio.Private.Tracing.log (String.make 5000 'e'); Promise.await wait) let main () = diff --git a/example/main.ml b/example/main.ml index a908654..3f37fbd 100644 --- a/example/main.ml +++ b/example/main.ml @@ -21,6 +21,6 @@ let main clock = let () = Eio_main.run @@ fun env -> - Ctf.with_tracing @@ fun () -> + Tracing.with_tracing @@ fun () -> let clock = Stdenv.clock env in main clock diff --git a/meio.opam b/meio.opam index a429983..c2c7a68 100644 --- a/meio.opam +++ b/meio.opam @@ -16,6 +16,7 @@ depends: [ "nottui" "cmdliner" "hdr_histogram" + "eio_main" {with-test} "odoc" {with-doc} ] build: [ @@ -35,3 +36,7 @@ build: [ ["dune" "install" "-p" name "--create-install-files" name] ] dev-repo: "git+https://github.com/patricoferris/eio-console.git" +pin-depends:[ + [ "eio.dev" "git+https://github.com/patricoferris/eio#dbd52c66a6e463720b48cb835d01f0e5c7c0b170"] + [ "eio_main.dev" "git+https://github.com/patricoferris/eio#dbd52c66a6e463720b48cb835d01f0e5c7c0b170" ] +] diff --git a/src/lib/task_tree.ml b/src/lib/task_tree.ml index eaa5b1c..9703dfa 100644 --- a/src/lib/task_tree.ml +++ b/src/lib/task_tree.ml @@ -30,7 +30,7 @@ let invalidate t = List.iter Lwd.invalidate t.waiters let add t (task : Task.t) = match task.kind with - | Meio_runtime_events.Cancellation_context _ | Meio_runtime_events.Task -> ( + | Meio_runtime_events.Cancellation_context _ -> ( match Hashtbl.find_opt t.by_id (Task.Id.extern_of_int task.parent_id) with | None -> Logs.warn (fun f ->