Changeset 20678 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jun 18, 2009 9:22:30 AM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/TM.cpp
r20374 r20678 602 602 STAM_REG(pVM, &pVM->tm.s.StatTSCSyncNotTicking, STAMTYPE_COUNTER, "/TM/TSC/Intercept/SyncNotTicking", STAMUNIT_OCCURENCES, "VirtualSync isn't ticking."); 603 603 STAM_REG(pVM, &pVM->tm.s.StatTSCWarp, STAMTYPE_COUNTER, "/TM/TSC/Intercept/Warp", STAMUNIT_OCCURENCES, "Warpdrive is active."); 604 STAM_REG(pVM, &pVM->tm.s.StatTSCSet, STAMTYPE_COUNTER, "/TM/TSC/Sets", STAMUNIT_OCCURENCES, "Calls to TMCpuTickSet."); 604 605 605 606 STAM_REG(pVM, &pVM->tm.s.StatVirtualSyncCatchup, STAMTYPE_PROFILE_ADV, "/TM/VirtualSync/CatchUp", STAMUNIT_TICKS_PER_OCCURENCE, "Counting and measuring the times spent catching up."); -
trunk/src/VBox/VMM/TMInternal.h
r20374 r20678 508 508 STAMCOUNTER StatTimerCallbackSetFF; 509 509 510 /** Calls to TMCpuTickSet. */ 511 STAMCOUNTER StatTSCSet; 512 510 513 /** @name Reasons for refusing TSC offsetting in TMCpuTickCanUseRealTSC. 511 514 * @{ */ -
trunk/src/VBox/VMM/VMMAll/TMAllCpu.cpp
r20675 r20678 245 245 * 246 246 * @returns VBox status code. 247 * @param pVCpu The VMCPU to operate on. 247 * @param pVM The VM handle. 248 * @param pVCpu The virtual CPU to operate on. 248 249 * @param u64Tick The new timestamp value. 249 */ 250 VMMDECL(int) TMCpuTickSet(PVMCPU pVCpu, uint64_t u64Tick) 251 { 250 * 251 * @thread EMT which TSC is to be set. 252 */ 253 VMMDECL(int) TMCpuTickSet(PVM pVM, PVMCPU pVCpu, uint64_t u64Tick) 254 { 255 VMCPU_ASSERT_EMT(pVCpu); 256 STAM_COUNTER_INC(&pVM->tm.s.StatTSCSet); 257 252 258 /* 253 259 * This is easier to do when the TSC is paused since resume will 254 260 * do all the calcuations for us. 255 261 */ 256 PVM pVM = pVCpu->CTX_SUFF(pVM);257 262 bool fTSCTicking = pVCpu->tm.s.fTSCTicking; 258 263 if (fTSCTicking) 259 264 tmCpuTickPause(pVM, pVCpu); 265 260 266 pVCpu->tm.s.u64TSC = u64Tick; 267 /** @todo Try help synchronizing it better among the virtual CPUs? */ 261 268 262 269 if (fTSCTicking) 263 270 tmCpuTickResume(pVM, pVCpu); 264 /** @todo Try help synchronizing it better among the virtual CPUs? */265 271 return VINF_SUCCESS; 266 272 }
Note:
See TracChangeset
for help on using the changeset viewer.