Changeset 53356 in vbox for trunk/src/VBox
- Timestamp:
- Nov 20, 2014 11:32:43 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/testcase/tstGIP-2.cpp
r53355 r53356 63 63 int ch; 64 64 uint64_t uCpuHzRef = 0; 65 uint64_t uCpuHzOverallDeviation = 0; 65 66 RTGETOPTUNION ValueUnion; 66 67 RTGETOPTSTATE GetState; … … 137 138 { 138 139 int64_t iCpuHzDeviation = pCpu->u64CpuHz - uCpuHzRef; 139 if (RT_ABS(iCpuHzDeviation) > 999999999) 140 uint64_t uCpuHzDeviation = RT_ABS(iCpuHzDeviation); 141 if (uCpuHzDeviation > 999999999) 140 142 RTStrPrintf(szCpuHzDeviation, sizeof(szCpuHzDeviation), "%17s ", "?"); 141 143 else 142 144 { 143 uint32_t uPct = (uint32_t)(RT_ABS(iCpuHzDeviation) * 100000 / pCpu->u64CpuHz + 5); 145 uCpuHzOverallDeviation += uCpuHzDeviation; 146 uint32_t uPct = (uint32_t)(uCpuHzDeviation * 100000 / uCpuHzRef + 5); 144 147 RTStrPrintf(szCpuHzDeviation, sizeof(szCpuHzDeviation), "%10RI64%3d.%02d%% ", 145 148 iCpuHzDeviation, uPct / 1000, (uPct % 1000) / 10); … … 213 216 if (g_pSUPGlobalInfoPage->aCPUs[iCpu].idApic == UINT16_MAX) 214 217 RTPrintf("tstGIP-2: offline: %lld\n", g_pSUPGlobalInfoPage->aCPUs[iCpu].i64TSCDelta); 218 219 if (uCpuHzRef) 220 { 221 uint32_t uPct = (uint32_t)(uCpuHzOverallDeviation * 100000 / cIterations / g_pSUPGlobalInfoPage->cCpus / uCpuHzRef + 5); 222 RTPrintf("tstGIP-2: Overall CpuHz deviation: %d.%02d%%\n", uPct / 1000, (uPct % 1000) / 10); 223 } 215 224 } 216 225 else
Note:
See TracChangeset
for help on using the changeset viewer.