Changeset 80166 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Aug 6, 2019 8:35:25 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PGMHandler.cpp
r80165 r80166 60 60 static DECLCALLBACK(int) pgmR3HandlerPhysicalOneSet(PAVLROGCPHYSNODECORE pNode, void *pvUser); 61 61 static DECLCALLBACK(int) pgmR3InfoHandlersPhysicalOne(PAVLROGCPHYSNODECORE pNode, void *pvUser); 62 #ifdef VBOX_WITH_RAW_MODE63 static DECLCALLBACK(int) pgmR3InfoHandlersVirtualOne(PAVLROGCPTRNODECORE pNode, void *pvUser);64 #endif65 62 66 63 … … 358 355 { 359 356 /* 360 * Test input.357 * Parse options. 361 358 */ 362 359 PGMHANDLERINFOARG Args = { pHlp, pVM, /* .fStats = */ true }; 363 bool fPhysical = !pszArgs || !*pszArgs; 364 bool fVirtual = fPhysical; 365 bool fHyper = fPhysical; 366 if (!fPhysical) 367 { 368 bool fAll = strstr(pszArgs, "all") != NULL; 369 fPhysical = fAll || strstr(pszArgs, "phys") != NULL; 370 fVirtual = fAll || strstr(pszArgs, "virt") != NULL; 371 fHyper = fAll || strstr(pszArgs, "hyper")!= NULL; 372 Args.fStats = strstr(pszArgs, "nost") == NULL; 373 } 360 Args.fStats = strstr(pszArgs, "nost") == NULL; 374 361 375 362 /* 376 363 * Dump the handlers. 377 364 */ 378 if (fPhysical) 379 { 380 pHlp->pfnPrintf(pHlp, 381 "Physical handlers: (PhysHandlers=%d (%#x))\n" 382 "%*s %*s %*s %*s HandlerGC UserGC Type Description\n", 383 pVM->pgm.s.pTreesR3->PhysHandlers, pVM->pgm.s.pTreesR3->PhysHandlers, 384 - (int)sizeof(RTGCPHYS) * 2, "From", 385 - (int)sizeof(RTGCPHYS) * 2 - 3, "- To (incl)", 386 - (int)sizeof(RTHCPTR) * 2 - 1, "HandlerHC", 387 - (int)sizeof(RTHCPTR) * 2 - 1, "UserHC"); 388 RTAvlroGCPhysDoWithAll(&pVM->pgm.s.pTreesR3->PhysHandlers, true, pgmR3InfoHandlersPhysicalOne, &Args); 389 } 390 391 #ifdef VBOX_WITH_RAW_MODE 392 if (fVirtual) 393 { 394 pHlp->pfnPrintf(pHlp, 395 "Virtual handlers:\n" 396 "%*s %*s %*s %*s Type Description\n", 397 - (int)sizeof(RTGCPTR) * 2, "From", 398 - (int)sizeof(RTGCPTR) * 2 - 3, "- To (excl)", 399 - (int)sizeof(RTHCPTR) * 2 - 1, "HandlerHC", 400 - (int)sizeof(RTRCPTR) * 2 - 1, "HandlerGC"); 401 RTAvlroGCPtrDoWithAll(&pVM->pgm.s.pTreesR3->VirtHandlers, true, pgmR3InfoHandlersVirtualOne, &Args); 402 } 403 404 if (fHyper) 405 { 406 pHlp->pfnPrintf(pHlp, 407 "Hypervisor Virtual handlers:\n" 408 "%*s %*s %*s %*s Type Description\n", 409 - (int)sizeof(RTGCPTR) * 2, "From", 410 - (int)sizeof(RTGCPTR) * 2 - 3, "- To (excl)", 411 - (int)sizeof(RTHCPTR) * 2 - 1, "HandlerHC", 412 - (int)sizeof(RTRCPTR) * 2 - 1, "HandlerGC"); 413 RTAvlroGCPtrDoWithAll(&pVM->pgm.s.pTreesR3->HyperVirtHandlers, true, pgmR3InfoHandlersVirtualOne, &Args); 414 } 415 #endif 365 pHlp->pfnPrintf(pHlp, 366 "Physical handlers: (PhysHandlers=%d (%#x))\n" 367 "%*s %*s %*s %*s HandlerGC UserGC Type Description\n", 368 pVM->pgm.s.pTreesR3->PhysHandlers, pVM->pgm.s.pTreesR3->PhysHandlers, 369 - (int)sizeof(RTGCPHYS) * 2, "From", 370 - (int)sizeof(RTGCPHYS) * 2 - 3, "- To (incl)", 371 - (int)sizeof(RTHCPTR) * 2 - 1, "HandlerHC", 372 - (int)sizeof(RTHCPTR) * 2 - 1, "UserHC"); 373 RTAvlroGCPhysDoWithAll(&pVM->pgm.s.pTreesR3->PhysHandlers, true, pgmR3InfoHandlersPhysicalOne, &Args); 416 374 } 417 375 … … 451 409 } 452 410 453 454 #ifdef VBOX_WITH_RAW_MODE455 /**456 * Displays one virtual handler range.457 *458 * @returns 0459 * @param pNode Pointer to a PGMVIRTHANDLER.460 * @param pvUser Pointer to command helper functions.461 */462 static DECLCALLBACK(int) pgmR3InfoHandlersVirtualOne(PAVLROGCPTRNODECORE pNode, void *pvUser)463 {464 PPGMVIRTHANDLER pCur = (PPGMVIRTHANDLER)pNode;465 PPGMHANDLERINFOARG pArgs = (PPGMHANDLERINFOARG)pvUser;466 PCDBGFINFOHLP pHlp = pArgs->pHlp;467 PPGMVIRTHANDLERTYPEINT pCurType = PGMVIRTANDLER_GET_TYPE(pArgs->pVM, pCur);468 const char *pszType;469 switch (pCurType->enmKind)470 {471 case PGMVIRTHANDLERKIND_WRITE: pszType = "Write "; break;472 case PGMVIRTHANDLERKIND_ALL: pszType = "All "; break;473 case PGMVIRTHANDLERKIND_HYPERVISOR: pszType = "WriteHyp "; break;474 default: pszType = "????"; break;475 }476 pHlp->pfnPrintf(pHlp, "%RGv - %RGv %RHv %RRv %s %s\n",477 pCur->Core.Key, pCur->Core.KeyLast, pCurType->pfnHandlerR3, pCurType->pfnPfHandlerRC, pszType, pCur->pszDesc);478 # ifdef VBOX_WITH_STATISTICS479 if (pArgs->fStats)480 pHlp->pfnPrintf(pHlp, " cPeriods: %9RU64 cTicks: %11RU64 Min: %11RU64 Avg: %11RU64 Max: %11RU64\n",481 pCur->Stat.cPeriods, pCur->Stat.cTicks, pCur->Stat.cTicksMin,482 pCur->Stat.cPeriods ? pCur->Stat.cTicks / pCur->Stat.cPeriods : 0, pCur->Stat.cTicksMax);483 # endif484 return 0;485 }486 #endif /* VBOX_WITH_RAW_MODE */487
Note:
See TracChangeset
for help on using the changeset viewer.