VirtualBox

Changeset 87293 in vbox


Ignore:
Timestamp:
Jan 18, 2021 8:36:08 AM (4 years ago)
Author:
vboxsync
Message:

AMD IOMMU: bugref:9654 Add profiling stat for device table lookups (uncached).

File:
1 edited

Legend:

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

    r86984 r87293  
    327327    STAMCOUNTER             StatCmdCompletePprReq;      /**< Number of Complete PPR Requests commands processed. */
    328328    STAMCOUNTER             StatCmdInvIommuAll;         /**< Number of Invalidate IOMMU All commands processed. */
     329
     330    STAMPROFILEADV          StatDteLookup;              /**< Profiling of device table entry lookup (uncached). */
    329331    /** @} */
    330332#endif
     
    26502652{
    26512653    PIOMMU pThis = PDMDEVINS_2_DATA(pDevIns, PIOMMU);
     2654    STAM_PROFILE_ADV_START(&pThis->StatDteLookup, a);
    26522655
    26532656    /* Read the device table entry from memory. */
     
    26632666            /** @todo IOMMU: Add to IOLTB cache. */
    26642667            *pGCPhysSpa = uIova;
     2668            STAM_PROFILE_ADV_STOP(&pThis->StatDteLookup, a);
    26652669            return VINF_SUCCESS;
    26662670        }
     
    26782682            iommuAmdInitIllegalDteEvent(uDevId, uIova, true /* fRsvdNotZero */, enmOp, &Event);
    26792683            iommuAmdRaiseIllegalDteEvent(pDevIns, enmOp, &Event, kIllegalDteType_RsvdNotZero);
     2684            STAM_PROFILE_ADV_STOP(&pThis->StatDteLookup, a);
    26802685            return VERR_IOMMU_ADDR_TRANSLATION_FAILED;
    26812686        }
     
    26892694            /** @todo IOMMU: Add to IOLTB cache. */
    26902695            *pGCPhysSpa = uIova;
     2696            STAM_PROFILE_ADV_STOP(&pThis->StatDteLookup, a);
    26912697            return VINF_SUCCESS;
    26922698        }
     
    27392745                     uBaseIova, fAccess, rc));
    27402746                *pGCPhysSpa = NIL_RTGCPHYS;
     2747                STAM_PROFILE_ADV_STOP(&pThis->StatDteLookup, a);
    27412748                return rc;
    27422749            }
    27432750        }
    27442751
     2752        STAM_PROFILE_ADV_STOP(&pThis->StatDteLookup, a);
    27452753        return rc;
    27462754    }
    27472755
    27482756    LogFunc(("Failed to read device table entry. uDevId=%#x rc=%Rrc\n", uDevId, rc));
     2757    STAM_PROFILE_ADV_STOP(&pThis->StatDteLookup, a);
    27492758    return VERR_IOMMU_ADDR_TRANSLATION_FAILED;
    27502759}
     
    47324741    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatCmdCompletePprReq, STAMTYPE_COUNTER, "R3/Commands/CompletePprReq", STAMUNIT_OCCURENCES, "Number of Complete PPR Requests commands processed.");
    47334742    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatCmdInvIommuAll, STAMTYPE_COUNTER, "R3/Commands/InvIommuAll", STAMUNIT_OCCURENCES, "Number of Invalidate IOMMU All commands processed.");
     4743
     4744    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatDteLookup, STAMTYPE_PROFILE, "DteLookup", STAMUNIT_TICKS_PER_CALL, "Profiling device table entry lookup (uncached).");
    47344745# endif
    47354746
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