Changeset 87491 in vbox
- Timestamp:
- Jan 30, 2021 1:15:50 AM (4 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
-
VMMR0/HMR0A.asm (modified) (2 diffs)
-
VMMR0/HMVMXR0.cpp (modified) (1 diff)
-
VMMR3/HM.cpp (modified) (3 diffs)
-
include/HMInternal.h (modified) (1 diff)
-
include/HMInternal.mac (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMR0A.asm
r87490 r87491 969 969 ALIGNCODE(8) 970 970 .write_host_rip: 971 %ifdef VBOX_WITH_STATISTICS 972 inc qword [rsi + VMCPU.hm + HMCPU.StatVmxWriteHostRip] 973 %endif 971 974 mov [r9 + VMXVMCSINFO.uHostRip], rcx 972 975 mov eax, VMX_VMCS_HOST_RIP ;; @todo It is only strictly necessary to write VMX_VMCS_HOST_RIP when … … 979 982 ALIGNCODE(8) 980 983 .write_host_rsp: 984 %ifdef VBOX_WITH_STATISTICS 985 inc qword [rsi + VMCPU.hm + HMCPU.StatVmxWriteHostRsp] 986 %endif 981 987 mov [r9 + VMXVMCSINFO.uHostRsp], rsp 982 988 mov eax, VMX_VMCS_HOST_RSP -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r87490 r87491 6880 6880 pVCpu->cpum.GstCtx.fExtrn |= HMVMX_CPUMCTX_EXTRN_ALL | CPUMCTX_EXTRN_KEEPER_HM; 6881 6881 6882 /** @todo Add stats for VMRESUME vs VMLAUNCH. */6883 6882 PVMXVMCSINFO pVmcsInfo = pVmxTransient->pVmcsInfo; 6884 6883 bool const fResumeVM = RT_BOOL(pVmcsInfo->fVmcsState & VMX_V_VMCS_LAUNCH_STATE_LAUNCHED); 6884 #ifdef VBOX_WITH_STATISTICS 6885 if (fResumeVM) 6886 STAM_COUNTER_INC(&pVCpu->hm.s.StatVmxVmResume); 6887 else 6888 STAM_COUNTER_INC(&pVCpu->hm.s.StatVmxVmLaunch); 6889 #endif 6885 6890 int rc = pVCpu->hmr0.s.vmx.pfnStartVm(pVmcsInfo, pVCpu, fResumeVM); 6886 6891 AssertMsg(rc <= VINF_SUCCESS, ("%Rrc\n", rc)); -
trunk/src/VBox/VMM/VMMR3/HM.cpp
r87489 r87491 674 674 * Statistics. 675 675 */ 676 #ifdef VBOX_WITH_STATISTICS 677 bool const fCpuSupportsVmx = ASMIsIntelCpu() || ASMIsViaCentaurCpu() || ASMIsShanghaiCpu(); 678 #endif 676 679 for (VMCPUID idCpu = 0; idCpu < pVM->cCpus; idCpu++) 677 680 { … … 818 821 HM_REG_COUNTER(&pHmCpu->StatExportHostState, "/HM/CPU%u/Export/HostState", "VM-entry exporting host-state."); 819 822 823 if (fCpuSupportsVmx) 824 { 825 HM_REG_COUNTER(&pHmCpu->StatVmxWriteHostRip, "/HM/CPU%u/WriteHostRIP", "Number of VMX_VMCS_HOST_RIP instructions."); 826 HM_REG_COUNTER(&pHmCpu->StatVmxWriteHostRsp, "/HM/CPU%u/WriteHostRSP", "Number of VMX_VMCS_HOST_RSP instructions."); 827 HM_REG_COUNTER(&pHmCpu->StatVmxVmLaunch, "/HM/CPU%u/VMLaunch", "Number of VMLAUNCH instructions."); 828 HM_REG_COUNTER(&pHmCpu->StatVmxVmResume, "/HM/CPU%u/VMResume", "Number of VMRESUME instructions."); 829 } 830 820 831 HM_REG_COUNTER(&pHmCpu->StatVmxCheckBadRmSelBase, "/HM/CPU%u/VMXCheck/RMSelBase", "Could not use VMX due to unsuitable real-mode selector base."); 821 832 HM_REG_COUNTER(&pHmCpu->StatVmxCheckBadRmSelLimit, "/HM/CPU%u/VMXCheck/RMSelLimit", "Could not use VMX due to unsuitable real-mode selector limit."); … … 830 841 HM_REG_COUNTER(&pHmCpu->StatVmxCheckBadRpl, "/HM/CPU%u/VMXCheck/RPL", "Could not use VMX due to unsuitable RPL."); 831 842 HM_REG_COUNTER(&pHmCpu->StatVmxCheckPmOk, "/HM/CPU%u/VMXCheck/VMX_PM", "VMX execution in protected mode OK."); 832 833 bool const fCpuSupportsVmx = ASMIsIntelCpu() || ASMIsViaCentaurCpu() || ASMIsShanghaiCpu();834 843 835 844 /* -
trunk/src/VBox/VMM/include/HMInternal.h
r87490 r87491 1103 1103 * on the stack. */ 1104 1104 DISCPUSTATE DisState; 1105 1106 /* These two comes because they are accessed from assembly and we don't 1107 want to detail all the stats in the assembly version of this structure. */ 1108 STAMCOUNTER StatVmxWriteHostRip; 1109 STAMCOUNTER StatVmxWriteHostRsp; 1110 STAMCOUNTER StatVmxVmLaunch; 1111 STAMCOUNTER StatVmxVmResume; 1105 1112 1106 1113 STAMPROFILEADV StatEntry; -
trunk/src/VBox/VMM/include/HMInternal.mac
r87490 r87491 193 193 .aPdpes resq 4 194 194 195 .DisState resb 0d8h 196 197 .StatVmxWriteHostRip resq 1 198 .StatVmxWriteHostRsp resq 1 199 195 200 ; The remainer is disassembly state and statistics. 196 201 endstruc
Note:
See TracChangeset
for help on using the changeset viewer.

