[PATCH] D46938: [Timers] TimerGroup: make printJSONValues() method public

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 16 11:20:08 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL332505: [Timers] TimerGroup: make printJSONValues() method public (authored by lebedevri, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D46938?vs=147054&id=147139#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D46938

Files:
  llvm/trunk/include/llvm/Support/Timer.h
  llvm/trunk/lib/Support/Timer.cpp


Index: llvm/trunk/lib/Support/Timer.cpp
===================================================================
--- llvm/trunk/lib/Support/Timer.cpp
+++ llvm/trunk/lib/Support/Timer.cpp
@@ -378,6 +378,8 @@
 }
 
 const char *TimerGroup::printJSONValues(raw_ostream &OS, const char *delim) {
+  sys::SmartScopedLock<true> L(*TimerLock);
+
   prepareToPrintList();
   for (const PrintRecord &R : TimersToPrint) {
     OS << delim;
Index: llvm/trunk/include/llvm/Support/Timer.h
===================================================================
--- llvm/trunk/include/llvm/Support/Timer.h
+++ llvm/trunk/include/llvm/Support/Timer.h
@@ -207,6 +207,8 @@
   /// 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);
 
@@ -223,7 +225,6 @@
   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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46938.147139.patch
Type: text/x-patch
Size: 1268 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180516/dd2421c3/attachment.bin>


More information about the llvm-commits mailing list