[PATCH] D46603: [Support] TimerGroup changes

George Karpenkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 15 17:31:52 PDT 2018


george.karpenkov added a comment.

I see four separate changes: s/.sys/mem one (can be committed without review), exposing printJSONValues and consequent adding of a lock, adding a constructor accepting a map, and fixing formatting in `printJSONValue`. All four look good to me, but probably should be reviewed separately.



================
Comment at: lib/Support/Timer.cpp:385
+  constexpr auto max_digits10 = std::numeric_limits<double>::max_digits10;
+  OS << "\t\"time." << Name << '.' << R.Name << suffix
+     << "\": " << format("%.*e", max_digits10 - 1, Value);
----------------
This change seems unrelated to the new constructor accepting map, right?


================
Comment at: lib/Support/Timer.cpp:405
       OS << delim;
-      printJSONValue(OS, R, ".sys", T.getMemUsed());
+      printJSONValue(OS, R, ".mem", T.getMemUsed());
     }
----------------
That's independent from this change, right?


Repository:
  rL LLVM

https://reviews.llvm.org/D46603





More information about the llvm-commits mailing list