[PATCH] D29742: [XRay] Implement powerpc64le xray.

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 00:43:45 PST 2017


dberris requested changes to this revision.
dberris added inline comments.
This revision now requires changes to proceed.


================
Comment at: compiler-rt/lib/xray/xray_powerpc64.cc:34
+
+uint64_t cycleFrequency() XRAY_NEVER_INSTRUMENT { return NanosecondsPerSecond; }
+
----------------
Just curious -- does ppc not have an equivalent for `rdtscp` instruction in userspace?

If it does, we should try and use that as well as get the actual cycle frequency in Linux through the various possible means.


================
Comment at: compiler-rt/lib/xray/xray_powerpc64.cc:50-52
+#else
+#error powerpc64 big endian is not supported for now
+#endif
----------------
Can we do this check once somewhere at the top of the file? Something like:

```
#if !defined(__LITTLE_ENDIAN__)
#error ...
#endif
```


================
Comment at: compiler-rt/lib/xray/xray_utils.cc:175
+// icache invalidation for PPC and ARM.
+#if defined(__APPLE__)
+
----------------
As far as I can tell, we don't build XRay for Mac OS (unless this is being done for other reasons). Will this work just fine without `#if defined(__APPLE__)` here?


https://reviews.llvm.org/D29742





More information about the llvm-commits mailing list