[PATCH] D43981: [XRay] [compiler-rt] [macosx] Add getTSCFrequency implementation for macOS.

Nicholas Levin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 1 18:46:59 PST 2018

nglevin marked an inline comment as done.
nglevin added inline comments.

Comment at: lib/xray/xray_x86_64.cc:107
+    currentTime /= TimebaseInfo.denom;
+    return currentTime;
kubamracek wrote:
> Why are we returning "current time" when the function is supposed to return "TSC frequency"? How is a current timestamp a frequency value?
That was supposed to be the fallback logic that I had discussed earlier with Dean.

My fault for putting this in the wrong file, where here, I should be using sysctl directly instead of a clock_gettime()-like workaround. As was previously done in the *BSD code path.


  rCRT Compiler Runtime


More information about the llvm-commits mailing list