Changeset 72560 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Jun 15, 2018 11:00:02 AM (6 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/EMR3Dbg.cpp
r72558 r72560 290 290 * Register info dumpers. 291 291 */ 292 int rc = DBGFR3InfoRegisterInternalEx(pVM, "exits", "Dumps the VM-exit history.", 293 emR3InfoExitHistory, DBGFINFO_FLAGS_ALL_EMTS); 292 const char *pszExitsDesc = "Dumps the VM-exit history. Arguments: Number of entries; 'asc', 'ascending' or 'reverse'."; 293 int rc = DBGFR3InfoRegisterInternalEx(pVM, "exits", pszExitsDesc, emR3InfoExitHistory, DBGFINFO_FLAGS_ALL_EMTS); 294 AssertLogRelRCReturn(rc, rc); 295 rc = DBGFR3InfoRegisterInternalEx(pVM, "exithistory", pszExitsDesc, emR3InfoExitHistory, DBGFINFO_FLAGS_ALL_EMTS); 294 296 AssertLogRelRCReturn(rc, rc); 295 297 -
trunk/src/VBox/VMM/VMMR3/HM.cpp
r72555 r72560 383 383 static DECLCALLBACK(int) hmR3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass); 384 384 static DECLCALLBACK(void) hmR3InfoSvmNstGstVmcbCache(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs); 385 static DECLCALLBACK(void) hmR3Info ExitHistory(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs);385 static DECLCALLBACK(void) hmR3Info(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs); 386 386 static DECLCALLBACK(void) hmR3InfoEventPending(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs); 387 387 static int hmR3InitCPU(PVM pVM); … … 439 439 * Register info handlers. 440 440 */ 441 rc = DBGFR3InfoRegisterInternalEx(pVM, "exithistory", "Dumps the HM VM-exit history.", hmR3InfoExitHistory, 442 DBGFINFO_FLAGS_ALL_EMTS); 441 rc = DBGFR3InfoRegisterInternalEx(pVM, "hm", "Dumps HM info.", hmR3Info, DBGFINFO_FLAGS_ALL_EMTS); 443 442 AssertRCReturn(rc, rc); 444 443 … … 3680 3679 * @param pszArgs Arguments, ignored. 3681 3680 */ 3682 static DECLCALLBACK(void) hmR3Info ExitHistory(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs)3681 static DECLCALLBACK(void) hmR3Info(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs) 3683 3682 { 3684 3683 NOREF(pszArgs); … … 3689 3688 if (HMIsEnabled(pVM)) 3690 3689 { 3691 bool const fIsVtx = pVM->hm.s.vmx.fSupported; 3692 const char * const *papszDesc; 3693 unsigned cMaxExitDesc; 3694 if (fIsVtx) 3695 { 3696 cMaxExitDesc = MAX_EXITREASON_VTX; 3697 papszDesc = &g_apszVTxExitReasons[0]; 3698 pHlp->pfnPrintf(pHlp, "CPU[%u]: VT-x VM-exit history:\n", pVCpu->idCpu); 3699 } 3690 if (pVM->hm.s.vmx.fSupported) 3691 pHlp->pfnPrintf(pHlp, "CPU[%u]: VT-x info:\n", pVCpu->idCpu); 3700 3692 else 3701 { 3702 cMaxExitDesc = MAX_EXITREASON_AMDV; 3703 papszDesc = &g_apszAmdVExitReasons[0]; 3704 pHlp->pfnPrintf(pHlp, "CPU[%u]: AMD-V #VMEXIT history:\n", pVCpu->idCpu); 3705 } 3706 3707 pHlp->pfnPrintf(pHlp, " idxExitHistoryFree = %u\n", pVCpu->hm.s.idxExitHistoryFree); 3708 unsigned const idxLast = pVCpu->hm.s.idxExitHistoryFree > 0 ? 3709 pVCpu->hm.s.idxExitHistoryFree - 1 : 3710 RT_ELEMENTS(pVCpu->hm.s.auExitHistory) - 1; 3711 for (unsigned i = 0; i < RT_ELEMENTS(pVCpu->hm.s.auExitHistory); i++) 3712 { 3713 uint16_t const uExit = pVCpu->hm.s.auExitHistory[i]; 3714 const char *pszExit = NULL; 3715 if (uExit <= cMaxExitDesc) 3716 pszExit = papszDesc[uExit]; 3717 else if (!fIsVtx) 3718 pszExit = hmSvmGetSpecialExitReasonDesc(uExit); 3719 else 3720 pszExit = NULL; 3721 3722 pHlp->pfnPrintf(pHlp, " auExitHistory[%2u] = 0x%04x %s %s\n", i, uExit, pszExit, 3723 idxLast == i ? "<-- Latest exit" : ""); 3724 } 3725 pHlp->pfnPrintf(pHlp, "HM error = %#x (%u)\n", pVCpu->hm.s.u32HMError, pVCpu->hm.s.u32HMError); 3693 pHlp->pfnPrintf(pHlp, "CPU[%u]: AMD-V info:\n", pVCpu->idCpu); 3694 pHlp->pfnPrintf(pHlp, " HM error = %#x (%u)\n", pVCpu->hm.s.u32HMError, pVCpu->hm.s.u32HMError); 3726 3695 } 3727 3696 else
Note:
See TracChangeset
for help on using the changeset viewer.