VirtualBox

Changeset 8860 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
May 15, 2008 2:43:16 PM (17 years ago)
Author:
vboxsync
Message:

Some flushing statistics

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/HWACCM.cpp

    r8816 r8860  
    149149    STAM_REG(pVM, &pVM->hwaccm.s.StatIntReinject,   STAMTYPE_COUNTER, "/HWACCM/Irq/Reinject",           STAMUNIT_OCCURENCES,    "Nr of occurances");
    150150    STAM_REG(pVM, &pVM->hwaccm.s.StatPendingHostIrq,STAMTYPE_COUNTER, "/HWACCM/Irq/PendingOnHost",      STAMUNIT_OCCURENCES,    "Nr of occurances");
     151
     152    STAM_REG(pVM, &pVM->hwaccm.s.StatFlushPageManual,       STAMTYPE_COUNTER, "/HWACCM/Flush/Page/Manual", STAMUNIT_OCCURENCES,    "Nr of occurances");
     153    STAM_REG(pVM, &pVM->hwaccm.s.StatFlushTLBManual,        STAMTYPE_COUNTER, "/HWACCM/Flush/TLB/Manual",  STAMUNIT_OCCURENCES,    "Nr of occurances");
     154    STAM_REG(pVM, &pVM->hwaccm.s.StatFlushTLBCRxChange,     STAMTYPE_COUNTER, "/HWACCM/Flush/TLB/CRx",     STAMUNIT_OCCURENCES,    "Nr of occurances");
     155    STAM_REG(pVM, &pVM->hwaccm.s.StatFlushPageInvlpg,       STAMTYPE_COUNTER, "/HWACCM/Flush/Page/Invlpg", STAMUNIT_OCCURENCES,    "Nr of occurances");
     156    STAM_REG(pVM, &pVM->hwaccm.s.StatFlushTLBWorldSwitch,   STAMTYPE_COUNTER, "/HWACCM/Flush/TLB/Switch",  STAMUNIT_OCCURENCES,    "Nr of occurances");
     157    STAM_REG(pVM, &pVM->hwaccm.s.StatNoFlushTLBWorldSwitch, STAMTYPE_COUNTER, "/HWACCM/Flush/TLB/Skipped", STAMUNIT_OCCURENCES,    "Nr of occurances");
    151158
    152159    pVM->hwaccm.s.pStatExitReason = 0;
  • trunk/src/VBox/VMM/HWACCMInternal.h

    r8853 r8860  
    308308    STAMCOUNTER             StatPendingHostIrq;
    309309
     310    STAMCOUNTER             StatFlushPageManual;
     311    STAMCOUNTER             StatFlushTLBManual;
     312    STAMCOUNTER             StatFlushPageInvlpg;
     313    STAMCOUNTER             StatFlushTLBWorldSwitch;
     314    STAMCOUNTER             StatNoFlushTLBWorldSwitch;
     315    STAMCOUNTER             StatFlushTLBCRxChange;
     316
    310317    STAMCOUNTER             StatSwitchGuestIrq;
    311318    STAMCOUNTER             StatSwitchToR3;
  • trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp

    r8855 r8860  
    772772    /* Make sure we flush the TLB when required. */
    773773    pVMCB->ctrl.TLBCtrl.n.u1TLBFlush = pVM->hwaccm.s.svm.fForceTLBFlush;
     774#ifdef VBOX_WITH_STATISTICS
     775    if (pVMCB->ctrl.TLBCtrl.n.u1TLBFlush)
     776        STAM_COUNTER_INC(&pVM->hwaccm.s.StatFlushTLBWorldSwitch);
     777    else
     778        STAM_COUNTER_INC(&pVM->hwaccm.s.StatNoFlushTLBWorldSwitch);
     779#endif
    774780
    775781    /* In case we execute a goto ResumeExecution later on. */
     
    12451251        rc = SVMR0InterpretInvpg(pVM, CPUMCTX2CORE(pCtx), pVMCB->ctrl.TLBCtrl.n.u32ASID);
    12461252        if (rc == VINF_SUCCESS)
     1253        {
     1254            STAM_COUNTER_INC(&pVM->hwaccm.s.StatFlushPageInvlpg);
    12471255            goto ResumeExecution;   /* eip already updated */
     1256        }
    12481257        break;
    12491258    }
     
    12831292            AssertRC(rc);
    12841293
     1294            STAM_COUNTER_INC(&pVM->hwaccm.s.StatFlushTLBCRxChange);
     1295           
    12851296            /** @note Force a TLB flush. SVM requires us to do it manually. */
    12861297            pVM->hwaccm.s.svm.fForceTLBFlush = true;
     
    17221733    AssertMsgReturn(pVMCB, ("Invalid pVMCB\n"), VERR_EM_INTERNAL_ERROR);
    17231734
     1735    STAM_COUNTER_INC(&pVM->hwaccm.s.StatFlushPageManual);
    17241736    SVMInvlpgA(GCVirt, pVMCB->ctrl.TLBCtrl.n.u32ASID);
    17251737    return VINF_SUCCESS;
     
    17361748    Log2(("SVMR0FlushTLB\n"));
    17371749    pVM->hwaccm.s.svm.fForceTLBFlush = true;
    1738 
     1750    STAM_COUNTER_INC(&pVM->hwaccm.s.StatFlushTLBManual);
    17391751    return VINF_SUCCESS;
    17401752}
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