VirtualBox

Changeset 61848 in vbox


Ignore:
Timestamp:
Jun 23, 2016 12:20:44 PM (8 years ago)
Author:
vboxsync
Message:

VMM/APIC: Use RZ {R0,RC} for the stat counters rather than separate R0, RC members with only using one of them while running the VM.

Location:
trunk/src/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp

    r61847 r61848  
    785785    GEN_CHECK_OFF(APICCPU, uHintedTimerShift);
    786786# ifdef VBOX_WITH_STATISTICS
    787     GEN_CHECK_OFF(APICCPU, StatMmioReadR0);
     787    GEN_CHECK_OFF(APICCPU, StatMmioReadRZ);
    788788    GEN_CHECK_OFF(APICCPU, StatMmioReadR3);
    789     GEN_CHECK_OFF(APICCPU, StatMmioReadRC);
    790     GEN_CHECK_OFF(APICCPU, StatMmioWriteR0);
     789    GEN_CHECK_OFF(APICCPU, StatMmioWriteRZ);
    791790    GEN_CHECK_OFF(APICCPU, StatMmioWriteR3);
    792     GEN_CHECK_OFF(APICCPU, StatMmioWriteRC);
    793     GEN_CHECK_OFF(APICCPU, StatMsrReadR0);
     791    GEN_CHECK_OFF(APICCPU, StatMsrReadRZ);
    794792    GEN_CHECK_OFF(APICCPU, StatMsrReadR3);
    795     GEN_CHECK_OFF(APICCPU, StatMsrReadRC);
    796     GEN_CHECK_OFF(APICCPU, StatMsrWriteR0);
     793    GEN_CHECK_OFF(APICCPU, StatMsrWriteRZ);
    797794    GEN_CHECK_OFF(APICCPU, StatMsrWriteR3);
    798     GEN_CHECK_OFF(APICCPU, StatMsrWriteRC);
    799795    GEN_CHECK_OFF(APICCPU, StatUpdatePendingIntrs);
    800796    GEN_CHECK_OFF(APICCPU, StatPostIntr);
  • trunk/src/VBox/VMM/VMMAll/APICAll.cpp

    r61847 r61848  
    18301830#endif
    18311831
    1832     STAM_COUNTER_INC(&pVCpu->apic.s.CTX_SUFF(StatMsrRead));
     1832    STAM_COUNTER_INC(&pVCpu->apic.s.CTX_SUFF_Z(StatMsrRead));
    18331833
    18341834    VBOXSTRICTRC rcStrict = VINF_SUCCESS;
     
    19361936#endif
    19371937
    1938     STAM_COUNTER_INC(&pVCpu->apic.s.CTX_SUFF(StatMsrWrite));
     1938    STAM_COUNTER_INC(&pVCpu->apic.s.CTX_SUFF_Z(StatMsrWrite));
    19391939
    19401940    /*
     
    25522552    uint32_t uValue   = 0;
    25532553
    2554     STAM_COUNTER_INC(&pVCpu->apic.s.CTX_SUFF(StatMmioRead));
     2554    STAM_COUNTER_INC(&pVCpu->apic.s.CTX_SUFF_Z(StatMmioRead));
    25552555
    25562556    int rc = VBOXSTRICTRC_VAL(apicReadRegister(pApicDev, pVCpu, offReg, &uValue));
     
    25762576    uint32_t uValue   = *(uint32_t *)pv;
    25772577
    2578     STAM_COUNTER_INC(&pVCpu->apic.s.CTX_SUFF(StatMmioWrite));
     2578    STAM_COUNTER_INC(&pVCpu->apic.s.CTX_SUFF_Z(StatMmioWrite));
    25792579
    25802580    Log2(("APIC%u: apicWriteMmio: offReg=%#RX16 uValue=%#RX32\n", pVCpu->idCpu, offReg, uValue));
  • trunk/src/VBox/VMM/VMMR3/APIC.cpp

    r61847 r61848  
    17971797    } while(0)
    17981798
    1799     bool const fHasRC = !HMIsEnabledNotMacro(pVM);
    18001799    for (VMCPUID idCpu = 0; idCpu < pVM->cCpus; idCpu++)
    18011800    {
     
    18031802        PAPICCPU pApicCpu  = VMCPU_TO_APICCPU(pVCpu);
    18041803
    1805         APIC_REG_COUNTER(&pApicCpu->StatMmioReadR0,  "Number of APIC MMIO reads in R0.",  "/Devices/APIC/%u/R0/MmioRead");
    1806         APIC_REG_COUNTER(&pApicCpu->StatMmioWriteR0, "Number of APIC MMIO writes in R0.", "/Devices/APIC/%u/R0/MmioWrite");
    1807         APIC_REG_COUNTER(&pApicCpu->StatMsrReadR0,   "Number of APIC MSR reads in R0.",   "/Devices/APIC/%u/R0/MsrRead");
    1808         APIC_REG_COUNTER(&pApicCpu->StatMsrWriteR0,  "Number of APIC MSR writes in R0.",  "/Devices/APIC/%u/R0/MsrWrite");
     1804        APIC_REG_COUNTER(&pApicCpu->StatMmioReadRZ,  "Number of APIC MMIO reads in RZ.",  "/Devices/APIC/%u/RZ/MmioRead");
     1805        APIC_REG_COUNTER(&pApicCpu->StatMmioWriteRZ, "Number of APIC MMIO writes in RZ.", "/Devices/APIC/%u/RZ/MmioWrite");
     1806        APIC_REG_COUNTER(&pApicCpu->StatMsrReadRZ,   "Number of APIC MSR reads in RZ.",   "/Devices/APIC/%u/RZ/MsrRead");
     1807        APIC_REG_COUNTER(&pApicCpu->StatMsrWriteRZ,  "Number of APIC MSR writes in RZ.",  "/Devices/APIC/%u/RZ/MsrWrite");
    18091808
    18101809        APIC_REG_COUNTER(&pApicCpu->StatMmioReadR3,  "Number of APIC MMIO reads in R3.",  "/Devices/APIC/%u/R3/MmioReadR3");
     
    18121811        APIC_REG_COUNTER(&pApicCpu->StatMsrReadR3,   "Number of APIC MSR reads in R3.",   "/Devices/APIC/%u/R3/MsrReadR3");
    18131812        APIC_REG_COUNTER(&pApicCpu->StatMsrWriteR3,  "Number of APIC MSR writes in R3.",  "/Devices/APIC/%u/R3/MsrWriteR3");
    1814 
    1815         if (fHasRC)
    1816         {
    1817             APIC_REG_COUNTER(&pApicCpu->StatMmioReadRC,  "Number of APIC MMIO reads in RC.",  "/Devices/APIC/%u/RC/MmioRead");
    1818             APIC_REG_COUNTER(&pApicCpu->StatMmioWriteRC, "Number of APIC MMIO writes in RC.", "/Devices/APIC/%u/RC/MmioWrite");
    1819             APIC_REG_COUNTER(&pApicCpu->StatMsrReadRC,   "Number of APIC MSR reads in RC.",   "/Devices/APIC/%u/RC/MsrRead");
    1820             APIC_REG_COUNTER(&pApicCpu->StatMsrWriteRC,  "Number of APIC MSR writes in RC.",  "/Devices/APIC/%u/RC/MsrWrite");
    1821         }
    18221813
    18231814        APIC_PROF_COUNTER(&pApicCpu->StatUpdatePendingIntrs, "Profiling of APICUpdatePendingInterrupts",
  • trunk/src/VBox/VMM/include/APICInternal.h

    r61847 r61848  
    13191319    /** @name APIC statistics.
    13201320     * @{ */
    1321     /** Number of MMIO reads in R0. */
    1322     STAMCOUNTER                 StatMmioReadR0;
     1321    /** Number of MMIO reads in RZ. */
     1322    STAMCOUNTER                 StatMmioReadRZ;
    13231323    /** Number of MMIO reads in R3. */
    13241324    STAMCOUNTER                 StatMmioReadR3;
    1325     /** Number of MMIO reads in RC. */
    1326     STAMCOUNTER                 StatMmioReadRC;
    1327 
    1328     /** Number of MMIO writes in R0. */
    1329     STAMCOUNTER                 StatMmioWriteR0;
     1325
     1326    /** Number of MMIO writes in RZ. */
     1327    STAMCOUNTER                 StatMmioWriteRZ;
    13301328    /** Number of MMIO writes in R3. */
    13311329    STAMCOUNTER                 StatMmioWriteR3;
    1332     /** Number of MMIO writes in RC. */
    1333     STAMCOUNTER                 StatMmioWriteRC;
    1334 
    1335     /** Number of MSR reads in R0. */
    1336     STAMCOUNTER                 StatMsrReadR0;
     1330
     1331    /** Number of MSR reads in RZ. */
     1332    STAMCOUNTER                 StatMsrReadRZ;
    13371333    /** Number of MSR reads in R3. */
    13381334    STAMCOUNTER                 StatMsrReadR3;
    1339     /** Number of MSR reads in RC. */
    1340     STAMCOUNTER                 StatMsrReadRC;
    1341 
    1342     /** Number of MSR writes in R0. */
    1343     STAMCOUNTER                 StatMsrWriteR0;
     1335
     1336    /** Number of MSR writes in RZ. */
     1337    STAMCOUNTER                 StatMsrWriteRZ;
    13441338    /** Number of MSR writes in R3. */
    13451339    STAMCOUNTER                 StatMsrWriteR3;
    1346     /** Number of MSR writes in RC. */
    1347     STAMCOUNTER                 StatMsrWriteRC;
    13481340
    13491341    /** Profiling of APICUpdatePendingInterrupts().  */
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