VirtualBox

Changeset 87671 in vbox for trunk/src/VBox/Devices/Bus


Ignore:
Timestamp:
Feb 10, 2021 5:34:28 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
142713
Message:

AMD IOMMU: bugref:9654 IOTLB cache bits, better stats, profile build fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/DevIommuAmd.cpp

    r87667 r87671  
    452452    STAMCOUNTER                 StatIotlbeCacheMiss;        /**< Number of IOTLB cache misses. */
    453453    STAMCOUNTER                 StatIotlbeLazyEvictReuse;   /**< Number of IOTLB entries re-used after lazy eviction. */
     454    STAMPROFILEADV              StatIotlbeLookup;           /**< Profiling of IOTLB entry lookup (cached). */
    454455
    455456    STAMCOUNTER                 StatDteLookupNonContig;     /**< Number of DTE lookups that result in non-contiguous regions. */
    456     STAMPROFILEADV              StatDteLookup;              /**< Profiling of device table entry lookup (uncached). */
     457    STAMPROFILEADV              StatIoPageWalkLookup;       /**< Profiling of I/O page walk (uncached). */
    457458    /** @} */
    458459#endif
     
    33923393    RTGCPHYS GCPhysSpa    = NIL_RTGCPHYS;
    33933394    size_t   cbContiguous = 0;
    3394 
    3395     STAM_PROFILE_ADV_START(&pThis->StatDteLookup, a);
    33963395
    33973396    /* Read the device table entry from memory. */
     
    34253424                        IOWALKRESULT WalkResult;
    34263425                        RT_ZERO(WalkResult);
     3426                        STAM_PROFILE_ADV_START(&pThis->StatIoPageWalkLookup, a);
    34273427                        rc = iommuAmdIoPageTableWalk(pDevIns, uDevId, uIovaPage, fPerm, &Dte, enmOp, &WalkResult);
     3428                        STAM_PROFILE_ADV_STOP(&pThis->StatIoPageWalkLookup, a);
    34283429                        if (RT_SUCCESS(rc))
    34293430                        {
     
    35523553    AssertMsg(rc != VINF_SUCCESS || cbContiguous > 0, ("cbContiguous=%zu\n", cbContiguous));
    35533554
    3554     STAM_PROFILE_ADV_STOP(&pThis->StatDteLookup, a);
    35553555    return rc;
    35563556}
     
    36033603        for (;;)
    36043604        {
     3605            STAM_PROFILE_ADV_START(&pThis->StatIotlbeLookup, b);
    36053606            PCIOTLBE pIotlbe = iommuAmdIotlbLookup(pThis, pDevice->uDomainId, uIovaPage);
     3607            STAM_PROFILE_ADV_STOP(&pThis->StatIotlbeLookup, b);
    36063608            if (pIotlbe)
    36073609            {
     
    54585460    PCPDMPCIDEV pPciDev = pDevIns->apPciDevs[0];
    54595461    PDMPCIDEV_ASSERT_VALID(pDevIns, pPciDev);
     5462    NOREF(pPciDev);
    54605463
    54615464    uint8_t cSegments = 0;
     
    58925895    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatIotlbeCacheMiss, STAMTYPE_COUNTER, "IOTLB/CacheMiss", STAMUNIT_OCCURENCES, "Number of IOTLB cache misses.");
    58935896    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatIotlbeLazyEvictReuse, STAMTYPE_COUNTER, "IOTLB/LazyEvictReuse", STAMUNIT_OCCURENCES, "Number of IOTLB entries reused after lazy eviction.");
     5897    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatIotlbeLookup, STAMTYPE_PROFILE, "IOTLB/Lookup", STAMUNIT_TICKS_PER_CALL, "Profiling IOTLB entry lookup.");
    58945898
    58955899    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatDteLookupNonContig, STAMTYPE_COUNTER, "DTE/LookupNonContig", STAMUNIT_OCCURENCES, "DTE lookups that resulted in non-contiguous translated regions.");
    5896     PDMDevHlpSTAMRegister(pDevIns, &pThis->StatDteLookup, STAMTYPE_PROFILE, "DTE/Lookup", STAMUNIT_TICKS_PER_CALL, "Profiling device table entry lookup (uncached).");
     5900    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatIoPageWalkLookup, STAMTYPE_PROFILE, "DTE/Lookup", STAMUNIT_TICKS_PER_CALL, "Profiling I/O page walk lookup.");
    58975901# endif
    58985902
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