[PATCH] D32844: [XRay] [compiler-rt] FDR logging arg1 handler

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 23:01:33 PDT 2017


dberris accepted this revision.
dberris added a comment.
This revision is now accepted and ready to land.

LGTM (with a couple of suggestions)



================
Comment at: lib/xray/xray_fdr_logging_impl.h:613
+//     the correct TSC delta.
+inline uint32_t writeTSCForThisCPU(uint64_t TSC, uint8_t CPU) {
+  uint32_t RecordTSCDelta = 0;
----------------
nit: `writeTSCForThisCPU` -> `writeCurrentCPUTSC`


================
Comment at: lib/xray/xray_fdr_logging_impl.h:623
+    auto Delta = TSC - LastTSC;
+    if (Delta > (1ULL << 32) - 1)
+      writeTSCWrapMetadata(TSC);
----------------
Consider using `std::numeric_limits<int32_t>::max()` instead.


https://reviews.llvm.org/D32844





More information about the llvm-commits mailing list