VirtualBox

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


Ignore:
Timestamp:
Nov 12, 2019 12:43:25 PM (5 years ago)
Author:
vboxsync
Message:

IOMR3IoPort: Don't register RZ stats for ring-3 only ports. bugref:9218

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/IOMR3IoPort.cpp

    r81702 r81797  
    4747void iomR3IoPortRegStats(PVM pVM, PIOMIOPORTENTRYR3 pRegEntry)
    4848{
     49    bool const           fDoRZ      = pRegEntry->fRing0 || pRegEntry->fRawMode;
    4950    PIOMIOPORTSTATSENTRY pStats     = &pVM->iom.s.paIoPortStats[pRegEntry->idxStats];
    5051    PCIOMIOPORTDESC      pExtDesc   = pRegEntry->paExtDescs;
     
    9091        SET_NM_SUFFIX("Out-R3");
    9192        rc = STAMR3Register(pVM, &pStats->OutR3,     STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES, pszOutDesc); AssertRC(rc);
    92         SET_NM_SUFFIX("In-RZ");
    93         rc = STAMR3Register(pVM, &pStats->InRZ,      STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES, pszInDesc); AssertRC(rc);
    94         SET_NM_SUFFIX("Out-RZ");
    95         rc = STAMR3Register(pVM, &pStats->OutRZ,     STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES, pszOutDesc); AssertRC(rc);
    96         SET_NM_SUFFIX("In-RZtoR3");
    97         rc = STAMR3Register(pVM, &pStats->InRZToR3,  STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES, NULL); AssertRC(rc);
    98         SET_NM_SUFFIX("Out-RZtoR3");
    99         rc = STAMR3Register(pVM, &pStats->OutRZToR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES, NULL); AssertRC(rc);
     93        if (fDoRZ)
     94        {
     95            SET_NM_SUFFIX("In-RZ");
     96            rc = STAMR3Register(pVM, &pStats->InRZ,      STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES, pszInDesc); AssertRC(rc);
     97            SET_NM_SUFFIX("Out-RZ");
     98            rc = STAMR3Register(pVM, &pStats->OutRZ,     STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES, pszOutDesc); AssertRC(rc);
     99            SET_NM_SUFFIX("In-RZtoR3");
     100            rc = STAMR3Register(pVM, &pStats->InRZToR3,  STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES, NULL); AssertRC(rc);
     101            SET_NM_SUFFIX("Out-RZtoR3");
     102            rc = STAMR3Register(pVM, &pStats->OutRZToR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES, NULL); AssertRC(rc);
     103        }
    100104
    101105        /* Profiling */
     
    104108        SET_NM_SUFFIX("Out-R3-Prof");
    105109        rc = STAMR3Register(pVM, &pStats->ProfOutR3, STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, pszOutDesc); AssertRC(rc);
    106         SET_NM_SUFFIX("In-RZ-Prof");
    107         rc = STAMR3Register(pVM, &pStats->ProfInRZ,  STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, pszInDesc); AssertRC(rc);
    108         SET_NM_SUFFIX("Out-RZ-Prof");
    109         rc = STAMR3Register(pVM, &pStats->ProfOutRZ, STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, pszOutDesc); AssertRC(rc);
     110        if (fDoRZ)
     111        {
     112            SET_NM_SUFFIX("In-RZ-Prof");
     113            rc = STAMR3Register(pVM, &pStats->ProfInRZ,  STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, pszInDesc); AssertRC(rc);
     114            SET_NM_SUFFIX("Out-RZ-Prof");
     115            rc = STAMR3Register(pVM, &pStats->ProfOutRZ, STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, pszOutDesc); AssertRC(rc);
     116        }
    110117
    111118        pStats++;
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