Changeset 43392 in vbox
- Timestamp:
- Sep 21, 2012 10:21:29 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/vmm.h
r43047 r43392 264 264 VMMR3_INT_DECL(RTR0PTR) VMMR3GetHostToGuestSwitcher(PVM pVM, VMMSWITCHER enmSwitcher); 265 265 VMMR3_INT_DECL(int) VMMR3RawRunGC(PVM pVM, PVMCPU pVCpu); 266 VMMR3_INT_DECL(int) VMMR3H wAccRunGC(PVM pVM, PVMCPU pVCpu);266 VMMR3_INT_DECL(int) VMMR3HmRunGC(PVM pVM, PVMCPU pVCpu); 267 267 VMMR3DECL(int) VMMR3CallRC(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, ...); 268 268 VMMR3DECL(int) VMMR3CallRCV(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, va_list args); -
trunk/src/VBox/VMM/VMMR3/EM.cpp
r43387 r43392 22 22 * Interpreted), and keeping the CPU states in sync. The function 23 23 * EMR3ExecuteVM() is the 'main-loop' of the VM, while each of the execution 24 * modes has different inner loops (emR3RawExecute, emR3H wAccExecute, and24 * modes has different inner loops (emR3RawExecute, emR3HmExecute, and 25 25 * emR3RemExecute). 26 26 * … … 391 391 EM_REG_COUNTER(&pVCpu->em.s.StatIOEmu, "/PROF/CPU%d/EM/Emulation/IO", "Profiling of emR3RawExecuteIOInstruction."); 392 392 EM_REG_COUNTER(&pVCpu->em.s.StatPrivEmu, "/PROF/CPU%d/EM/Emulation/Priv", "Profiling of emR3RawPrivileged."); 393 EM_REG_PROFILE(&pVCpu->em.s.StatH wAccEntry, "/PROF/CPU%d/EM/HwAccEnter", "Profiling Hardware Accelerated Mode entry overhead.");394 EM_REG_PROFILE(&pVCpu->em.s.StatH wAccExec, "/PROF/CPU%d/EM/HwAccExec", "Profiling Hardware Accelerated Mode execution.");393 EM_REG_PROFILE(&pVCpu->em.s.StatHmEntry, "/PROF/CPU%d/EM/HmEnter", "Profiling Hardware Accelerated Mode entry overhead."); 394 EM_REG_PROFILE(&pVCpu->em.s.StatHmExec, "/PROF/CPU%d/EM/HmExec", "Profiling Hardware Accelerated Mode execution."); 395 395 EM_REG_PROFILE(&pVCpu->em.s.StatREMEmu, "/PROF/CPU%d/EM/REMEmuSingle", "Profiling single instruction REM execution."); 396 396 EM_REG_PROFILE(&pVCpu->em.s.StatREMExec, "/PROF/CPU%d/EM/REMExec", "Profiling REM execution."); … … 2198 2198 case EMSTATE_HWACC: 2199 2199 #ifndef IEM_VERIFICATION_MODE /* remove later */ 2200 rc = emR3H wAccExecute(pVM, pVCpu, &fFFDone);2200 rc = emR3HmExecute(pVM, pVCpu, &fFFDone); 2201 2201 break; 2202 2202 #endif -
trunk/src/VBox/VMM/VMMR3/EMHM.cpp
r43391 r43392 79 79 * @param pVCpu Pointer to the VMCPU. 80 80 */ 81 static int emR3H wAccStep(PVM pVM, PVMCPU pVCpu)81 static int emR3HmStep(PVM pVM, PVMCPU pVCpu) 82 82 { 83 83 Assert(pVCpu->em.s.enmState == EMSTATE_DEBUG_GUEST_HWACC); … … 108 108 do 109 109 { 110 rc = VMMR3H wAccRunGC(pVM, pVCpu);110 rc = VMMR3HmRunGC(pVM, pVCpu); 111 111 } while ( rc == VINF_SUCCESS 112 112 || rc == VINF_EM_RAW_INTERRUPT); … … 128 128 129 129 130 static int emR3SingleStepExecH wAcc(PVM pVM, PVMCPU pVCpu, uint32_t cIterations)130 static int emR3SingleStepExecHm(PVM pVM, PVMCPU pVCpu, uint32_t cIterations) 131 131 { 132 132 int rc = VINF_SUCCESS; … … 139 139 DBGFR3PrgStep(pVCpu); 140 140 DBGFR3DisasInstrCurrentLog(pVCpu, "RSS: "); 141 rc = emR3H wAccStep(pVM, pVCpu);141 rc = emR3HmStep(pVM, pVCpu); 142 142 if ( rc != VINF_SUCCESS 143 143 || !HMR3CanExecuteGuest(pVM, pVCpu->em.s.pCtx)) … … 464 464 * FFs were done before returning. 465 465 */ 466 int emR3H wAccExecute(PVM pVM, PVMCPU pVCpu, bool *pfFFDone)466 int emR3HmExecute(PVM pVM, PVMCPU pVCpu, bool *pfFFDone) 467 467 { 468 468 int rc = VERR_IPE_UNINITIALIZED_STATUS; 469 469 PCPUMCTX pCtx = pVCpu->em.s.pCtx; 470 470 471 LogFlow(("emR3H wAccExecute%d: (cs:eip=%04x:%RGv)\n", pVCpu->idCpu, pCtx->cs.Sel, (RTGCPTR)pCtx->rip));471 LogFlow(("emR3HmExecute%d: (cs:eip=%04x:%RGv)\n", pVCpu->idCpu, pCtx->cs.Sel, (RTGCPTR)pCtx->rip)); 472 472 *pfFFDone = false; 473 473 474 STAM_COUNTER_INC(&pVCpu->em.s.StatH wAccExecuteEntry);474 STAM_COUNTER_INC(&pVCpu->em.s.StatHmExecuteEntry); 475 475 476 476 #ifdef EM_NOTIFY_HM … … 483 483 for (;;) 484 484 { 485 STAM_PROFILE_ADV_START(&pVCpu->em.s.StatH wAccEntry, a);485 STAM_PROFILE_ADV_START(&pVCpu->em.s.StatHmEntry, a); 486 486 487 487 /* Check if a forced reschedule is pending. */ … … 536 536 * Execute the code. 537 537 */ 538 STAM_PROFILE_ADV_STOP(&pVCpu->em.s.StatH wAccEntry, a);538 STAM_PROFILE_ADV_STOP(&pVCpu->em.s.StatHmEntry, a); 539 539 540 540 if (RT_LIKELY(EMR3IsExecutionAllowed(pVM, pVCpu))) 541 541 { 542 STAM_PROFILE_START(&pVCpu->em.s.StatH wAccExec, x);543 rc = VMMR3H wAccRunGC(pVM, pVCpu);544 STAM_PROFILE_STOP(&pVCpu->em.s.StatH wAccExec, x);542 STAM_PROFILE_START(&pVCpu->em.s.StatHmExec, x); 543 rc = VMMR3HmRunGC(pVM, pVCpu); 544 STAM_PROFILE_STOP(&pVCpu->em.s.StatHmExec, x); 545 545 } 546 546 else -
trunk/src/VBox/VMM/VMMR3/VMM.cpp
r43387 r43392 1271 1271 * @param pVCpu Pointer to the VMCPU. 1272 1272 */ 1273 VMMR3_INT_DECL(int) VMMR3H wAccRunGC(PVM pVM, PVMCPU pVCpu)1274 { 1275 Log2(("VMMR3H wAccRunGC: (cs:eip=%04x:%08x)\n", CPUMGetGuestCS(pVCpu), CPUMGetGuestEIP(pVCpu)));1273 VMMR3_INT_DECL(int) VMMR3HmRunGC(PVM pVM, PVMCPU pVCpu) 1274 { 1275 Log2(("VMMR3HmRunGC: (cs:eip=%04x:%08x)\n", CPUMGetGuestCS(pVCpu), CPUMGetGuestEIP(pVCpu))); 1276 1276 1277 1277 for (;;) … … 1304 1304 if (rc != VINF_VMM_CALL_HOST) 1305 1305 { 1306 Log2(("VMMR3H wAccRunGC: returns %Rrc (cs:eip=%04x:%08x)\n", rc, CPUMGetGuestCS(pVCpu), CPUMGetGuestEIP(pVCpu)));1306 Log2(("VMMR3HmRunGC: returns %Rrc (cs:eip=%04x:%08x)\n", rc, CPUMGetGuestCS(pVCpu), CPUMGetGuestEIP(pVCpu))); 1307 1307 return rc; 1308 1308 } -
trunk/src/VBox/VMM/include/EMInternal.h
r43391 r43392 398 398 STAMPROFILE StatHalted; 399 399 STAMPROFILEADV StatCapped; 400 STAMPROFILEADV StatH wAccEntry;401 STAMPROFILE StatH wAccExec;400 STAMPROFILEADV StatHmEntry; 401 STAMPROFILE StatHmExec; 402 402 STAMPROFILE StatREMEmu; 403 403 STAMPROFILE StatREMExec; … … 415 415 /** R3: Profiling of emR3RawPrivileged. */ 416 416 STAMPROFILE StatPrivEmu; 417 /** R3: Number of time emR3H wAccExecute is called. */418 STAMCOUNTER StatH wAccExecuteEntry;417 /** R3: Number of time emR3HmExecute is called. */ 418 STAMCOUNTER StatHmExecuteEntry; 419 419 420 420 /** More statistics (R3). */ … … 442 442 443 443 444 int emR3H wAccExecute(PVM pVM, PVMCPU pVCpu, bool *pfFFDone);444 int emR3HmExecute(PVM pVM, PVMCPU pVCpu, bool *pfFFDone); 445 445 int emR3RawExecute(PVM pVM, PVMCPU pVCpu, bool *pfFFDone); 446 446 int emR3RawHandleRC(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, int rc);
Note:
See TracChangeset
for help on using the changeset viewer.