Changeset 51852 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Jul 3, 2014 3:09:01 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 94703
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/TM.cpp
r46420 r51852 163 163 164 164 165 //#define SYNC_TSC_PAUSE 165 166 /******************************************************************************* 166 167 * Internal Functions * … … 698 699 STAM_REG(pVM, &pVM->tm.s.StatTSCSet, STAMTYPE_COUNTER, "/TM/TSC/Sets", STAMUNIT_OCCURENCES, "Calls to TMCpuTickSet."); 699 700 STAM_REG(pVM, &pVM->tm.s.StatTSCUnderflow, STAMTYPE_COUNTER, "/TM/TSC/Underflow", STAMUNIT_OCCURENCES, "TSC underflow; corrected with last seen value ."); 701 STAM_REG(pVM, &pVM->tm.s.StatVirtualPause, STAMTYPE_COUNTER, "/TM/TSC/Pause", STAMUNIT_OCCURENCES, "The number of times the TSC was paused."); 702 STAM_REG(pVM, &pVM->tm.s.StatVirtualResume, STAMTYPE_COUNTER, "/TM/TSC/Resume", STAMUNIT_OCCURENCES, "The number of times the TSC was resumed."); 700 703 #endif /* VBOX_WITH_STATISTICS */ 701 704 … … 1154 1157 Assert(!pVM->tm.s.cVirtualTicking); 1155 1158 Assert(!pVM->tm.s.fVirtualSyncTicking); 1159 Assert(!pVM->tm.s.cTSCsTicking); 1156 1160 #endif 1157 1161 … … 1205 1209 Assert(!pVM->tm.s.cVirtualTicking); 1206 1210 Assert(!pVM->tm.s.fVirtualSyncTicking); 1211 Assert(!pVM->tm.s.cTSCsTicking); 1207 1212 #endif 1208 1213 … … 1220 1225 */ 1221 1226 pVM->tm.s.cVirtualTicking = 0; 1227 pVM->tm.s.cTSCsTicking = 0; 1222 1228 /* the virtual clock. */ 1223 1229 uint64_t u64Hz; … … 2676 2682 /* 2677 2683 * Pause the TSC last since it is normally linked to the virtual 2678 * sync clock, so the above code may actually stop both clock. 2679 */ 2680 rc = tmCpuTickPause(pVCpu); 2681 if (RT_FAILURE(rc)) 2682 return rc; 2684 * sync clock, so the above code may actually stop both clocks. 2685 */ 2686 if (!pVM->tm.s.fTSCTiedToExecution) 2687 { 2688 #ifdef SYNC_TSC_PAUSE 2689 TM_LOCK_TIMERS(pVM); /* Paranoia: Exploiting the timer lock here. */ 2690 rc = tmCpuTickPauseLocked(pVM, pVCpu); 2691 TM_UNLOCK_TIMERS(pVM); 2692 #else 2693 rc = tmCpuTickPause(pVCpu); 2694 #endif 2695 if (RT_FAILURE(rc)) 2696 return rc; 2697 } 2683 2698 2684 2699 #ifndef VBOX_WITHOUT_NS_ACCOUNTING … … 2724 2739 if (!pVM->tm.s.fTSCTiedToExecution) 2725 2740 { 2741 #ifdef SYNC_TSC_PAUSE 2742 TM_LOCK_TIMERS(pVM); /* Paranoia: Exploiting the timer lock here. */ 2743 rc = tmCpuTickResumeLocked(pVM, pVCpu); 2744 TM_UNLOCK_TIMERS(pVM); 2745 #else 2726 2746 rc = tmCpuTickResume(pVM, pVCpu); 2747 #endif 2727 2748 if (RT_FAILURE(rc)) 2728 2749 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.