-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot get TSC frequency by CPU feature detection #8
Comments
The baseline of tsc frequency is from: https://github.com/templexxx/cpu/blob/master/cpu_x86.go And the logic in these codes couldn't handle your platform (see func getNativeTSCFrequency for details) Could you print some useful infos between the key steps in that function? That would help a lot. @simonhf Thank you! |
@templexxx Thank for the quick response! I did the following to see what happens in
Looks like this line [1] https://github.com/templexxx/cpu/blob/master/cpu_x86.go#L180 |
That helps a lot. Thank you! I think the issue is caused by the max "Input Value for Basic CPUID Information" has been modified in the virutal machine. And the next calling needs to pass value which is bigger than the accepetable value returned by the CPUID. I'll do more research soon. Maybe I could bypass the limitation of the input value, and using a new way to get a baseline TSC frequency on virtual environment. |
This code [1] is failing for me when I try to run this on a Google Cloud Platform box:
cpuinfo
says:Is this a (1) issue or a (2) issue? Thanks!
[1] https://github.com/templexxx/tsc/blob/master/tsc_amd64.go#L69
The text was updated successfully, but these errors were encountered: