Changeset 82380 in vbox for trunk/src/VBox
- Timestamp:
- Dec 4, 2019 12:41:02 PM (5 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IOMAllMmioNew.cpp
r82313 r82380 652 652 RTGCPHYS GCPhysFault, CTX_SUFF(PIOMMMIOENTRY) pRegEntry) 653 653 { 654 STAM_PROFILE_START(&pVM->iom.s.StatRZMMIOHandler, a);655 654 Log(("iomMmioCommonPfHandler: GCPhysFault=%RGp uErr=%#x rip=%RGv\n", GCPhysFault, uErrorCode, CPUMGetGuestRIP(pVCpu) )); 656 655 RT_NOREF(GCPhysFault, uErrorCode); … … 693 692 } 694 693 #ifndef IN_RING3 695 STAM_PROFILE_STOP(&pVM->iom.s.StatRZMMIOHandler, a);696 694 return rcStrict; 697 695 } 698 else 699 STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIODevLockContention); 696 STAM_COUNTER_INC(&pVM->iom.s.StatMmioDevLockContentionR0); 700 697 } 701 698 else … … 709 706 { 710 707 STAM_COUNTER_INC(&pStats->WriteRZToR3); 711 STAM_COUNTER_INC(&pVM->iom.s.Stat RZMMIOWritesToR3);708 STAM_COUNTER_INC(&pVM->iom.s.StatMmioWritesR0ToR3); 712 709 } 713 710 else 714 711 { 715 712 STAM_COUNTER_INC(&pStats->ReadRZToR3); 716 STAM_COUNTER_INC(&pVM->iom.s.Stat RZMMIOReadsToR3);713 STAM_COUNTER_INC(&pVM->iom.s.StatMmioReadsR0ToR3); 717 714 } 718 715 } … … 721 718 RT_NOREF(pVM, pRegEntry); 722 719 #endif /* IN_RING3 */ 723 724 STAM_PROFILE_STOP(&pVM->iom.s.StatRZMMIOHandler, a);725 720 return rcStrict; 726 721 } … … 736 731 RTGCPTR pvFault, RTGCPHYS GCPhysFault, void *pvUser) 737 732 { 738 STAM_ COUNTER_INC(&pVM->iom.s.StatMmioPfHandlerNew);733 STAM_PROFILE_START(&pVM->iom.s.StatMmioPfHandler, Prf); 739 734 LogFlow(("iomMmioPfHandlerNew: GCPhys=%RGp uErr=%#x pvFault=%RGv rip=%RGv\n", 740 735 GCPhysFault, (uint32_t)uErrorCode, pvFault, (RTGCPTR)pCtxCore->rip)); … … 750 745 # endif 751 746 752 return iomMmioCommonPfHandlerNew(pVM, pVCpu, (uint32_t)uErrorCode, GCPhysFault, pRegEntry); 747 VBOXSTRICTRC rcStrict = iomMmioCommonPfHandlerNew(pVM, pVCpu, (uint32_t)uErrorCode, GCPhysFault, pRegEntry); 748 749 STAM_PROFILE_STOP(&pVM->iom.s.StatMmioPfHandler, Prf); 750 return rcStrict; 753 751 } 754 752 … … 769 767 VMM_INT_DECL(VBOXSTRICTRC) IOMR0MmioPhysHandler(PVMCC pVM, PVMCPUCC pVCpu, uint32_t uErrorCode, RTGCPHYS GCPhysFault) 770 768 { 771 STAM_ COUNTER_INC(&pVM->iom.s.StatMmioPhysHandlerNew);769 STAM_PROFILE_START(&pVM->iom.s.StatMmioPhysHandler, Prf); 772 770 773 771 /* … … 787 785 else if (rcStrict == VERR_SEM_BUSY) 788 786 rcStrict = VINF_IOM_R3_MMIO_READ_WRITE; 787 788 STAM_PROFILE_STOP(&pVM->iom.s.StatMmioPhysHandler, Prf); 789 789 return rcStrict; 790 790 } … … 801 801 { 802 802 STAM_PROFILE_START(UnusedMacroArg, Prf); 803 STAM_COUNTER_INC(&pVM->iom.s.CTX_SUFF(StatMmioHandler New));803 STAM_COUNTER_INC(&pVM->iom.s.CTX_SUFF(StatMmioHandler)); 804 804 Log4(("iomMmioHandlerNew: GCPhysFault=%RGp cbBuf=%#x enmAccessType=%d enmOrigin=%d pvUser=%p\n", GCPhysFault, cbBuf, enmAccessType, enmOrigin, pvUser)); 805 805 … … 867 867 pDevIns, pvUser)); 868 868 STAM_COUNTER_INC(enmAccessType == PGMACCESSTYPE_READ ? &pStats->ReadRZToR3 : &pStats->WriteRZToR3); 869 STAM_COUNTER_INC(enmAccessType == PGMACCESSTYPE_READ ? &pVM->iom.s.Stat RZMMIOReadsToR3 : &pVM->iom.s.StatRZMMIOWritesToR3);869 STAM_COUNTER_INC(enmAccessType == PGMACCESSTYPE_READ ? &pVM->iom.s.StatMmioReadsR0ToR3 : &pVM->iom.s.StatMmioWritesR0ToR3); 870 870 return rcToRing3; 871 871 } … … 887 887 else 888 888 { 889 STAM_REL_COUNTER_INC(&pVM->iom.s.StatM MIOStaleMappings);889 STAM_REL_COUNTER_INC(&pVM->iom.s.StatMmioStaleMappings); 890 890 LogRelMax(64, ("iomMmioHandlerNew: Stale access at %#RGp to range #%#x currently residing at %RGp LB %RGp\n", 891 891 GCPhysFault, pRegEntry->idxSelf, GCPhysMapping, pRegEntry->cbRegion)); … … 896 896 #else 897 897 STAM_COUNTER_INC(enmAccessType == PGMACCESSTYPE_READ ? &pStats->ReadRZToR3 : &pStats->WriteRZToR3); 898 STAM_COUNTER_INC(enmAccessType == PGMACCESSTYPE_READ ? &pVM->iom.s.Stat RZMMIOReadsToR3 : &pVM->iom.s.StatRZMMIOWritesToR3);898 STAM_COUNTER_INC(enmAccessType == PGMACCESSTYPE_READ ? &pVM->iom.s.StatMmioReadsR0ToR3 : &pVM->iom.s.StatMmioWritesR0ToR3); 899 899 return rcToRing3; 900 900 #endif … … 925 925 { 926 926 STAM_COUNTER_INC(&pStats->ReadRZToR3); 927 STAM_COUNTER_INC(&pVM->iom.s.Stat RZMMIOReadsToR3);927 STAM_COUNTER_INC(&pVM->iom.s.StatMmioReadsR0ToR3); 928 928 } 929 929 else … … 945 945 { 946 946 STAM_COUNTER_INC(&pStats->WriteRZToR3); 947 STAM_COUNTER_INC(&pVM->iom.s.Stat RZMMIOWritesToR3);947 STAM_COUNTER_INC(&pVM->iom.s.StatMmioWritesR0ToR3); 948 948 } 949 949 else if (rcStrict == VINF_IOM_R3_MMIO_COMMIT_WRITE) 950 950 { 951 951 STAM_COUNTER_INC(&pStats->CommitRZToR3); 952 STAM_COUNTER_INC(&pVM->iom.s.Stat RZMMIOCommitsToR3);952 STAM_COUNTER_INC(&pVM->iom.s.StatMmioCommitsR0ToR3); 953 953 } 954 954 else … … 991 991 { 992 992 STAM_COUNTER_INC(&pStats->CommitRZToR3); 993 STAM_COUNTER_INC(&pVM->iom.s.Stat RZMMIOCommitsToR3);993 STAM_COUNTER_INC(&pVM->iom.s.StatMmioCommitsR0ToR3); 994 994 } 995 995 else 996 996 { 997 997 STAM_COUNTER_INC(&pStats->WriteRZToR3); 998 STAM_COUNTER_INC(&pVM->iom.s.Stat RZMMIOWritesToR3);999 } 1000 STAM_COUNTER_INC(&pVM->iom.s.Stat RZMMIODevLockContention);998 STAM_COUNTER_INC(&pVM->iom.s.StatMmioWritesR0ToR3); 999 } 1000 STAM_COUNTER_INC(&pVM->iom.s.StatMmioDevLockContentionR0); 1001 1001 } 1002 1002 else if (rcStrict == VINF_IOM_R3_MMIO_READ) … … 1004 1004 Assert(enmAccessType == PGMACCESSTYPE_READ); 1005 1005 STAM_COUNTER_INC(&pStats->ReadRZToR3); 1006 STAM_COUNTER_INC(&pVM->iom.s.Stat RZMMIODevLockContention);1006 STAM_COUNTER_INC(&pVM->iom.s.StatMmioDevLockContentionR0); 1007 1007 } 1008 1008 #endif -
trunk/src/VBox/VMM/VMMR3/IOM.cpp
r82378 r82380 173 173 174 174 /* 175 * Statistics. 176 */ 177 STAM_REG(pVM, &pVM->iom.s.StatIoPortCommits, STAMTYPE_COUNTER, "/IOM/IoPortCommits", STAMUNIT_OCCURENCES, "Number of ring-3 I/O port commits."); 178 STAM_REG(pVM, &pVM->iom.s.StatIoPortIn, STAMTYPE_PROFILE, "/IOM/IoPortIN", STAMUNIT_OCCURENCES, "Number of IN instructions (attempts)"); 179 STAM_REG(pVM, &pVM->iom.s.StatIoPortInS, STAMTYPE_PROFILE, "/IOM/IoPortINS", STAMUNIT_OCCURENCES, "Number of INS instructions (attempts)"); 180 STAM_REG(pVM, &pVM->iom.s.StatIoPortOutS, STAMTYPE_PROFILE, "/IOM/IoPortOUT", STAMUNIT_OCCURENCES, "Number of OUT instructions (attempts)"); 181 STAM_REG(pVM, &pVM->iom.s.StatIoPortOutS, STAMTYPE_PROFILE, "/IOM/IoPortOUTS", STAMUNIT_OCCURENCES, "Number of OUTS instructions (attempts)"); 182 183 STAM_REL_REG(pVM, &pVM->iom.s.StatMMIOStaleMappings, STAMTYPE_PROFILE, "/IOM/MMIOStaleMappings", STAMUNIT_TICKS_PER_CALL, "Number of times iomMmioHandlerNew got a call for a remapped range at the old mapping."); 184 STAM_REG(pVM, &pVM->iom.s.StatRZMMIOHandler, STAMTYPE_PROFILE, "/IOM/RZ-MMIOHandler", STAMUNIT_TICKS_PER_CALL, "Profiling of the iomMmioPfHandler() body, only success calls."); 185 STAM_REG(pVM, &pVM->iom.s.StatRZMMIOReadsToR3, STAMTYPE_COUNTER, "/IOM/RZ-MMIOHandler/ReadsToR3", STAMUNIT_OCCURENCES, "Number of read deferred to ring-3."); 186 STAM_REG(pVM, &pVM->iom.s.StatRZMMIOWritesToR3, STAMTYPE_COUNTER, "/IOM/RZ-MMIOHandler/WritesToR3", STAMUNIT_OCCURENCES, "Number of writes deferred to ring-3."); 187 STAM_REG(pVM, &pVM->iom.s.StatRZMMIOCommitsToR3, STAMTYPE_COUNTER, "/IOM/RZ-MMIOHandler/CommitsToR3", STAMUNIT_OCCURENCES, "Number of commits deferred to ring-3."); 188 STAM_REG(pVM, &pVM->iom.s.StatRZMMIODevLockContention, STAMTYPE_COUNTER, "/IOM/RZ-MMIOHandler/DevLockContention", STAMUNIT_OCCURENCES, "Number of device lock contention force return to ring-3."); 189 STAM_REG(pVM, &pVM->iom.s.StatR3MMIOHandler, STAMTYPE_COUNTER, "/IOM/R3-MMIOHandler", STAMUNIT_OCCURENCES, "Number of calls to iomMmioHandler."); 190 191 STAM_REG(pVM, &pVM->iom.s.StatMmioHandlerR3, STAMTYPE_COUNTER, "/IOM/OldMmioHandlerR3", STAMUNIT_OCCURENCES, "Number of calls to old iomMmioHandler from ring-3."); 192 STAM_REG(pVM, &pVM->iom.s.StatMmioHandlerR0, STAMTYPE_COUNTER, "/IOM/OldMmioHandlerR0", STAMUNIT_OCCURENCES, "Number of calls to old iomMmioHandler from ring-0."); 193 194 STAM_REG(pVM, &pVM->iom.s.StatMmioHandlerNewR3, STAMTYPE_COUNTER, "/IOM/MmioHandlerNewR3", STAMUNIT_OCCURENCES, "Number of calls to iomMmioHandlerNew from ring-3."); 195 STAM_REG(pVM, &pVM->iom.s.StatMmioHandlerNewR0, STAMTYPE_COUNTER, "/IOM/MmioHandlerNewR0", STAMUNIT_OCCURENCES, "Number of calls to iomMmioHandlerNew from ring-0."); 196 STAM_REG(pVM, &pVM->iom.s.StatMmioPfHandlerNew, STAMTYPE_COUNTER, "/IOM/MmioPfHandlerNew", STAMUNIT_OCCURENCES, "Number of calls to iomMmioPfHandlerNew."); 197 STAM_REG(pVM, &pVM->iom.s.StatMmioPhysHandlerNew, STAMTYPE_COUNTER, "/IOM/MmioPhysHandlerNew", STAMUNIT_OCCURENCES, "Number of calls to IOMR0MmioPhysHandler."); 198 STAM_REG(pVM, &pVM->iom.s.StatMmioCommitsDirect, STAMTYPE_COUNTER, "/IOM/MmioCommitsDirect", STAMUNIT_OCCURENCES, "Number of ring-3 MMIO commits direct to handler via handle hint."); 199 STAM_REG(pVM, &pVM->iom.s.StatMmioCommitsPgm, STAMTYPE_COUNTER, "/IOM/MmioCommitsPgm", STAMUNIT_OCCURENCES, "Number of ring-3 MMIO commits via PGM."); 175 * Statistics (names are somewhat contorted to make the registration 176 * sub-trees appear at the end of each group). 177 */ 178 STAM_REG(pVM, &pVM->iom.s.StatIoPortCommits, STAMTYPE_COUNTER, "/IOM/IoPortCommits", STAMUNIT_OCCURENCES, "Number of ring-3 I/O port commits."); 179 STAM_REG(pVM, &pVM->iom.s.StatIoPortIn, STAMTYPE_PROFILE, "/IOM/IoPortIN", STAMUNIT_OCCURENCES, "Number of IN instructions (attempts)"); 180 STAM_REG(pVM, &pVM->iom.s.StatIoPortInS, STAMTYPE_PROFILE, "/IOM/IoPortINS", STAMUNIT_OCCURENCES, "Number of INS instructions (attempts)"); 181 STAM_REG(pVM, &pVM->iom.s.StatIoPortOutS, STAMTYPE_PROFILE, "/IOM/IoPortOUT", STAMUNIT_OCCURENCES, "Number of OUT instructions (attempts)"); 182 STAM_REG(pVM, &pVM->iom.s.StatIoPortOutS, STAMTYPE_PROFILE, "/IOM/IoPortOUTS", STAMUNIT_OCCURENCES, "Number of OUTS instructions (attempts)"); 183 184 STAM_REG(pVM, &pVM->iom.s.StatMmioHandlerR3, STAMTYPE_COUNTER, "/IOM/MmioHandlerR3", STAMUNIT_OCCURENCES, "Number of calls to iomMmioHandlerNew from ring-3."); 185 STAM_REG(pVM, &pVM->iom.s.StatMmioHandlerR0, STAMTYPE_COUNTER, "/IOM/MmioHandlerR0", STAMUNIT_OCCURENCES, "Number of calls to iomMmioHandlerNew from ring-0."); 186 STAM_REG(pVM, &pVM->iom.s.StatMmioReadsR0ToR3, STAMTYPE_COUNTER, "/IOM/MmioR0ToR3Reads", STAMUNIT_OCCURENCES, "Number of reads deferred to ring-3."); 187 STAM_REG(pVM, &pVM->iom.s.StatMmioWritesR0ToR3, STAMTYPE_COUNTER, "/IOM/MmioR0ToR3Writes", STAMUNIT_OCCURENCES, "Number of writes deferred to ring-3."); 188 STAM_REG(pVM, &pVM->iom.s.StatMmioCommitsR0ToR3,STAMTYPE_COUNTER, "/IOM/MmioR0ToR3Commits", STAMUNIT_OCCURENCES, "Number of commits deferred to ring-3."); 189 STAM_REG(pVM, &pVM->iom.s.StatMmioPfHandler, STAMTYPE_PROFILE, "/IOM/MmioPfHandler", STAMUNIT_OCCURENCES, "Number of calls to iomMmioPfHandlerNew."); 190 STAM_REG(pVM, &pVM->iom.s.StatMmioPhysHandler, STAMTYPE_PROFILE, "/IOM/MmioPhysHandler", STAMUNIT_OCCURENCES, "Number of calls to IOMR0MmioPhysHandler."); 191 STAM_REG(pVM, &pVM->iom.s.StatMmioCommitsDirect,STAMTYPE_COUNTER, "/IOM/MmioCommitsDirect", STAMUNIT_OCCURENCES, "Number of ring-3 MMIO commits direct to handler via handle hint."); 192 STAM_REG(pVM, &pVM->iom.s.StatMmioCommitsPgm, STAMTYPE_COUNTER, "/IOM/MmioCommitsPgm", STAMUNIT_OCCURENCES, "Number of ring-3 MMIO commits via PGM."); 193 STAM_REL_REG(pVM, &pVM->iom.s.StatMmioStaleMappings, STAMTYPE_PROFILE, "/IOM/MmioMappingsStale", STAMUNIT_TICKS_PER_CALL, "Number of times iomMmioHandlerNew got a call for a remapped range at the old mapping."); 194 STAM_REG(pVM, &pVM->iom.s.StatMmioDevLockContentionR0, STAMTYPE_COUNTER, "/IOM/MmioDevLockContentionR0", STAMUNIT_OCCURENCES, "Number of device lock contention force return to ring-3."); 200 195 201 196 LogFlow(("IOMR3Init: returns VINF_SUCCESS\n")); -
trunk/src/VBox/VMM/VMMR3/IOMR3Mmio.cpp
r82313 r82380 52 52 /* Format the prefix: */ 53 53 char szName[80]; 54 size_t cchPrefix = RTStrPrintf(szName, sizeof(szName), "/IOM/ NewMmio/%RGp-%RGp",54 size_t cchPrefix = RTStrPrintf(szName, sizeof(szName), "/IOM/MmioRegions/%RGp-%RGp", 55 55 pRegEntry->GCPhysMapping, pRegEntry->GCPhysMapping + pRegEntry->cbRegion - 1); 56 56 … … 106 106 { 107 107 char szPrefix[80]; 108 RTStrPrintf(szPrefix, sizeof(szPrefix), "/IOM/ NewMmio/%RGp-%RGp", GCPhys, GCPhys + pRegEntry->cbRegion - 1);108 RTStrPrintf(szPrefix, sizeof(szPrefix), "/IOM/MmioRegions/%RGp-%RGp", GCPhys, GCPhys + pRegEntry->cbRegion - 1); 109 109 STAMR3DeregisterByPrefix(pVM->pUVM, szPrefix); 110 110 } -
trunk/src/VBox/VMM/include/IOMInternal.h
r82378 r82380 456 456 STAMCOUNTER StatIoPortInS; 457 457 STAMCOUNTER StatIoPortOutS; 458 STAMCOUNTER StatIoPortCommits; 458 459 /** @} */ 459 460 460 461 /** @name MMIO statistics. 461 462 * @{ */ 462 STAMCOUNTER StatIoPortCommits; 463 464 STAMCOUNTER StatMMIOStaleMappings; 465 STAMPROFILE StatRZMMIOHandler; 466 STAMCOUNTER StatRZMMIOReadsToR3; 467 STAMCOUNTER StatRZMMIOWritesToR3; 468 STAMCOUNTER StatRZMMIOCommitsToR3; 469 STAMCOUNTER StatRZMMIODevLockContention; 470 471 STAMCOUNTER StatMmioPfHandlerNew; 472 STAMCOUNTER StatMmioPhysHandlerNew; 473 STAMCOUNTER StatMmioHandlerNewR3; 474 STAMCOUNTER StatMmioHandlerNewR0; 463 STAMPROFILE StatMmioPfHandler; 464 STAMPROFILE StatMmioPhysHandler; 465 STAMCOUNTER StatMmioHandlerR3; 466 STAMCOUNTER StatMmioHandlerR0; 467 STAMCOUNTER StatMmioReadsR0ToR3; 468 STAMCOUNTER StatMmioWritesR0ToR3; 469 STAMCOUNTER StatMmioCommitsR0ToR3; 475 470 STAMCOUNTER StatMmioCommitsDirect; 476 471 STAMCOUNTER StatMmioCommitsPgm; 477 478 STAMCOUNTER StatR3MMIOHandler; 479 480 STAMCOUNTER StatMmioHandlerR3; 481 STAMCOUNTER StatMmioHandlerR0; 482 483 RTUINT cMovsMaxBytes; 484 RTUINT cStosMaxBytes; 472 STAMCOUNTER StatMmioStaleMappings; 473 STAMCOUNTER StatMmioDevLockContentionR0; 485 474 /** @} */ 486 475 } IOM;
Note:
See TracChangeset
for help on using the changeset viewer.