- Timestamp:
- Jun 16, 2018 4:55:15 PM (7 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r72580 r72582 419 419 break; 420 420 421 /* Only status codes that EMHandleRCTmpl.h will resume EMHistoryExec with. */ 421 /* 422 * Only status codes that EMHandleRCTmpl.h will resume EMHistoryExec with. 423 */ 422 424 case VINF_IOM_R3_IOPORT_READ: /* -> emR3ExecuteIOInstruction */ 423 425 case VINF_IOM_R3_IOPORT_WRITE: /* -> emR3ExecuteIOInstruction */ … … 465 467 case EMEXITACTION_EXEC_WITH_MAX: 466 468 { 469 STAM_REL_PROFILE_START(&pVCpu->em.s.StatHistoryExec, a); 467 470 LogFlow(("EMHistoryExec/EXEC_WITH_MAX: %RX64, max %u\n", pExitRec->uFlatPC, pExitRec->cMaxInstructionsWithoutExit)); 468 471 VBOXSTRICTRC rcStrict = IEMExecForExits(pVCpu, fWillExit, … … 474 477 VBOXSTRICTRC_VAL(rcStrict), ExecStats.cExits, ExecStats.cMaxExitDistance, ExecStats.cInstructions)); 475 478 emHistoryExecSetContinueExitRecIdx(pVCpu, rcStrict, pExitRec); 479 if (ExecStats.cExits > 1) 480 STAM_REL_COUNTER_ADD(&pVCpu->em.s.StatHistoryExecSavedExits, ExecStats.cExits - 1); 481 STAM_REL_COUNTER_ADD(&pVCpu->em.s.StatHistoryExecInstructions, ExecStats.cInstructions); 482 STAM_REL_PROFILE_STOP(&pVCpu->em.s.StatHistoryExec, a); 476 483 return rcStrict; 477 484 } … … 482 489 case EMEXITACTION_EXEC_PROBE: 483 490 { 491 STAM_REL_PROFILE_START(&pVCpu->em.s.StatHistoryProbe, b); 484 492 LogFlow(("EMHistoryExec/EXEC_PROBE: %RX64\n", pExitRec->uFlatPC)); 485 493 PEMEXITREC pExitRecUnconst = (PEMEXITREC)pExitRec; … … 498 506 pExitRecUnconst->enmAction = EMEXITACTION_EXEC_WITH_MAX; 499 507 LogFlow(("EMHistoryExec/EXEC_PROBE: -> EXEC_WITH_MAX %u\n", ExecStats.cMaxExitDistance)); 508 STAM_REL_COUNTER_INC(&pVCpu->em.s.StatHistoryProbedExecWithMax); 500 509 } 501 510 #ifndef IN_RING3 502 511 else if (pVCpu->em.s.idxContinueExitRec != UINT16_MAX) 512 { 513 STAM_REL_COUNTER_INC(&pVCpu->em.s.StatHistoryProbedToRing3); 503 514 LogFlow(("EMHistoryExec/EXEC_PROBE: -> ring-3\n")); 515 } 504 516 #endif 505 517 else … … 508 520 pVCpu->em.s.idxContinueExitRec = UINT16_MAX; 509 521 LogFlow(("EMHistoryExec/EXEC_PROBE: -> PROBED\n")); 522 STAM_REL_COUNTER_INC(&pVCpu->em.s.StatHistoryProbedNormal); 510 523 } 524 STAM_REL_COUNTER_ADD(&pVCpu->em.s.StatHistoryProbeInstructions, ExecStats.cInstructions); 525 STAM_REL_PROFILE_STOP(&pVCpu->em.s.StatHistoryProbe, b); 511 526 return rcStrict; 512 527 } -
trunk/src/VBox/VMM/VMMR3/EM.cpp
r72580 r72582 484 484 AssertRC(rc); 485 485 } 486 487 EM_REG_PROFILE(&pVCpu->em.s.StatHistoryExec, "/EM/CPU%d/ExitOpt/Exec", "Profiling normal EMHistoryExec operation."); 488 EM_REG_COUNTER(&pVCpu->em.s.StatHistoryExecSavedExits, "/EM/CPU%d/ExitOpt/ExecSavedExit", "Net number of saved exits."); 489 EM_REG_COUNTER(&pVCpu->em.s.StatHistoryExecInstructions, "/EM/CPU%d/ExitOpt/ExecInstructions", "Number of instructions executed during normal operation."); 490 EM_REG_PROFILE(&pVCpu->em.s.StatHistoryProbe, "/EM/CPU%d/ExitOpt/Probe", "Profiling EMHistoryExec when probing."); 491 EM_REG_COUNTER(&pVCpu->em.s.StatHistoryProbeInstructions, "/EM/CPU%d/ExitOpt/ProbeInstructions", "Number of instructions executed during probing."); 492 EM_REG_COUNTER(&pVCpu->em.s.StatHistoryProbedNormal, "/EM/CPU%d/ExitOpt/ProbedNormal", "Number of EMEXITACTION_NORMAL_PROBED results."); 493 EM_REG_COUNTER(&pVCpu->em.s.StatHistoryProbedExecWithMax, "/EM/CPU%d/ExitOpt/ProbedExecWithMax", "Number of EMEXITACTION_EXEC_WITH_MAX results."); 494 EM_REG_COUNTER(&pVCpu->em.s.StatHistoryProbedToRing3, "/EM/CPU%d/ExitOpt/ProbedToRing3", "Number of ring-3 probe continuations."); 486 495 } 487 496 -
trunk/src/VBox/VMM/include/EMInternal.h
r72580 r72582 516 516 /** Number of exit records in use. */ 517 517 uint32_t cExitRecordUsed; 518 /** Profiling the EMHistoryExec when executing (not probing). */ 519 STAMPROFILE StatHistoryExec; 520 /** Number of saved exits. */ 521 STAMCOUNTER StatHistoryExecSavedExits; 522 /** Number of instructions executed by EMHistoryExec. */ 523 STAMCOUNTER StatHistoryExecInstructions; 524 uint64_t aPadding3[2]; 525 /** Number of instructions executed by EMHistoryExec when probing. */ 526 STAMCOUNTER StatHistoryProbeInstructions; 527 /** Number of times probing resulted in EMEXITACTION_NORMAL_PROBED. */ 528 STAMCOUNTER StatHistoryProbedNormal; 529 /** Number of times probing resulted in EMEXITACTION_EXEC_WITH_MAX. */ 530 STAMCOUNTER StatHistoryProbedExecWithMax; 531 /** Number of times probing resulted in ring-3 continuation. */ 532 STAMCOUNTER StatHistoryProbedToRing3; 533 /** Profiling the EMHistoryExec when probing.*/ 534 STAMPROFILE StatHistoryProbe; 518 535 /** Hit statistics for each lookup step. */ 519 536 STAMCOUNTER aStatHistoryRecHits[16];
Note:
See TracChangeset
for help on using the changeset viewer.