[PATCH] D25360: [XRay] [NFC] [compiler-rt] Move machine-dependent code into machine-dependent files.

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 18 17:52:32 PST 2016


dberris requested changes to this revision.
dberris added a comment.
This revision now requires changes to proceed.

Just a few more...



================
Comment at: lib/xray/xray_emulate_tsc.h:8
+
+uint64_t readTSC(uint8_t &CPU) {
+  timespec TS;
----------------
You can't mark this always inline as well? Also probably want the never instrument attribute here.


================
Comment at: lib/xray/xray_emulate_tsc.h:20
+
+uint64_t cycleFrequency() {
+  // There is no instruction like RDTSCP in user mode on ARM.  ARM's CP15 does
----------------
Same here, always inline and never instrument?


================
Comment at: lib/xray/xray_x86_64.cc:56
+
+uint64_t cycleFrequency() {
+  long long CPUFrequency = -1;
----------------
Always inline, never instrument?


================
Comment at: lib/xray/xray_x86_64.h:8
+
+ALWAYS_INLINE uint64_t readTSC(uint8_t &CPU) {
+  unsigned LongCPU;
----------------
Also never instrument?


https://reviews.llvm.org/D25360





More information about the llvm-commits mailing list