From e7c64e12f931f3865d7fcdd62c2224a6ae8a7dbc Mon Sep 17 00:00:00 2001 From: "Madsen, Jonathan" Date: Wed, 5 Mar 2025 10:59:06 -0600 Subject: [PATCH] [rocprofv3] Fix calculation of services which collected data (#265) Co-authored-by: Jonathan R. Madsen --- source/lib/rocprofiler-sdk-tool/tool.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/lib/rocprofiler-sdk-tool/tool.cpp b/source/lib/rocprofiler-sdk-tool/tool.cpp index 7a33b89b69..b70607b7a0 100644 --- a/source/lib/rocprofiler-sdk-tool/tool.cpp +++ b/source/lib/rocprofiler-sdk-tool/tool.cpp @@ -1643,12 +1643,14 @@ generate_output(tool::buffered_output& output_v, { if(!output_v) return; - // if it has reached this point, the generator is not empty - num_output_v += 1; - // opens temporary file and sets read position to beginning output_v.read(); + if(output_v.get_generator().empty()) return; + + // if it has reached this point, the generator is not empty + num_output_v += 1; + if(tool::get_config().stats || tool::get_config().summary_output) { output_v.stats =