[PATCH] D29438: [XRay] Probe for CPU features that XRay needs

Jonas Bülow via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 05:40:14 PDT 2017


jbulow added a comment.

probeRequiredCPUFeatures does not detect rdtscp correctly.



================
Comment at: compiler-rt/trunk/lib/xray/xray_x86_64.cc:211-213
+  // EDX. That's 0x8000000 (or 1u << 26).
+  __get_cpuid(0x80000001, &EAX, &EBX, &ECX, &EDX);
+  if (!(EDX & (1u << 26))) {
----------------
1u<<26 == 0x4000000

Changing 26 to 27 solves this problem when running with xray enabled:


```
==20069==Missing rdtscp support.

```




Repository:
  rL LLVM

https://reviews.llvm.org/D29438





More information about the llvm-commits mailing list