Changeset 13586 in vbox
- Timestamp:
- Oct 27, 2008 4:33:51 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 38493
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/TM.cpp
r13572 r13586 538 538 STAM_REG(pVM, &pVM->tm.s.StatTimerCallbackSetFF,STAMTYPE_COUNTER, "/TM/CallbackSetFF", STAMUNIT_OCCURENCES, "The number of times the timer callback set FF."); 539 539 540 STAM_REG(pVM, &pVM->tm.s.StatTSCNotFixed, STAMTYPE_COUNTER, "/TM/TSC/Intercept/NotFixed", STAMUNIT_OCCURENCES, "The number of times TMCpuTickCanUseRealTSC forced rdtsc intercept."); 541 STAM_REG(pVM, &pVM->tm.s.StatTSCNotTicking, STAMTYPE_COUNTER, "/TM/TSC/Intercept/NotTicking", STAMUNIT_OCCURENCES, "The number of times TMCpuTickCanUseRealTSC forced rdtsc intercept."); 542 STAM_REG(pVM, &pVM->tm.s.StatTSCCatchup, STAMTYPE_COUNTER, "/TM/TSC/Intercept/Catchup", STAMUNIT_OCCURENCES, "The number of times TMCpuTickCanUseRealTSC forced rdtsc intercept."); 543 STAM_REG(pVM, &pVM->tm.s.StatTSCWarp, STAMTYPE_COUNTER, "/TM/TSC/Intercept/Warp", STAMUNIT_OCCURENCES, "The number of times TMCpuTickCanUseRealTSC forced rdtsc intercept."); 544 STAM_REG(pVM, &pVM->tm.s.StatTSCSyncNotTicking, STAMTYPE_COUNTER, "/TM/TSC/Intercept/SyncNotTicking", STAMUNIT_OCCURENCES, "The number of times TMCpuTickCanUseRealTSC forced rdtsc intercept."); 540 STAM_REG(pVM, &pVM->tm.s.StatTSCCatchupLE010, STAMTYPE_COUNTER, "/TM/TSC/Intercept/CatchupLE010", STAMUNIT_OCCURENCES, "In catch-up mode, 10% or lower."); 541 STAM_REG(pVM, &pVM->tm.s.StatTSCCatchupLE025, STAMTYPE_COUNTER, "/TM/TSC/Intercept/CatchupLE025", STAMUNIT_OCCURENCES, "In catch-up mode, 25%-11%."); 542 STAM_REG(pVM, &pVM->tm.s.StatTSCCatchupLE100, STAMTYPE_COUNTER, "/TM/TSC/Intercept/CatchupLE100", STAMUNIT_OCCURENCES, "In catch-up mode, 100%-26%."); 543 STAM_REG(pVM, &pVM->tm.s.StatTSCCatchupOther, STAMTYPE_COUNTER, "/TM/TSC/Intercept/CatchupOther", STAMUNIT_OCCURENCES, "In catch-up mode, > 100%."); 544 STAM_REG(pVM, &pVM->tm.s.StatTSCNotFixed, STAMTYPE_COUNTER, "/TM/TSC/Intercept/NotFixed", STAMUNIT_OCCURENCES, "TSC is not fixed, it may run at variable speed."); 545 STAM_REG(pVM, &pVM->tm.s.StatTSCNotTicking, STAMTYPE_COUNTER, "/TM/TSC/Intercept/NotTicking", STAMUNIT_OCCURENCES, "TSC is not ticking."); 546 STAM_REG(pVM, &pVM->tm.s.StatTSCSyncNotTicking, STAMTYPE_COUNTER, "/TM/TSC/Intercept/SyncNotTicking", STAMUNIT_OCCURENCES, "VirtualSync isn't ticking."); 547 STAM_REG(pVM, &pVM->tm.s.StatTSCWarp, STAMTYPE_COUNTER, "/TM/TSC/Intercept/Warp", STAMUNIT_OCCURENCES, "Warpdrive is active."); 545 548 546 549 -
trunk/src/VBox/VMM/TMInternal.h
r13572 r13586 488 488 STAMCOUNTER StatTimerCallbackSetFF; 489 489 490 490 /** @name Reasons for refusing TSC offsetting in TMCpuTickCanUseRealTSC. 491 * @{ */ 491 492 STAMCOUNTER StatTSCNotFixed; 492 493 STAMCOUNTER StatTSCNotTicking; 493 STAMCOUNTER StatTSCCatchup; 494 STAMCOUNTER StatTSCCatchupLE010; 495 STAMCOUNTER StatTSCCatchupLE025; 496 STAMCOUNTER StatTSCCatchupLE100; 497 STAMCOUNTER StatTSCCatchupOther; 494 498 STAMCOUNTER StatTSCWarp; 495 499 STAMCOUNTER StatTSCSyncNotTicking; 500 /** @} */ 496 501 } TM; 497 502 /** Pointer to TM VM instance data. */ -
trunk/src/VBox/VMM/VMMAll/TMAllCpu.cpp
r13572 r13586 148 148 * c) we're not using warp drive (accelerated virtual guest time). 149 149 */ 150 #ifdef VBOX_WITH_STATISTICS151 if (!pVM->tm.s.fMaybeUseOffsettedHostTSC)152 STAM_COUNTER_INC(&pVM->tm.s.StatTSCNotFixed);153 else154 if (!pVM->tm.s.fTSCTicking)155 STAM_COUNTER_INC(&pVM->tm.s.StatTSCNotTicking);156 else157 if (!pVM->tm.s.fTSCUseRealTSC)158 {159 if (pVM->tm.s.fVirtualSyncCatchUp)160 STAM_COUNTER_INC(&pVM->tm.s.StatTSCCatchup);161 else162 if (!pVM->tm.s.fVirtualSyncTicking)163 STAM_COUNTER_INC(&pVM->tm.s.StatTSCSyncNotTicking);164 else165 if (!pVM->tm.s.fVirtualWarpDrive)166 STAM_COUNTER_INC(&pVM->tm.s.StatTSCWarp);167 }168 #endif169 170 150 if ( pVM->tm.s.fMaybeUseOffsettedHostTSC 171 151 && RT_LIKELY(pVM->tm.s.fTSCTicking) … … 200 180 *poffRealTSC = 0; 201 181 } 182 /** @todo count this? */ 202 183 return true; 203 184 } 204 185 186 #ifdef VBOX_WITH_STATISTICS 187 /* Sample the reason for refusing. */ 188 if (!pVM->tm.s.fMaybeUseOffsettedHostTSC) 189 STAM_COUNTER_INC(&pVM->tm.s.StatTSCNotFixed); 190 else if (!pVM->tm.s.fTSCTicking) 191 STAM_COUNTER_INC(&pVM->tm.s.StatTSCNotTicking); 192 else if (!pVM->tm.s.fTSCUseRealTSC) 193 { 194 if (pVM->tm.s.fVirtualSyncCatchUp) 195 { 196 if (pVM->tm.s.u32VirtualSyncCatchUpPercentage <= 10) 197 STAM_COUNTER_INC(&pVM->tm.s.StatTSCCatchupLE010); 198 else if (pVM->tm.s.u32VirtualSyncCatchUpPercentage <= 25) 199 STAM_COUNTER_INC(&pVM->tm.s.StatTSCCatchupLE025); 200 else if (pVM->tm.s.u32VirtualSyncCatchUpPercentage <= 100) 201 STAM_COUNTER_INC(&pVM->tm.s.StatTSCCatchupLE100); 202 else 203 STAM_COUNTER_INC(&pVM->tm.s.StatTSCCatchupOther); 204 } 205 else if (!pVM->tm.s.fVirtualSyncTicking) 206 STAM_COUNTER_INC(&pVM->tm.s.StatTSCSyncNotTicking); 207 else if (pVM->tm.s.fVirtualWarpDrive) 208 STAM_COUNTER_INC(&pVM->tm.s.StatTSCWarp); 209 } 210 #endif 205 211 return false; 206 212 }
Note:
See TracChangeset
for help on using the changeset viewer.