From: Brian Norris Date: Sat, 17 Nov 2012 01:44:50 +0000 (-0800) Subject: print stats only at end of execution X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e83585ce14ab6ae325c83d815dce8eb77b0e5897;p=c11tester.git print stats only at end of execution --- diff --git a/main.cc b/main.cc index 10e2d3b9..f55b98df 100644 --- a/main.cc +++ b/main.cc @@ -130,6 +130,8 @@ static void model_main() { model->finish_execution(); } while (model->next_execution()); + model->print_stats(); + delete model; DEBUG("Exiting\n"); diff --git a/model.cc b/model.cc index 8dcb6f3a..0bc2bde8 100644 --- a/model.cc +++ b/model.cc @@ -436,7 +436,6 @@ bool ModelChecker::next_execution() checkDataRaces(); print_bugs(); model_print("\n"); - print_stats(); print_summary(); } else if (DBG_ENABLED()) { model_print("\n"); diff --git a/model.h b/model.h index 85deb05e..86fa3e6a 100644 --- a/model.h +++ b/model.h @@ -122,6 +122,7 @@ public: void set_assert() {asserted=true;} bool is_deadlocked() const; bool is_complete_execution() const; + void print_stats() const; /** @brief Alert the model-checker that an incorrectly-ordered * synchronization was made */ @@ -246,7 +247,6 @@ private: /** @brief The cumulative execution stats */ struct execution_stats stats; void record_stats(); - void print_stats() const; bool have_bug_reports() const; void print_bugs() const;