diff --git a/src/lib_ppx_profiler/ppx_profiler.ml b/src/lib_ppx_profiler/ppx_profiler.ml index 804be2bb36a9e35b9a3dae3b857d88d4d2f08cd8..79d7fd803ff7d049be636da640a7fcd9d7e2db84 100644 --- a/src/lib_ppx_profiler/ppx_profiler.ml +++ b/src/lib_ppx_profiler/ppx_profiler.ml @@ -23,7 +23,11 @@ let mapper = inherit Ppxlib.Ast_traverse.map as super method! expression e = - let detected_rewriters = Rewriter.extract_rewriters e.pexp_attributes in + let detected_rewriters = + (* The list of attributes is reverted to make sure that we preprocess + them from left to right *) + Rewriter.extract_rewriters (List.rev e.pexp_attributes) + in (* Remove the handled attributes that have been transformed in rewriters *) Expression.remove_attributes e (* Transform the expression with the help of the list of rewriters *) diff --git a/src/lib_shell/prevalidator.ml b/src/lib_shell/prevalidator.ml index 10db4ddd65d06e618d248c40071197f7d7b52ca1..3a14e0c0be4eb0ac83e5b730d2c0d4124ef1ab19 100644 --- a/src/lib_shell/prevalidator.ml +++ b/src/lib_shell/prevalidator.ml @@ -1427,8 +1427,8 @@ module Make match request with | Request.Flush (hash, event, live_blocks, live_operations) -> ( () - [@profiler.record Format.sprintf "%s" (Block_hash.to_b58check hash)] - [@profiler.stop] ; + [@profiler.stop] + [@profiler.record Format.sprintf "%s" (Block_hash.to_b58check hash)] ; Requests.on_advertise pv.shell ; (* TODO: https://gitlab.com/tezos/tezos/-/issues/1727 Rebase the advertisement instead. *) diff --git a/src/lib_store/unix/block_store.ml b/src/lib_store/unix/block_store.ml index 6c2b69118e94a982585e3e53117fd41b91837865..78296d2a3777037230fbd6c1e4410408b01678db 100644 --- a/src/lib_store/unix/block_store.ml +++ b/src/lib_store/unix/block_store.ml @@ -1446,8 +1446,8 @@ let merge_stores ?(cycle_size_limit = default_cycle_size_limit) block_store (* Do not allow multiple merges: force waiting for a potential previous merge. *) () - [@profiler.record "merge store"] - [@profiler.reset_block_section Block_repr.hash new_head] ; + [@profiler.reset_block_section Block_repr.hash new_head] + [@profiler.record "merge store"] ; let*! () = Lwt_mutex.lock block_store.merge_mutex in protect ~on_error:(fun err ->