Changeset 87749 in vbox
- Timestamp:
- Feb 13, 2021 3:18:27 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 142801
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/TMAll.cpp
r87748 r87749 188 188 */ 189 189 /** @todo get TSC from caller (HMR0A.asm) */ 190 uint64_t cTicks 190 uint64_t cTicks = SUPReadTsc() - pVCpu->tm.s.uTscStartExecuting; 191 191 # ifdef IN_RING3 192 uint64_t const uCpuHz 192 uint64_t const uCpuHz = SUPGetCpuHzFromGip(g_pSUPGlobalInfoPage); 193 193 # else 194 uint64_t const uCpuHz 194 uint64_t const uCpuHz = SUPGetCpuHzFromGipBySetIndex(g_pSUPGlobalInfoPage, pVCpu->iHostCpuSet); 195 195 # endif 196 196 AssertStmt(cTicks <= uCpuHz << 2, cTicks = uCpuHz << 2); /* max 4 sec */ … … 209 209 /* 210 210 * Update the data. 211 * 212 * Note! Using ASMAtomicUoIncU32 instead of ASMAtomicIncU32 here to 213 * save a tiny bit of time here. Currently, the only user 214 * is tmR3CpuLoadTimer(), so nothing terribly important. 211 215 */ 212 216 uint64_t const cNsExecutingNew = pVCpu->tm.s.cNsExecuting + cNsExecutingDelta; 213 /** @todo try relax ordering here */ 214 uint32_t uGen = ASMAtomicIncU32(&pVCpu->tm.s.uTimesGen); Assert(uGen & 1); 217 uint32_t uGen = ASMAtomicUoIncU32(&pVCpu->tm.s.uTimesGen); Assert(uGen & 1); 215 218 pVCpu->tm.s.fExecuting = false; 216 219 pVCpu->tm.s.cNsExecuting = cNsExecutingNew;
Note:
See TracChangeset
for help on using the changeset viewer.