VirtualBox

Changeset 46850 in vbox


Ignore:
Timestamp:
Jun 27, 2013 4:34:11 PM (12 years ago)
Author:
vboxsync
Message:

VMM/VMMR0: HM profile counters.

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

Legend:

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

    r46844 r46850  
    18001800    }
    18011801
     1802    STAM_PROFILE_ADV_SET_STOPPED(&pVCpu->hm.s.StatEntry);
     1803    STAM_PROFILE_ADV_SET_STOPPED(&pVCpu->hm.s.StatLoadGuestState);
     1804    STAM_PROFILE_ADV_SET_STOPPED(&pVCpu->hm.s.StatExit1);
     1805    STAM_PROFILE_ADV_SET_STOPPED(&pVCpu->hm.s.StatExit2);
    18021806    STAM_COUNTER_INC(&pVCpu->hm.s.StatSwitchLongJmpToR3);
     1807
    18031808    VMCPU_CMPXCHG_STATE(pVCpu, VMCPUSTATE_STARTED_HM, VMCPUSTATE_STARTED_EXEC);
    18041809}
     
    26042609    Assert(HMR0GetCurrentCpu()->idCpu == pVCpu->hm.s.idLastCpu);
    26052610
     2611    STAM_PROFILE_ADV_STOP_START(&pVCpu->hm.s.StatEntry, &pVCpu->hm.s.StatInGC, x);
     2612
    26062613    TMNotifyStartOfExecution(pVCpu);                            /* Finally, notify TM to resume its clocks as we're about
    26072614                                                                    to start executing. */
     
    26872694    }
    26882695
     2696    STAM_PROFILE_ADV_STOP_START(&pVCpu->hm.s.StatInGC, &pVCpu->hm.s.StatExit1, x);
    26892697    TMNotifyEndOfExecution(pVCpu);                              /* Notify TM that the guest is no longer running. */
    26902698    VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_HM);
     
    27822790            if (rc == VINF_SUCCESS)
    27832791                rc = VERR_SVM_INVALID_GUEST_STATE;
     2792            STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatExit1, x);
    27842793            hmR0SvmReportWorldSwitchError(pVM, pVCpu, rc, pCtx);
    27852794            return rc;
     
    27882797        /* Handle the #VMEXIT. */
    27892798        HMSVM_EXITCODE_STAM_COUNTER_INC(SvmTransient.u64ExitCode);
     2799        STAM_PROFILE_ADV_STOP_START(&pVCpu->hm.s.StatExit1, &pVCpu->hm.s.StatExit2, x);
    27902800        rc = hmR0SvmHandleExit(pVCpu, pCtx, &SvmTransient);
     2801        STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatExit2, x);
    27912802        if (rc != VINF_SUCCESS)
    27922803            break;
     
    27992810    }
    28002811
     2812    STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatEntry, x);
    28012813    if (rc == VERR_EM_INTERPRETER)
    28022814        rc = VINF_EM_RAW_EMULATE_INSTR;
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r46789 r46850  
    59115911    }
    59125912
    5913     STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatEntry, x);
    5914     STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatLoadGuestState, x);
    5915     STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatExit1, x);
    5916     STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatExit2, x);
    5917     STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatExitIO, y1);
    5918     STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatExitMovCRx, y2);
    5919     STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatExitXcptNmi, y3);
     5913    STAM_PROFILE_ADV_SET_STOPPED(&pVCpu->hm.s.StatEntry);
     5914    STAM_PROFILE_ADV_SET_STOPPED(&pVCpu->hm.s.StatLoadGuestState);
     5915    STAM_PROFILE_ADV_SET_STOPPED(&pVCpu->hm.s.StatExit1);
     5916    STAM_PROFILE_ADV_SET_STOPPED(&pVCpu->hm.s.StatExit2);
     5917    STAM_PROFILE_ADV_SET_STOPPED(&pVCpu->hm.s.StatExitIO);
     5918    STAM_PROFILE_ADV_SET_STOPPED(&pVCpu->hm.s.StatExitMovCRx);
     5919    STAM_PROFILE_ADV_SET_STOPPED(&pVCpu->hm.s.StatExitXcptNmi);
    59205920    STAM_COUNTER_INC(&pVCpu->hm.s.StatSwitchLongJmpToR3);
     5921
    59215922    VMCPU_CMPXCHG_STATE(pVCpu, VMCPUSTATE_STARTED_HM, VMCPUSTATE_STARTED_EXEC);
    59225923}
     
    68796880    Assert(HMR0GetCurrentCpu()->idCpu == pVCpu->hm.s.idLastCpu);
    68806881
     6882    STAM_PROFILE_ADV_STOP_START(&pVCpu->hm.s.StatEntry, &pVCpu->hm.s.StatInGC, x);
     6883
     6884    TMNotifyStartOfExecution(pVCpu);                            /* Finally, notify TM to resume its clocks as we're about
     6885                                                                    to start executing. */
     6886
    68816887#ifndef VBOX_WITH_AUTO_MSR_LOAD_RESTORE
    68826888    /*
     
    68946900    }
    68956901#endif
    6896 
    6897     TMNotifyStartOfExecution(pVCpu);                            /* Finally, notify TM to resume its clocks as we're about
    6898                                                                     to start executing. */
    6899     STAM_PROFILE_ADV_STOP_START(&pVCpu->hm.s.StatEntry, &pVCpu->hm.s.StatInGC, x);
    69006902}
    69016903
     
    69206922{
    69216923    Assert(!VMMRZCallRing3IsEnabled(pVCpu));
    6922     STAM_PROFILE_ADV_STOP_START(&pVCpu->hm.s.StatInGC, &pVCpu->hm.s.StatExit1, x);
    69236924
    69246925    ASMAtomicWriteBool(&pVCpu->hm.s.fCheckedTLBFlush, false);   /* See HMInvalidatePageOnAllVCpus(): used for TLB-shootdowns. */
     
    69406941    }
    69416942
     6943    STAM_PROFILE_ADV_STOP_START(&pVCpu->hm.s.StatInGC, &pVCpu->hm.s.StatExit1, x);
    69426944    TMNotifyEndOfExecution(pVCpu);                              /* Notify TM that the guest is no longer running. */
    69436945    Assert(!(ASMGetFlags() & X86_EFL_IF));
  • trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp

    r46803 r46850  
    14861486    VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_EXEC);
    14871487#endif
    1488     STAM_PROFILE_ADV_STOP_START(&pVCpu->hm.s.StatEntry, &pVCpu->hm.s.StatInGC, x);
    14891488
    14901489    /* Setup TLB control and ASID in the VMCB. */
     
    15051504#endif
    15061505    TMNotifyStartOfExecution(pVCpu);
     1506    STAM_PROFILE_ADV_STOP_START(&pVCpu->hm.s.StatEntry, &pVCpu->hm.s.StatInGC, x);
    15071507
    15081508    /*
     
    15411541    }
    15421542
     1543    STAM_PROFILE_ADV_STOP_START(&pVCpu->hm.s.StatInGC, &pVCpu->hm.s.StatExit1, x);
    15431544    TMNotifyEndOfExecution(pVCpu);
    15441545    VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_HM);
    1545     STAM_PROFILE_ADV_STOP_START(&pVCpu->hm.s.StatInGC, &pVCpu->hm.s.StatExit1, x);
    15461546    ASMSetFlags(uOldEFlags);
    15471547#ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
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