Conversation
Codecov Report
@@ Coverage Diff @@
## main #1515 +/- ##
==========================================
- Coverage 53.00% 52.68% -0.33%
==========================================
Files 140 140
Lines 21007 21159 +152
Branches 5314 5352 +38
==========================================
+ Hits 11135 11147 +12
- Misses 6938 7070 +132
- Partials 2934 2942 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
5b420b1 to
1faeb48
Compare
ceae230 to
b4d49f7
Compare
|
Probably easiest to review one commit at a time - or at least before and after moving the tsc module in 55e1dc5 |
cdb2cbb to
4801210
Compare
There was a problem hiding this comment.
Looks good! I tried to look for any simple errors, but didn't go in-depth (didn't double check things with the Intel manual or anything).
It seems like using cpuid(0x15, ...) to get the clock frequency probably will work on any newer x86 CPUs, but I'm guessing the brand string method will fail on non-Intel x86 CPUs? Have you checked with any AMD documentation to see what they say about getting the clock frequency? Do we have any systems with AMD CPUs we can test this on?
|
Good question. AFAICT from https://www.amd.com/system/files/TechDocs/25481.pdf, AMD doesn't support cpuid 0x15. It does implement the same API for getting the brand string, but unlike Intel doesn't specify that the speed will be the last token. I don't have any AMD systems handy to check on; I guess we'll cross that bridge when we get there. |
This is simpler, more efficient, and gets rid of the glib dependency.
This should improve determinism, and allows us to run the emulation code in an environment without a native rdtscp instruction (e.g. in the shim with rdtscp disabled).
4801210 to
e98b7fa
Compare
Progress on #666