VirtualBox

Ignore:
Timestamp:
Jun 28, 2013 4:25:06 PM (12 years ago)
Author:
vboxsync
Message:

VMM/HM: Cleanup event injection statistics.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r46850 r46871  
    47114711 * @param   GCPtrFaultAddress   The fault-address (CR2) in case it's a
    47124712 *                              page-fault.
     4713 *
     4714 * @remarks Statistics counter assumes this is a guest event being injected or
     4715 *          re-injected into the guest, i.e. 'StatInjectPendingReflect' is
     4716 *          always incremented.
    47134717 */
    47144718DECLINLINE(void) hmR0VmxSetPendingEvent(PVMCPU pVCpu, uint32_t u32IntrInfo, uint32_t cbInstr, uint32_t u32ErrCode,
     
    47214725    pVCpu->hm.s.Event.cbInstr           = cbInstr;
    47224726    pVCpu->hm.s.Event.GCPtrFaultAddress = GCPtrFaultAddress;
     4727
     4728    STAM_COUNTER_INC(&pVCpu->hm.s.StatInjectPendingReflect);
    47234729}
    47244730
     
    48584864                Log4(("IDT: vcpu[%RU32] Pending vectoring event %#RX64 Err=%#RX32\n", pVCpu->idCpu,
    48594865                      pVCpu->hm.s.Event.u64IntrInfo, pVCpu->hm.s.Event.u32ErrCode));
     4866
    48604867                break;
    48614868            }
     
    48674874                Log4(("IDT: vcpu[%RU32] Pending vectoring #DF %#RX64 uIdtVector=%#x uExitVector=%#x\n", pVCpu->idCpu,
    48684875                      pVCpu->hm.s.Event.u64IntrInfo, uIdtVector, uExitVector));
     4876
    48694877                break;
    48704878            }
     
    57985806    Log4(("TRPM->HM event: u32IntrInfo=%#RX32 enmTrpmEvent=%d cbInstr=%u uErrCode=%#RX32 GCPtrFaultAddress=%#RGv\n",
    57995807         u32IntrInfo, enmTrpmEvent, cbInstr, uErrCode, GCPtrFaultAddress));
     5808
    58005809    hmR0VmxSetPendingEvent(pVCpu, u32IntrInfo, cbInstr, uErrCode, GCPtrFaultAddress);
     5810    STAM_COUNTER_DEC(&pVCpu->hm.s.StatInjectPendingReflect);
    58015811}
    58025812
     
    60966106            AssertRCReturn(rc, rc);
    60976107            pVCpu->hm.s.Event.fPending = false;
    6098             STAM_COUNTER_INC(&pVCpu->hm.s.StatIntReinject);
     6108
     6109#ifdef VBOX_WITH_STATISTICS
     6110            if (uIntrType == VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT_INT)
     6111                STAM_COUNTER_INC(&pVCpu->hm.s.StatInjectInterrupt);
     6112            else
     6113                STAM_COUNTER_INC(&pVCpu->hm.s.StatInjectXcpt);
     6114#endif
    60996115        }
    61006116        else
     
    61146130            AssertRCReturn(rc, rc);
    61156131            VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INTERRUPT_NMI);
     6132
     6133            STAM_COUNTER_INC(&pVCpu->hm.s.StatInjectXcpt);
    61166134        }
    61176135        else
     
    61376155                rc = hmR0VmxInjectEventVmcs(pVCpu, pMixedCtx, u32IntrInfo, 0 /* cbInstr */,  0 /* u32ErrCode */,
    61386156                                            0 /* GCPtrFaultAddress */, &uIntrState);
    6139                 STAM_COUNTER_INC(&pVCpu->hm.s.StatIntInject);
     6157
     6158                STAM_COUNTER_INC(&pVCpu->hm.s.StatInjectInterrupt);
    61406159            }
    61416160            else
     
    87178736        return VERR_EM_INTERPRETER;
    87188737    }
     8738
    87198739    hmR0VmxSetPendingEvent(pVCpu, VMX_VMCS_CTRL_ENTRY_IRQ_INFO_FROM_EXIT_INT_INFO(pVmxTransient->uExitIntrInfo),
    87208740                           pVmxTransient->cbInstr, pVmxTransient->uExitIntrErrorCode, 0 /* GCPtrFaultAddress */);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette