diff options
Diffstat (limited to 'include/llvm/Support/Timer.h')
| -rw-r--r-- | include/llvm/Support/Timer.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/llvm/Support/Timer.h b/include/llvm/Support/Timer.h index bfffbc3157b1..a11c3ce3ff22 100644 --- a/include/llvm/Support/Timer.h +++ b/include/llvm/Support/Timer.h @@ -206,15 +206,23 @@ public: Description.assign(NewDescription.begin(), NewDescription.end()); } - /// Print any started timers in this group and zero them. + /// Print any started timers in this group. void print(raw_ostream &OS); - /// This static method prints all timers and clears them all out. + /// Clear all timers in this group. + void clear(); + + /// This static method prints all timers. static void printAll(raw_ostream &OS); + /// Clear out all timers. This is mostly used to disable automatic + /// printing on shutdown, when timers have already been printed explicitly + /// using \c printAll or \c printJSONValues. + static void clearAll(); + const char *printJSONValues(raw_ostream &OS, const char *delim); - /// Prints all timers as JSON key/value pairs, and clears them all out. + /// Prints all timers as JSON key/value pairs. static const char *printAllJSONValues(raw_ostream &OS, const char *delim); /// Ensure global timer group lists are initialized. This function is mostly |
