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

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Apr 12 18:51:35 PDT 2017


Douglas Yung <douglas_yung at playstation.sony.com> changed:

           What    |Removed                     |Added
         Resolution|FIXED                       |---
             Status|RESOLVED                    |REOPENED

--- Comment #5 from Douglas Yung <douglas_yung at playstation.sony.com> ---
So it turns out my fix didn't solve the problem. Digging deeper into the test
machine, it turns out that the machine DOES support rdtscp, however, it is
unable to determine the CPU frequency, so that function returns 0, causing the
test to fail.

I tried to implement the frequency detection that Dean mentioned in comment 3,
and I have something that kind of works, but needs to be cleaned up, but my
concern is that it may only work for Intel processors. As far as I can tell,
AMD does not include the processor frequency in their processor brand string,
so that method would not work. Unfortunately I don't have any AMD linux
machines in my office that I can check with either.

But possibly another work-around might be to use the emulated TSC if either
rdtscp support is not present, or if the CPU frequency cannot be determined. I
think that should solve the problem I am seeing on our test machine here.

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/20170413/875d4164/attachment-0001.html>

More information about the llvm-bugs mailing list