[PATCH] D43278: Add Xray instrumentation support to FreeBSD

David CARLIER via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 09:11:03 PST 2018


devnexen added inline comments.


================
Comment at: lib/xray/xray_x86_64.cc:286
+#else
+  __asm__ __volatile__("cpuid" : "=a"(EAX), "=b"(EBX), "=c"(ECX), "=d"(EDX)
+    : "0"(0x80000001));
----------------
krytarowski wrote:
> devnexen wrote:
> > krytarowski wrote:
> > > This should be used for all OSes. `__get_cpuid` is GLIBC specific.
> > I m not too keen for this change (not changing even in the slighest the Linux behavior) but if everyone is backing you up on this I ll change.
> I think these two `asm` parts are important to get done in order to not desync platforms for no good reason. Also nobody likes `ifdefs`.
> 
> Alternatively we can add a fallback implementation of `__get_cpuid` and `__rdtscp` for !Linux.
Ok these are enough valid reasons, will do the first suggestion.


https://reviews.llvm.org/D43278





More information about the llvm-commits mailing list