From c7dabff3aaab59649fba8dc18ae5dadf0c0b8f20 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 21 Nov 2017 08:34:22 +0200 Subject: Improve skipped update diagnostics Instead of printing a line for each target skipped we now print a summary with count at the end. We also now show the skip count in progress. --- build2/context.hxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'build2/context.hxx') diff --git a/build2/context.hxx b/build2/context.hxx index dbb41ae..c3e0595 100644 --- a/build2/context.hxx +++ b/build2/context.hxx @@ -283,11 +283,13 @@ namespace build2 // with the expectation of it reaching 0. Used as a sanity check. // // The target count is incremented after a non-noop recipe is matched and - // decremented after such recipe has been executed. Used for progress - // monitoring. + // decremented after such recipe has been executed. If such a recipe has + // skipped updating the target, then it should increment the skip count. + // These two counters are used for progress monitoring and diagnostics. // extern atomic_count dependency_count; extern atomic_count target_count; + extern atomic_count skip_count; inline void set_current_mif (const meta_operation_info& mif) @@ -307,9 +309,11 @@ namespace build2 current_on++; current_mode = inner_oif.mode; - // Serial. + // Reset counters (serial execution). + // dependency_count.store (0, memory_order_relaxed); target_count.store (0, memory_order_relaxed); + skip_count.store (0, memory_order_relaxed); } // Keep going flag. -- cgit v1.1