Changeset 2284 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Apr 20, 2007 10:30:56 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMEmt.cpp
r2283 r2284 316 316 int rc = VINF_SUCCESS; 317 317 ASMAtomicXchgU32(&pVM->vm.s.fWait, 1); 318 unsigned cLoops = 0;318 //unsigned cLoops = 0; 319 319 for (;;) 320 320 { … … 342 342 if (u64NanoTS < 50000) 343 343 { 344 RTLogPrintf("u64NanoTS=%RI64 cLoops=%d spin\n", u64NanoTS, cLoops++);344 //RTLogPrintf("u64NanoTS=%RI64 cLoops=%d spin\n", u64NanoTS, cLoops++); 345 345 /* spin */; 346 346 } … … 348 348 { 349 349 VMMR3YieldStop(pVM); 350 uint64_t u64Start = RTTimeNanoTS();350 //uint64_t u64Start = RTTimeNanoTS(); 351 351 if (u64NanoTS < 870000) /* this is a bit speculative... works fine on linux. */ 352 352 { 353 RTLogPrintf("u64NanoTS=%RI64 cLoops=%d yield", u64NanoTS, cLoops++);353 //RTLogPrintf("u64NanoTS=%RI64 cLoops=%d yield", u64NanoTS, cLoops++); 354 354 STAM_PROFILE_ADV_START(&pVM->vm.s.StatHaltYield, a); 355 355 RTThreadYield(); /* this is the best we can do here */ … … 358 358 else if (u64NanoTS < 2000000) 359 359 { 360 RTLogPrintf("u64NanoTS=%RI64 cLoops=%d sleep 1ms", u64NanoTS, cLoops++);360 //RTLogPrintf("u64NanoTS=%RI64 cLoops=%d sleep 1ms", u64NanoTS, cLoops++); 361 361 STAM_PROFILE_ADV_START(&pVM->vm.s.StatHaltBlock, a); 362 362 rc = RTSemEventWait(pVM->vm.s.EventSemWait, 1); … … 365 365 else 366 366 { 367 RTLogPrintf("u64NanoTS=%RI64 cLoops=%d sleep %dms", u64NanoTS, cLoops++, (uint32_t)RT_MIN((u64NanoTS - 500000) / 1000000, 15));367 //RTLogPrintf("u64NanoTS=%RI64 cLoops=%d sleep %dms", u64NanoTS, cLoops++, (uint32_t)RT_MIN((u64NanoTS - 500000) / 1000000, 15)); 368 368 STAM_PROFILE_ADV_START(&pVM->vm.s.StatHaltBlock, a); 369 369 rc = RTSemEventWait(pVM->vm.s.EventSemWait, RT_MIN((u64NanoTS - 1000000) / 1000000, 15)); 370 370 STAM_PROFILE_ADV_STOP(&pVM->vm.s.StatHaltBlock, a); 371 371 } 372 uint64_t u64Slept = RTTimeNanoTS() - u64Start;373 RTLogPrintf(" -> rc=%Vrc in %RU64 ns / %RI64 ns delta\n", rc, u64Slept, u64NanoTS - u64Slept);372 //uint64_t u64Slept = RTTimeNanoTS() - u64Start; 373 //RTLogPrintf(" -> rc=%Vrc in %RU64 ns / %RI64 ns delta\n", rc, u64Slept, u64NanoTS - u64Slept); 374 374 } 375 375 if (rc == VERR_TIMEOUT)
Note:
See TracChangeset
for help on using the changeset viewer.