From 892eeb13f7389e22e3c66a7cb3878aa2801882ce Mon Sep 17 00:00:00 2001 From: Varun Arora Date: Mon, 12 Mar 2018 11:08:48 -0700 Subject: [PATCH] [bugfix] fix double logging of backend perf stats Summary: Backend perf stats were previously being logged as both `driver_stats` and `backend_stats`. Now they are correctly logged only as `backend_stats`, and a single `driver_stats` exists for the top-level driver process. Reviewed By: dulmarod Differential Revision: D7195879 fbshipit-source-id: 0f2ddc0 --- infer/src/integration/Driver.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/infer/src/integration/Driver.ml b/infer/src/integration/Driver.ml index 84ebbee36..1ae444ee0 100644 --- a/infer/src/integration/Driver.ml +++ b/infer/src/integration/Driver.ml @@ -534,7 +534,9 @@ let mode_from_command_line = let run_prologue mode = - if CLOpt.is_originator then L.environment_info "%a@\n" Config.pp_version () ; + if CLOpt.is_originator then ( + L.environment_info "%a@\n" Config.pp_version () ; + register_perf_stats_report () ) ; if Config.debug_mode then L.environment_info "Driver mode:@\n%a@." pp_mode mode ; if Config.dump_duplicate_symbols then reset_duplicates_file () ; (* infer might be called from a Makefile and itself uses `make` to run the analysis in parallel, @@ -542,7 +544,6 @@ let run_prologue mode = anyway, pretend that we are not called from another make to prevent make falling back to a mono-threaded execution. *) Unix.unsetenv "MAKEFLAGS" ; - register_perf_stats_report () ; ()