VirtualBox

Changeset 81798 in vbox


Ignore:
Timestamp:
Nov 12, 2019 12:45:25 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
134589
Message:

IOMR3Mmio: Don't register RZ stats for ring-3 only MMIO regions. bugref:9218

File:
1 edited

Legend:

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

    r81564 r81798  
    4747void iomR3MmioRegStats(PVM pVM, PIOMMMIOENTRYR3 pRegEntry)
    4848{
    49     PIOMMMIOSTATSENTRY   pStats      = &pVM->iom.s.paMmioStats[pRegEntry->idxStats];
     49    bool const           fDoRZ  = pRegEntry->fRing0 || pRegEntry->fRawMode;
     50    PIOMMMIOSTATSENTRY   pStats = &pVM->iom.s.paMmioStats[pRegEntry->idxStats];
    5051
    5152    /* Format the prefix: */
     
    7172    SET_NM_SUFFIX("/Read-R3");
    7273    rc = STAMR3Register(pVM, &pStats->ProfReadR3,  STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, NULL); AssertRC(rc);
    73     SET_NM_SUFFIX("/Read-RZ");
    74     rc = STAMR3Register(pVM, &pStats->ProfReadRZ,  STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, NULL); AssertRC(rc);
    75     SET_NM_SUFFIX("/Read-RZtoR3");
    76     rc = STAMR3Register(pVM, &pStats->ReadRZToR3,  STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES,     NULL); AssertRC(rc);
     74    if (fDoRZ)
     75    {
     76        SET_NM_SUFFIX("/Read-RZ");
     77        rc = STAMR3Register(pVM, &pStats->ProfReadRZ,  STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, NULL); AssertRC(rc);
     78        SET_NM_SUFFIX("/Read-RZtoR3");
     79        rc = STAMR3Register(pVM, &pStats->ReadRZToR3,  STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES,     NULL); AssertRC(rc);
     80    }
    7781    SET_NM_SUFFIX("/Read-Total");
    7882    rc = STAMR3Register(pVM, &pStats->Reads,       STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES,     NULL); AssertRC(rc);
     
    8286    SET_NM_SUFFIX("/Write-R3");
    8387    rc = STAMR3Register(pVM, &pStats->ProfWriteR3,  STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, NULL); AssertRC(rc);
    84     SET_NM_SUFFIX("/Write-RZ");
    85     rc = STAMR3Register(pVM, &pStats->ProfWriteRZ, STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, NULL); AssertRC(rc);
    86     SET_NM_SUFFIX("/Write-RZtoR3");
    87     rc = STAMR3Register(pVM, &pStats->WriteRZToR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES,     NULL); AssertRC(rc);
    88     SET_NM_SUFFIX("/Write-RZtoR3-Commit");
    89     rc = STAMR3Register(pVM, &pStats->CommitRZToR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES,    NULL); AssertRC(rc);
     88    if (fDoRZ)
     89    {
     90        SET_NM_SUFFIX("/Write-RZ");
     91        rc = STAMR3Register(pVM, &pStats->ProfWriteRZ, STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, NULL); AssertRC(rc);
     92        SET_NM_SUFFIX("/Write-RZtoR3");
     93        rc = STAMR3Register(pVM, &pStats->WriteRZToR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES,     NULL); AssertRC(rc);
     94        SET_NM_SUFFIX("/Write-RZtoR3-Commit");
     95        rc = STAMR3Register(pVM, &pStats->CommitRZToR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES,    NULL); AssertRC(rc);
     96    }
    9097    SET_NM_SUFFIX("/Write-Total");
    9198    rc = STAMR3Register(pVM, &pStats->Writes,      STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES,     NULL); AssertRC(rc);
Note: See TracChangeset for help on using the changeset viewer.

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