- Timestamp:
- Feb 11, 2008 11:17:43 PM (17 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGM.cpp
r6913 r6914 941 941 DBGFR3InfoRegisterInternal(pVM, "handlers", 942 942 "Dumps physical, virtual and hyper virtual handlers. " 943 "Pass 'phys', 'virt', 'hyper' as argument if only one kind is wanted. 944 "Add 'nost' if the statistics are unwanted .",943 "Pass 'phys', 'virt', 'hyper' as argument if only one kind is wanted." 944 "Add 'nost' if the statistics are unwanted, use together with 'all' or explicit selection.", 945 945 pgmR3InfoHandlers); 946 DBGFR3InfoRegisterInternal(pVM, "mappings", 947 "Dumps guest mappings.", 948 pgmR3MapInfo); 946 949 947 950 STAM_REL_REG(pVM, &pVM->pgm.s.cGuestModeChanges, STAMTYPE_COUNTER, "/PGM/cGuestModeChanges", STAMUNIT_OCCURENCES, "Number of guest mode changes."); … … 1692 1695 AssertRC(rc); 1693 1696 #ifdef DEBUG 1694 PGMR3DumpMappings(pVM); 1697 DBGFR3InfoLog(pVM, "mappings", NULL); 1698 DBGFR3InfoLog(pVM, "handlers", "all nostat"); 1695 1699 #endif 1696 1700 -
trunk/src/VBox/VMM/PGMHandler.cpp
r6913 r6914 515 515 * Test input. 516 516 */ 517 PGMHANDLERINFOARG Args = { pHlp, true };517 PGMHANDLERINFOARG Args = { pHlp, /* .fStats = */ true }; 518 518 bool fPhysical = !pszArgs || !*pszArgs; 519 519 bool fVirtual = fPhysical; … … 521 521 if (!fPhysical) 522 522 { 523 fPhysical = strstr(pszArgs, "phys") != NULL; 524 fVirtual = strstr(pszArgs, "virt") != NULL; 525 fHyper = strstr(pszArgs, "hyper") != NULL; 523 bool fAll = strstr(pszArgs, "all") != NULL; 524 fPhysical = fAll || strstr(pszArgs, "phys") != NULL; 525 fVirtual = fAll || strstr(pszArgs, "virt") != NULL; 526 fHyper = fAll || strstr(pszArgs, "hyper")!= NULL; 526 527 Args.fStats = strstr(pszArgs, "nost") == NULL; 527 528 } -
trunk/src/VBox/VMM/PGMInternal.h
r6913 r6914 2468 2468 __BEGIN_DECLS 2469 2469 2470 int pgmLock(PVM pVM); 2471 void pgmUnlock(PVM pVM); 2472 2470 2473 PGMGCDECL(int) pgmGCGuestPDWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, void *pvFault, RTGCPHYS GCPhysFault, void *pvUser); 2471 2474 PGMDECL(int) pgmPhysRomWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, void *pvFault, RTGCPHYS GCPhysFault, void *pvUser); 2475 int pgmR3ChangeMode(PVM pVM, PGMMODE enmGuestMode); 2476 2472 2477 int pgmR3SyncPTResolveConflict(PVM pVM, PPGMMAPPING pMapping, PVBOXPD pPDSrc, int iPDOld); 2473 2478 PPGMMAPPING pgmGetMapping(PVM pVM, RTGCPTR GCPtr); 2474 2479 void pgmR3MapRelocate(PVM pVM, PPGMMAPPING pMapping, int iPDOld, int iPDNew); 2475 int pgmR3ChangeMode(PVM pVM, PGMMODE enmGuestMode); 2476 int pgmLock(PVM pVM); 2477 void pgmUnlock(PVM pVM); 2480 DECLCALLBACK(void) pgmR3MapInfo(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs); 2478 2481 2479 2482 void pgmR3HandlerPhysicalUpdateAll(PVM pVM); -
trunk/src/VBox/VMM/PGMMap.cpp
r6913 r6914 38 38 static void pgmR3MapClearPDEs(PPGM pPGM, PPGMMAPPING pMap, int iOldPDE); 39 39 static void pgmR3MapSetPDEs(PVM pVM, PPGMMAPPING pMap, int iNewPDE); 40 static DECLCALLBACK(int) pgmR3DumpMappingsPhysicalCB(PAVLROGCPHYSNODECORE pNode, void *pvUser);41 40 static int pgmR3MapIntermediateCheckOne(PVM pVM, uintptr_t uAddress, unsigned cPages, PX86PT pPTDefault, PX86PTPAE pPTPaeDefault); 42 41 static void pgmR3MapIntermediateDoOne(PVM pVM, uintptr_t uAddress, RTHCPHYS HCPhys, unsigned cPages, PX86PT pPTDefault, PX86PTPAE pPTPaeDefault); … … 1078 1077 1079 1078 /** 1080 * Dumps one virtual handler range. 1081 * 1082 * @returns 0 1083 * @param pNode Pointer to a PGMVIRTHANDLER. 1084 * @param pvUser Pointer to command helper functions. 1085 */ 1086 static DECLCALLBACK(int) pgmVirtHandlerDump(PAVLROGCPTRNODECORE pNode, void *pvUser) 1087 { 1088 PPGMVIRTHANDLER pCur = (PPGMVIRTHANDLER)pNode; 1089 1090 switch (pCur->enmType) 1091 { 1092 case PGMVIRTHANDLERTYPE_WRITE: 1093 RTLogPrintf("WRITE %RGv-%RGv size %RGv %s\n", pCur->GCPtr, pCur->GCPtrLast, pCur->cb, pCur->pszDesc); 1094 break; 1095 case PGMVIRTHANDLERTYPE_ALL: 1096 RTLogPrintf("ALL %RGv-%RGv size %RGv %s\n", pCur->GCPtr, pCur->GCPtrLast, pCur->cb, pCur->pszDesc); 1097 break; 1098 case PGMVIRTHANDLERTYPE_HYPERVISOR: 1099 RTLogPrintf("WRITEHYP %RGv-%RGv size %RGv %s\n", pCur->GCPtr, pCur->GCPtrLast, pCur->cb, pCur->pszDesc); 1100 break; 1101 } 1102 if (pCur->enmType != PGMVIRTHANDLERTYPE_HYPERVISOR) 1103 for (unsigned i = 0; i < pCur->cPages; i++) 1104 RTLogPrintf("Physical page %#05d %VGp\n", i, pCur->aPhysToVirt[i].Core.Key); 1105 return 0; 1106 } 1107 1108 /** 1109 * Dumps the current mappings to the log 1110 * 1111 * @returns VBox status. 1112 * @param pVM Pointer to the current VM (if any). 1113 * 1114 */ 1115 PGMR3DECL(void) PGMR3DumpMappings(PVM pVM) 1116 { 1117 /* 1118 * Print message about the fixedness of the mappings and dump them. 1119 */ 1120 RTLogPrintf(pVM->pgm.s.fMappingsFixed ? "\nThe mappings are FIXED.\n" : "\nThe mappings are FLOATING.\n"); 1121 1079 * Info callback for 'pgmhandlers'. 1080 * 1081 * @param pHlp The output helpers. 1082 * @param pszArgs The arguments. phys or virt. 1083 */ 1084 DECLCALLBACK(void) pgmR3MapInfo(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs) 1085 { 1086 pHlp->pfnPrintf(pHlp, pVM->pgm.s.fMappingsFixed 1087 ? "\nThe mappings are FIXED.\n" 1088 : "\nThe mappings are FLOATING.\n"); 1122 1089 PPGMMAPPING pCur; 1123 1090 for (pCur = pVM->pgm.s.pMappingsR3; pCur; pCur = pCur->pNextR3) 1124 RTLogPrintf("%VGv - %VGv %s\n", pCur->GCPtr, pCur->GCPtrLast, pCur->pszDesc); 1125 1126 /** @todo The handler stuff is totally alien here. This should be converted into a 'info' function. 1127 * There are now, just kill this. */ 1128 RTLogPrintf("\nVirtual handlers:\n"); 1129 RTAvlroGCPtrDoWithAll(&pVM->pgm.s.pTreesHC->VirtHandlers, true, pgmVirtHandlerDump, pVM); 1130 1131 RTLogPrintf("\n" 1132 "Physical handlers: (PhysHandlers=%d (%#x))\n" 1133 "From - To (incl) HandlerHC UserHC HandlerHC UserHC HandlerGC UserGC Type Description\n", 1134 pVM->pgm.s.pTreesHC->PhysHandlers, pVM->pgm.s.pTreesHC->PhysHandlers); 1135 RTAvlroGCPhysDoWithAll(&pVM->pgm.s.pTreesHC->PhysHandlers, true, pgmR3DumpMappingsPhysicalCB, NULL); 1136 } 1137 1138 1139 /** 1140 * Dumps one physical handler range. 1141 * 1142 * @returns 0 1143 * @param pNode Pointer to a PGMPHYSHANDLER. 1144 * @param pvUser Ignored. 1145 */ 1146 static DECLCALLBACK(int) pgmR3DumpMappingsPhysicalCB(PAVLROGCPHYSNODECORE pNode, void *pvUser) 1147 { 1148 PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)pNode; NOREF(pvUser); 1149 const char *pszType; 1150 switch (pCur->enmType) 1151 { 1152 case PGMPHYSHANDLERTYPE_MMIO: pszType = "MMIO "; break; 1153 case PGMPHYSHANDLERTYPE_PHYSICAL_WRITE: pszType = "Write "; break; 1154 case PGMPHYSHANDLERTYPE_PHYSICAL_ALL: pszType = "All "; break; 1155 default: pszType = "????"; break; 1156 } 1157 RTLogPrintf("%VGp - %VGp %VHv %VHv %VHv %VHv %VGv %VGv %s %s\n", 1158 pCur->Core.Key, pCur->Core.KeyLast, pCur->pfnHandlerR3, pCur->pvUserR3, pCur->pfnHandlerR0, pCur->pvUserR0, 1159 pCur->pfnHandlerGC, pCur->pvUserGC, pszType, pCur->pszDesc); 1160 return 0; 1161 } 1162 1091 pHlp->pfnPrintf(pHlp, "%VGv - %VGv %s\n", pCur->GCPtr, pCur->GCPtrLast, pCur->pszDesc); 1092 } 1093 -
trunk/src/VBox/VMM/VMM.cpp
r6528 r6914 2596 2596 2597 2597 /* 2598 * Dump useful state information.2599 */2600 /** @todo convert these dumpers to DBGFR3Info() handlers!!! */2601 pHlp->pfnPrintf(pHlp,2602 "!!\n"2603 "!! PGM Access Handlers & Stuff:\n"2604 "!!\n");2605 PGMR3DumpMappings(pVM);2606 2607 2608 /*2609 2598 * Generic info dumper loop. 2610 2599 */ … … 2615 2604 } const aInfo[] = 2616 2605 { 2606 { "mappings", NULL }, 2617 2607 { "hma", NULL }, 2618 2608 { "cpumguest", "verbose" }, … … 2630 2620 { "timers", NULL }, 2631 2621 { "activetimers", NULL }, 2632 { "handlers", "phys virt stats" },2622 { "handlers", "phys virt hyper stats" }, 2633 2623 { "cfgm", NULL }, 2634 2624 };
Note:
See TracChangeset
for help on using the changeset viewer.