[Stats] Clear all timers on print, since they stopped self-clearing recently.

This commit is contained in:
Graydon Hoare
2018-08-24 17:42:26 -07:00
parent e66170211a
commit a25dd40fb9
2 changed files with 5 additions and 0 deletions

View File

@@ -444,6 +444,7 @@ UnifiedStatsReporter::printAlwaysOnStatsAndTimers(raw_ostream &OS) {
}
// Print timers.
TimerGroup::printAllJSONValues(OS, delim);
TimerGroup::clearAll();
OS << "\n}\n";
OS.flush();
}
@@ -664,6 +665,7 @@ UnifiedStatsReporter::~UnifiedStatsReporter()
#if !defined(NDEBUG) || defined(LLVM_ENABLE_STATS)
publishAlwaysOnStatsToLLVM();
PrintStatisticsJSON(ostream);
TimerGroup::clearAll();
#else
printAlwaysOnStatsAndTimers(ostream);
#endif