[PATCH] D78030: [TimeProfiler] Emit clock synchronization point

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 14 12:24:44 PDT 2020


MaskRay added inline comments.


================
Comment at: llvm/lib/Support/TimeProfiler.cpp:266
+      const auto BeginningOfTimeUs = SystemTime - ProcessLocalTime;
+      J.attribute("beginningOfTime",
+                  BeginningOfTimeUs.time_since_epoch().count());
----------------
What is the logic here?

Two events in the same process may have different `beginningOfTime`. Is that intended?

Noe that `system_clock::now()` and `steady_clock::now()` are not measured at the same time.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78030/new/

https://reviews.llvm.org/D78030





More information about the cfe-commits mailing list