From e2ff2c973d0ede5803d18adcd844a1c816d2bc9e Mon Sep 17 00:00:00 2001 From: "Jonathan R. Madsen" Date: Mon, 18 Jul 2022 09:41:03 -0500 Subject: [PATCH] Remove get_perfetto_output_filename().clear() (#89) - unnecessary and causing excess overhead [ROCm/rocprofiler-systems commit: 6bc86d11118530b5fe6f72d5c040e52068f848c1] --- .../source/lib/omnitrace/library/components/mpi_gotcha.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/projects/rocprofiler-systems/source/lib/omnitrace/library/components/mpi_gotcha.cpp b/projects/rocprofiler-systems/source/lib/omnitrace/library/components/mpi_gotcha.cpp index 34922481df..01abbfba32 100644 --- a/projects/rocprofiler-systems/source/lib/omnitrace/library/components/mpi_gotcha.cpp +++ b/projects/rocprofiler-systems/source/lib/omnitrace/library/components/mpi_gotcha.cpp @@ -170,7 +170,6 @@ mpi_gotcha::update() tim::mpi::set_rank(_rank); tim::mpi::set_size(_size); tim::settings::default_process_suffix() = _rank; - get_perfetto_output_filename().clear(); OMNITRACE_BASIC_VERBOSE(0, "[pid=%i] MPI rank: %i (%i), MPI size: %i (%i)\n", process::get_id(), tim::mpi::rank(), _rank, @@ -338,7 +337,7 @@ mpi_gotcha::audit(const gotcha_data_t& _data, audit::outgoing, int _retval) static thread_local int _num_updates = 0; static int _disable_after = tim::get_env("OMNITRACE_MPI_MAX_COMM_UPDATES", 4); - if(update() && ++_num_updates >= _disable_after) disable_comm_intercept(); + if(_num_updates++ < _disable_after) update(); } } }