Summary:
This is needed for the continuation of D46504,
to be able to store the timings.
Reviewers: george.karpenkov, NoQ, alexfh, sbenza
Reviewed By: alexfh
Subscribers: llvm-commits, cfe-commits
Differential Revision: https://reviews.llvm.org/D46938
llvm-svn: 332505
/// This static method prints all timers and clears them all out.
static void printAll(raw_ostream &OS);
+ const char *printJSONValues(raw_ostream &OS, const char *delim);
+
/// Prints all timers as JSON key/value pairs, and clears them all out.
static const char *printAllJSONValues(raw_ostream &OS, const char *delim);
void PrintQueuedTimers(raw_ostream &OS);
void printJSONValue(raw_ostream &OS, const PrintRecord &R,
const char *suffix, double Value);
- const char *printJSONValues(raw_ostream &OS, const char *delim);
};
} // end namespace llvm
}
const char *TimerGroup::printJSONValues(raw_ostream &OS, const char *delim) {
+ sys::SmartScopedLock<true> L(*TimerLock);
+
prepareToPrintList();
for (const PrintRecord &R : TimersToPrint) {
OS << delim;