[llvm-bugs] [Bug 32620] New: Test failing because cycleFrequency unable to determine CPU frequency for TSC accounting

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 11 01:48:23 PDT 2017


http://bugs.llvm.org/show_bug.cgi?id=32620

            Bug ID: 32620
           Summary: Test failing because cycleFrequency unable to
                    determine CPU frequency for TSC accounting
           Product: XRay
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Runtime
          Assignee: dberris at google.com
          Reporter: douglas_yung at playstation.sony.com
                CC: llvm-bugs at lists.llvm.org

On my machine, an x86_64 Linux VM that does not expose support for rdtscp, the
timestamp emulation is unable to determine the CPU frequency causing the test "
XRay-x86_64-linux :: TestCases/Linux/fdr-mode.cc" to fail.

When trying to run the xray instrumented binary, here is the output generated:

Command: XRAY_OPTIONS="patch_premain=false xray_naive_log=false
xray_logfile_base=fdr-logging-test- xray_fdr_log=true verbosity=1
xray_fdr_log_func_duration_threshold_us=0" 
/home/dyung/src/git/merge/build/projects/compiler-rt/test/xray/X86_64LinuxConfig/TestCases/Linux/Output/fdr-mode.cc.tmp

Output:
==32513==Missing rdtscp support.
==32513==WARNING: Required CPU features missing for XRay instrumentation, using
emulation instead.
Logging before init.
==32513==XRay FDR init successful.
Init status 2
Patching...
==32513==Missing rdtscp support.
==32513==Unable to determine CPU frequency for TSC accounting.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Unable to determine CPU frequency for TSC accounting.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
Joined
Finalize status 4
==32513==Missing rdtscp support.
==32513==Missing rdtscp support.
Main execution var = 6
==32513==XRay: Log file in 'fdr-logging-test-fdr-mode.cc.tmp.njhGht'
==32513==Unable to determine CPU frequency for TSC accounting.
Flush status 2


Then when the resulting file is run through llvm-xray:

Command: /home/dyung/src/git/merge/build/./bin/llvm-xray convert --symbolize
--output-format=yaml
-instr_map=/home/dyung/src/git/merge/build/projects/compiler-rt/test/xray/X86_64LinuxConfig/TestCases/Linux/Output/fdr-mode.cc.tmp
"`ls fdr-unwrite-test-* | head -1`"

Output:
header:
  version:         1
  type:            1
  constant-tsc:    true
  nonstop-tsc:     true
  cycle-frequency: 0
records:
  - { type: 0, func-id: 3, function: 'fA()', cpu: 0, thread: 32513, kind:
function-enter, tsc: 1491898914518840766 }
...

On my Linux VM, here is the output of /proc/cpuinfo:

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 60
model name      : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
stepping        : 3
microcode       : 0xffffffff
cpu MHz         : 3201.432
cache size      : 8192 KB
physical id     : 0
siblings        : 8
core id         : 0
cpu cores       : 8
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good
nopl eagerfpu pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave
avx f16c rdrand hypervisor lahf_lm abm fsgsbase bmi1 avx2 smep bmi2 erms
xsaveopt
bugs            :
bogomips        : 6402.86
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:


Additionally, neither of the files that cycleFrequency() is looking for to find
the CPU frequency are present on my system.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170411/3f9f20a4/attachment.html>


More information about the llvm-bugs mailing list