From 7cb539d3eab293fc84b7327a5ad322539e4fe514 Mon Sep 17 00:00:00 2001 From: Julien Sagot Date: Thu, 13 Feb 2025 15:33:02 +0100 Subject: [PATCH] Profiler: fix missing simple backends initialization in baker --- manifest/product_octez.ml | 1 + src/proto_021_PsQuebec/bin_accuser/dune | 6 ++++-- src/proto_021_PsQuebec/bin_baker/dune | 6 ++++-- src/proto_021_PsQuebec/bin_baker/main_baker_021_PsQuebec.ml | 3 +++ src/proto_alpha/bin_accuser/dune | 6 ++++-- src/proto_alpha/bin_baker/dune | 6 ++++-- src/proto_alpha/bin_baker/main_baker_alpha.ml | 3 +++ src/proto_next/bin_accuser/dune | 6 ++++-- src/proto_next/bin_baker/dune | 6 ++++-- src/proto_next/bin_baker/main_baker_next.ml | 3 +++ 10 files changed, 34 insertions(+), 12 deletions(-) diff --git a/manifest/product_octez.ml b/manifest/product_octez.ml index de5c5229f014..ba4cfcc57164 100644 --- a/manifest/product_octez.ml +++ b/manifest/product_octez.ml @@ -7021,6 +7021,7 @@ let hash = Protocol.hash baking_commands |> if_some |> open_; octez_stdlib_unix |> open_; octez_client_base_unix |> open_; + octez_profiler_backends |> open_; ] in let _baker = daemon "baker" in diff --git a/src/proto_021_PsQuebec/bin_accuser/dune b/src/proto_021_PsQuebec/bin_accuser/dune index 137d2f576760..1a2308ab6d90 100644 --- a/src/proto_021_PsQuebec/bin_accuser/dune +++ b/src/proto_021_PsQuebec/bin_accuser/dune @@ -16,7 +16,8 @@ octez-shell-libs.client-commands octez-protocol-021-PsQuebec-libs.baking-commands octez-libs.stdlib-unix - octez-shell-libs.client-base-unix) + octez-shell-libs.client-base-unix + octez-libs.octez-profiler.backends) (link_flags (:standard) (:include %{workspace_root}/static-link-flags.sexp) @@ -29,4 +30,5 @@ -open Tezos_client_commands -open Tezos_baking_021_PsQuebec_commands -open Tezos_stdlib_unix - -open Tezos_client_base_unix)) + -open Tezos_client_base_unix + -open Tezos_profiler_backends)) diff --git a/src/proto_021_PsQuebec/bin_baker/dune b/src/proto_021_PsQuebec/bin_baker/dune index 85e70a7bf7a6..315c7a12a475 100644 --- a/src/proto_021_PsQuebec/bin_baker/dune +++ b/src/proto_021_PsQuebec/bin_baker/dune @@ -16,7 +16,8 @@ octez-shell-libs.client-commands octez-protocol-021-PsQuebec-libs.baking-commands octez-libs.stdlib-unix - octez-shell-libs.client-base-unix) + octez-shell-libs.client-base-unix + octez-libs.octez-profiler.backends) (link_flags (:standard) (:include %{workspace_root}/static-link-flags.sexp) @@ -29,4 +30,5 @@ -open Tezos_client_commands -open Tezos_baking_021_PsQuebec_commands -open Tezos_stdlib_unix - -open Tezos_client_base_unix)) + -open Tezos_client_base_unix + -open Tezos_profiler_backends)) diff --git a/src/proto_021_PsQuebec/bin_baker/main_baker_021_PsQuebec.ml b/src/proto_021_PsQuebec/bin_baker/main_baker_021_PsQuebec.ml index 05b95923263b..bf7eeba80cbb 100644 --- a/src/proto_021_PsQuebec/bin_baker/main_baker_021_PsQuebec.ml +++ b/src/proto_021_PsQuebec/bin_baker/main_baker_021_PsQuebec.ml @@ -24,6 +24,9 @@ (* *) (*****************************************************************************) +(** Force linking for having Simple_profiler to init few backends by itself *) +let () = ignore Simple_profiler.headless + let () = Client_commands.register Protocol.hash @@ fun _network -> List.map (Tezos_clic.map_command (new Protocol_client_context.wrap_full)) diff --git a/src/proto_alpha/bin_accuser/dune b/src/proto_alpha/bin_accuser/dune index 03801c83b3c3..6ac28dfde23c 100644 --- a/src/proto_alpha/bin_accuser/dune +++ b/src/proto_alpha/bin_accuser/dune @@ -16,7 +16,8 @@ octez-shell-libs.client-commands octez-protocol-alpha-libs.baking-commands octez-libs.stdlib-unix - octez-shell-libs.client-base-unix) + octez-shell-libs.client-base-unix + octez-libs.octez-profiler.backends) (link_flags (:standard) (:include %{workspace_root}/static-link-flags.sexp) @@ -29,4 +30,5 @@ -open Tezos_client_commands -open Tezos_baking_alpha_commands -open Tezos_stdlib_unix - -open Tezos_client_base_unix)) + -open Tezos_client_base_unix + -open Tezos_profiler_backends)) diff --git a/src/proto_alpha/bin_baker/dune b/src/proto_alpha/bin_baker/dune index 1aa4f97899a4..b61b7334fc35 100644 --- a/src/proto_alpha/bin_baker/dune +++ b/src/proto_alpha/bin_baker/dune @@ -16,7 +16,8 @@ octez-shell-libs.client-commands octez-protocol-alpha-libs.baking-commands octez-libs.stdlib-unix - octez-shell-libs.client-base-unix) + octez-shell-libs.client-base-unix + octez-libs.octez-profiler.backends) (link_flags (:standard) (:include %{workspace_root}/static-link-flags.sexp) @@ -29,4 +30,5 @@ -open Tezos_client_commands -open Tezos_baking_alpha_commands -open Tezos_stdlib_unix - -open Tezos_client_base_unix)) + -open Tezos_client_base_unix + -open Tezos_profiler_backends)) diff --git a/src/proto_alpha/bin_baker/main_baker_alpha.ml b/src/proto_alpha/bin_baker/main_baker_alpha.ml index 05b95923263b..bf7eeba80cbb 100644 --- a/src/proto_alpha/bin_baker/main_baker_alpha.ml +++ b/src/proto_alpha/bin_baker/main_baker_alpha.ml @@ -24,6 +24,9 @@ (* *) (*****************************************************************************) +(** Force linking for having Simple_profiler to init few backends by itself *) +let () = ignore Simple_profiler.headless + let () = Client_commands.register Protocol.hash @@ fun _network -> List.map (Tezos_clic.map_command (new Protocol_client_context.wrap_full)) diff --git a/src/proto_next/bin_accuser/dune b/src/proto_next/bin_accuser/dune index b36c5f31b0ac..ebbf0d9b52e2 100644 --- a/src/proto_next/bin_accuser/dune +++ b/src/proto_next/bin_accuser/dune @@ -16,7 +16,8 @@ octez-shell-libs.client-commands octez-protocol-next-libs.baking-commands octez-libs.stdlib-unix - octez-shell-libs.client-base-unix) + octez-shell-libs.client-base-unix + octez-libs.octez-profiler.backends) (link_flags (:standard) (:include %{workspace_root}/static-link-flags.sexp) @@ -29,4 +30,5 @@ -open Tezos_client_commands -open Tezos_baking_next_commands -open Tezos_stdlib_unix - -open Tezos_client_base_unix)) + -open Tezos_client_base_unix + -open Tezos_profiler_backends)) diff --git a/src/proto_next/bin_baker/dune b/src/proto_next/bin_baker/dune index 50fc43aee1be..3e5740c0245b 100644 --- a/src/proto_next/bin_baker/dune +++ b/src/proto_next/bin_baker/dune @@ -16,7 +16,8 @@ octez-shell-libs.client-commands octez-protocol-next-libs.baking-commands octez-libs.stdlib-unix - octez-shell-libs.client-base-unix) + octez-shell-libs.client-base-unix + octez-libs.octez-profiler.backends) (link_flags (:standard) (:include %{workspace_root}/static-link-flags.sexp) @@ -29,4 +30,5 @@ -open Tezos_client_commands -open Tezos_baking_next_commands -open Tezos_stdlib_unix - -open Tezos_client_base_unix)) + -open Tezos_client_base_unix + -open Tezos_profiler_backends)) diff --git a/src/proto_next/bin_baker/main_baker_next.ml b/src/proto_next/bin_baker/main_baker_next.ml index 05b95923263b..bf7eeba80cbb 100644 --- a/src/proto_next/bin_baker/main_baker_next.ml +++ b/src/proto_next/bin_baker/main_baker_next.ml @@ -24,6 +24,9 @@ (* *) (*****************************************************************************) +(** Force linking for having Simple_profiler to init few backends by itself *) +let () = ignore Simple_profiler.headless + let () = Client_commands.register Protocol.hash @@ fun _network -> List.map (Tezos_clic.map_command (new Protocol_client_context.wrap_full)) -- GitLab