VirtualBox

Ignore:
Timestamp:
Mar 10, 2025 11:23:08 AM (8 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167880
Message:

VMM/GIC: bugref:10404 Profiling counters.

File:
1 edited

Legend:

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

    r108491 r108492  
    873873     * not just used during live debugging via the VM debugger.
    874874     */
    875     DBGFR3InfoRegisterInternalEx(pVM, "gic",       "Dumps GIC basic information.",          gicR3Info,       DBGFINFO_FLAGS_ALL_EMTS);
    876     DBGFR3InfoRegisterInternalEx(pVM, "gicdist",   "Dumps GIC Distributor information.",    gicR3InfoDist,   DBGFINFO_FLAGS_ALL_EMTS);
    877     DBGFR3InfoRegisterInternalEx(pVM, "gicredist", "Dumps GIC Redistributor information.", gicR3InfoReDist, DBGFINFO_FLAGS_ALL_EMTS);
     875    DBGFR3InfoRegisterInternalEx(pVM, "gic",       "Dumps GIC basic information.",         gicR3Info,       DBGFINFO_FLAGS_ALL_EMTS);
     876    DBGFR3InfoRegisterInternalEx(pVM, "gicdist",   "Dumps GIC distributor information.",   gicR3InfoDist,   DBGFINFO_FLAGS_ALL_EMTS);
     877    DBGFR3InfoRegisterInternalEx(pVM, "gicredist", "Dumps GIC redistributor information.", gicR3InfoReDist, DBGFINFO_FLAGS_ALL_EMTS);
    878878
    879879    /*
    880880     * Statistics.
    881881     */
    882 #define GIC_REG_COUNTER(a_pvReg, a_pszNameFmt, a_pszDesc) \
    883         PDMDevHlpSTAMRegisterF(pDevIns, a_pvReg, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, \
    884                                STAMUNIT_OCCURENCES, a_pszDesc, a_pszNameFmt, idCpu)
    885 #define GIC_PROF_COUNTER(a_pvReg, a_pszNameFmt, a_pszDesc) \
    886         PDMDevHlpSTAMRegisterF(pDevIns, a_pvReg, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, \
    887                                STAMUNIT_TICKS_PER_CALL, a_pszDesc, a_pszNameFmt, idCpu)
    888 
    889882#ifdef VBOX_WITH_STATISTICS
     883# define GIC_REG_COUNTER(a_pvReg, a_pszNameFmt, a_pszDesc) \
     884         PDMDevHlpSTAMRegisterF(pDevIns, a_pvReg, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, \
     885                                a_pszDesc, a_pszNameFmt, idCpu)
     886# define GIC_PROF_COUNTER(a_pvReg, a_pszNameFmt, a_pszDesc) \
     887         PDMDevHlpSTAMRegisterF(pDevIns, a_pvReg, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, \
     888                                a_pszDesc, a_pszNameFmt, idCpu)
     889
    890890    for (VMCPUID idCpu = 0; idCpu < pVM->cCpus; idCpu++)
    891891    {
     
    893893        PGICCPU pGicCpu  = VMCPU_TO_GICCPU(pVCpu);
    894894
    895 # if 0 /* No R0 for now. */
    896         GIC_REG_COUNTER(&pGicCpu->StatMmioReadRZ,    "%u/RZ/MmioRead",    "Number of APIC MMIO reads in RZ.");
    897         GIC_REG_COUNTER(&pGicCpu->StatMmioWriteRZ,   "%u/RZ/MmioWrite",   "Number of APIC MMIO writes in RZ.");
    898         GIC_REG_COUNTER(&pGicCpu->StatMsrReadRZ,     "%u/RZ/MsrRead",     "Number of APIC MSR reads in RZ.");
    899         GIC_REG_COUNTER(&pGicCpu->StatMsrWriteRZ,    "%u/RZ/MsrWrite",    "Number of APIC MSR writes in RZ.");
    900 # endif
    901 
    902         GIC_REG_COUNTER(&pGicCpu->StatMmioReadR3,    "%u/R3/MmioRead",    "Number of APIC MMIO reads in R3.");
    903         GIC_REG_COUNTER(&pGicCpu->StatMmioWriteR3,   "%u/R3/MmioWrite",   "Number of APIC MMIO writes in R3.");
    904         GIC_REG_COUNTER(&pGicCpu->StatSysRegReadR3,  "%u/R3/SysRegRead",  "Number of GIC system register reads in R3.");
    905         GIC_REG_COUNTER(&pGicCpu->StatSysRegWriteR3, "%u/R3/SysRegWrite", "Number of GIC system register writes in R3.");
    906         GIC_REG_COUNTER(&pGicCpu->StatSetSpiR3,      "%u/R3/SetSpi",      "Number of GIC set SPI callbacks in R3.");
    907         GIC_REG_COUNTER(&pGicCpu->StatSetPpiR3,      "%u/R3/SetPpi",      "Number of GIC set PPI callbacks in R3.");
    908     }
     895        GIC_REG_COUNTER(&pGicCpu->StatMmioReadR3,    "%u/MmioRead",     "Number of MMIO reads in R3.");
     896        GIC_REG_COUNTER(&pGicCpu->StatMmioWriteR3,   "%u/MmioWrite",    "Number of MMIO writes in R3.");
     897        GIC_REG_COUNTER(&pGicCpu->StatSysRegReadR3,  "%u/SysRegRead",   "Number of system register reads in R3.");
     898        GIC_REG_COUNTER(&pGicCpu->StatSysRegWriteR3, "%u/SysRegWrite",  "Number of system register writes in R3.");
     899        GIC_REG_COUNTER(&pGicCpu->StatSetSpiR3,      "%u/SetSpi",       "Number of set SPI callbacks in R3.");
     900        GIC_REG_COUNTER(&pGicCpu->StatSetPpiR3,      "%u/SetPpi",       "Number of set PPI callbacks in R3.");
     901        GIC_REG_COUNTER(&pGicCpu->StatSetSgiR3,      "%u/SetSgi",       "Number of SGIs generated in R3.");
     902
     903        GIC_PROF_COUNTER(&pGicCpu->StatProfIntrAckR3, "%u/Prof/IntrAck", "Profiling of interrupt acknowledge (IAR) in R3.");
     904        GIC_PROF_COUNTER(&pGicCpu->StatProfSetSpiR3,  "%u/Prof/SetSpi",  "Profiling of set SPI callback in R3.");
     905        GIC_PROF_COUNTER(&pGicCpu->StatProfSetPpiR3,  "%u/Prof/SetPpi",  "Profiling of set PPI callback in R3.");
     906        GIC_PROF_COUNTER(&pGicCpu->StatProfSetSgiR3,  "%u/Prof/SetSgi",  "Profiling of SGIs generated in R3.");
     907    }
     908# undef GIC_PROF_COUNTER
    909909#endif
    910910
    911 # undef GIC_PROF_COUNTER
    912911
    913912    gicR3Reset(pDevIns);
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