- Timestamp:
- Feb 11, 2009 10:00:43 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r16644 r16654 63 63 #ifndef IN_RING3 64 64 DECLEXPORT(int) pgmPoolAccessHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPHYS GCPhysFault, void *pvUser); 65 #endif 66 #ifdef LOG_ENABLED 67 static char *pgmPoolPoolKindToStr(uint8_t enmKind); 65 68 #endif 66 69 __END_DECLS … … 1508 1511 } 1509 1512 1510 Log3(("pgmPoolCacheAlloc: Missed GCPhys=%RGp enmKind=% d\n", GCPhys, enmKind));1513 Log3(("pgmPoolCacheAlloc: Missed GCPhys=%RGp enmKind=%s\n", GCPhys, pgmPoolPoolKindToStr(enmKind))); 1511 1514 STAM_COUNTER_INC(&pPool->StatCacheMisses); 1512 1515 return VERR_FILE_NOT_FOUND; … … 1531 1534 pPage->fCached = true; 1532 1535 pgmPoolHashInsert(pPool, pPage); 1533 Log3(("pgmPoolCacheInsert: Caching %p:{.Core=%RHp, .idx=%d, .enmKind=% d, GCPhys=%RGp}\n",1534 pPage, pPage->Core.Key, pPage->idx, p Page->enmKind, pPage->GCPhys));1536 Log3(("pgmPoolCacheInsert: Caching %p:{.Core=%RHp, .idx=%d, .enmKind=%s, GCPhys=%RGp}\n", 1537 pPage, pPage->Core.Key, pPage->idx, pgmPoolPoolKindToStr(pPage->enmKind), pPage->GCPhys)); 1535 1538 STAM_COUNTER_INC(&pPool->StatCacheCacheable); 1536 1539 } 1537 1540 else 1538 1541 { 1539 Log3(("pgmPoolCacheInsert: Not caching %p:{.Core=%RHp, .idx=%d, .enmKind=% d, GCPhys=%RGp}\n",1540 pPage, pPage->Core.Key, pPage->idx, p Page->enmKind, pPage->GCPhys));1542 Log3(("pgmPoolCacheInsert: Not caching %p:{.Core=%RHp, .idx=%d, .enmKind=%s, GCPhys=%RGp}\n", 1543 pPage, pPage->Core.Key, pPage->idx, pgmPoolPoolKindToStr(pPage->enmKind), pPage->GCPhys)); 1541 1544 STAM_COUNTER_INC(&pPool->StatCacheUncacheable); 1542 1545 } … … 4154 4157 int rc = VINF_SUCCESS; 4155 4158 STAM_PROFILE_START(&pPool->StatFlushPage, f); 4156 LogFlow(("pgmPoolFlushPage: pPage=%p:{.Key=%RHp, .idx=%d, .enmKind=% d, .GCPhys=%RGp}\n",4157 pPage, pPage->Core.Key, pPage->idx, p Page->enmKind, pPage->GCPhys));4159 LogFlow(("pgmPoolFlushPage: pPage=%p:{.Key=%RHp, .idx=%d, .enmKind=%s, .GCPhys=%RGp}\n", 4160 pPage, pPage->Core.Key, pPage->idx, pgmPoolPoolKindToStr(pPage->enmKind), pPage->GCPhys)); 4158 4161 4159 4162 /* … … 4162 4165 if (pPage->idx < PGMPOOL_IDX_FIRST) 4163 4166 { 4164 Log(("pgmPoolFlushPage: special root page, rejected. enmKind=% d idx=%d\n", pPage->enmKind, pPage->idx));4167 Log(("pgmPoolFlushPage: special root page, rejected. enmKind=%s idx=%d\n", pgmPoolPoolKindToStr(pPage->enmKind), pPage->idx)); 4165 4168 return VINF_SUCCESS; 4166 4169 } … … 4175 4178 ("Can't free the shadow CR3! (%RHp vs %RHp kind=%d\n", PGMGetHyperCR3(pPool->CTX_SUFF(pVM)), pPage->Core.Key, pPage->enmKind)); 4176 4179 #endif 4177 Log(("pgmPoolFlushPage: current active shadow CR3, rejected. enmKind=% d idx=%d\n", pPage->enmKind, pPage->idx));4180 Log(("pgmPoolFlushPage: current active shadow CR3, rejected. enmKind=%s idx=%d\n", pgmPoolPoolKindToStr(pPage->enmKind), pPage->idx)); 4178 4181 return VINF_SUCCESS; 4179 4182 } … … 4250 4253 { 4251 4254 STAM_PROFILE_START(&pPool->StatFree, a); 4252 LogFlow(("pgmPoolFreeByPage: pPage=%p:{.Key=%RHp, .idx=%d, enmKind=% d} iUser=%#x iUserTable=%#x\n",4253 pPage, pPage->Core.Key, pPage->idx, p Page->enmKind, iUser, iUserTable));4255 LogFlow(("pgmPoolFreeByPage: pPage=%p:{.Key=%RHp, .idx=%d, enmKind=%s} iUser=%#x iUserTable=%#x\n", 4256 pPage, pPage->Core.Key, pPage->idx, pgmPoolPoolKindToStr(pPage->enmKind), iUser, iUserTable)); 4254 4257 Assert(pPage->idx >= PGMPOOL_IDX_FIRST); 4255 4258 #ifdef PGMPOOL_WITH_USER_TRACKING … … 4339 4342 PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool); 4340 4343 STAM_PROFILE_ADV_START(&pPool->StatAlloc, a); 4341 LogFlow(("pgmPoolAlloc: GCPhys=%RGp enmKind=% d iUser=%#x iUserTable=%#x\n", GCPhys, enmKind, iUser, iUserTable));4344 LogFlow(("pgmPoolAlloc: GCPhys=%RGp enmKind=%s iUser=%#x iUserTable=%#x\n", GCPhys, pgmPoolPoolKindToStr(enmKind), iUser, iUserTable)); 4342 4345 *ppPage = NULL; 4343 4346 /** @todo CSAM/PGMPrefetchPage messes up here during CSAMR3CheckGates … … 4481 4484 PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool); 4482 4485 PPGMPOOLPAGE pPage = pgmPoolGetPage(pPool, HCPhys); 4483 Log3(("pgmPoolGetPageByHCPhys: HCPhys=%RHp -> %p:{.idx=%d .GCPhys=%RGp .enmKind=% d}\n",4484 HCPhys, pPage, pPage->idx, pPage->GCPhys, p Page->enmKind));4486 Log3(("pgmPoolGetPageByHCPhys: HCPhys=%RHp -> %p:{.idx=%d .GCPhys=%RGp .enmKind=%s}\n", 4487 HCPhys, pPage, pPage->idx, pPage->GCPhys, pgmPoolPoolKindToStr(pPage->enmKind))); 4485 4488 return pPage; 4486 4489 } … … 4501 4504 } 4502 4505 4506 #ifdef LOG_ENABLED 4507 static char *pgmPoolPoolKindToStr(uint8_t enmKind) 4508 { 4509 switch(enmKind) 4510 { 4511 case PGMPOOLKIND_INVALID: 4512 return "PGMPOOLKIND_INVALID"; 4513 case PGMPOOLKIND_FREE: 4514 return "PGMPOOLKIND_FREE"; 4515 case PGMPOOLKIND_32BIT_PT_FOR_PHYS: 4516 return "PGMPOOLKIND_32BIT_PT_FOR_PHYS"; 4517 case PGMPOOLKIND_32BIT_PT_FOR_32BIT_PT: 4518 return "PGMPOOLKIND_32BIT_PT_FOR_32BIT_PT"; 4519 case PGMPOOLKIND_32BIT_PT_FOR_32BIT_4MB: 4520 return "PGMPOOLKIND_32BIT_PT_FOR_32BIT_4MB"; 4521 case PGMPOOLKIND_PAE_PT_FOR_PHYS: 4522 return "PGMPOOLKIND_PAE_PT_FOR_PHYS"; 4523 case PGMPOOLKIND_PAE_PT_FOR_32BIT_PT: 4524 return "PGMPOOLKIND_PAE_PT_FOR_32BIT_PT"; 4525 case PGMPOOLKIND_PAE_PT_FOR_32BIT_4MB: 4526 return "PGMPOOLKIND_PAE_PT_FOR_32BIT_4MB"; 4527 case PGMPOOLKIND_PAE_PT_FOR_PAE_PT: 4528 return "PGMPOOLKIND_PAE_PT_FOR_PAE_PT"; 4529 case PGMPOOLKIND_PAE_PT_FOR_PAE_2MB: 4530 return "PGMPOOLKIND_PAE_PT_FOR_PAE_2MB"; 4531 case PGMPOOLKIND_32BIT_PD: 4532 return "PGMPOOLKIND_32BIT_PD"; 4533 case PGMPOOLKIND_32BIT_PD_PHYS: 4534 return "PGMPOOLKIND_32BIT_PD_PHYS"; 4535 case PGMPOOLKIND_PAE_PD0_FOR_32BIT_PD: 4536 return "PGMPOOLKIND_PAE_PD0_FOR_32BIT_PD"; 4537 case PGMPOOLKIND_PAE_PD1_FOR_32BIT_PD: 4538 return "PGMPOOLKIND_PAE_PD1_FOR_32BIT_PD"; 4539 case PGMPOOLKIND_PAE_PD2_FOR_32BIT_PD: 4540 return "PGMPOOLKIND_PAE_PD2_FOR_32BIT_PD"; 4541 case PGMPOOLKIND_PAE_PD3_FOR_32BIT_PD: 4542 return "PGMPOOLKIND_PAE_PD3_FOR_32BIT_PD"; 4543 case PGMPOOLKIND_PAE_PD_FOR_PAE_PD: 4544 return "PGMPOOLKIND_PAE_PD_FOR_PAE_PD"; 4545 case PGMPOOLKIND_PAE_PD_PHYS: 4546 return "PGMPOOLKIND_PAE_PD_PHYS"; 4547 case PGMPOOLKIND_PAE_PDPT_FOR_32BIT: 4548 return "PGMPOOLKIND_PAE_PDPT_FOR_32BIT"; 4549 case PGMPOOLKIND_PAE_PDPT: 4550 return "PGMPOOLKIND_PAE_PDPT"; 4551 case PGMPOOLKIND_PAE_PDPT_PHYS: 4552 return "PGMPOOLKIND_PAE_PDPT_PHYS"; 4553 case PGMPOOLKIND_64BIT_PDPT_FOR_64BIT_PDPT: 4554 return "PGMPOOLKIND_64BIT_PDPT_FOR_64BIT_PDPT"; 4555 case PGMPOOLKIND_64BIT_PDPT_FOR_PHYS: 4556 return "PGMPOOLKIND_64BIT_PDPT_FOR_PHYS"; 4557 case PGMPOOLKIND_64BIT_PD_FOR_64BIT_PD: 4558 return "PGMPOOLKIND_64BIT_PD_FOR_64BIT_PD"; 4559 case PGMPOOLKIND_64BIT_PD_FOR_PHYS: 4560 return "PGMPOOLKIND_64BIT_PD_FOR_PHYS"; 4561 case PGMPOOLKIND_64BIT_PML4: 4562 return "PGMPOOLKIND_64BIT_PML4"; 4563 case PGMPOOLKIND_EPT_PDPT_FOR_PHYS: 4564 return "PGMPOOLKIND_EPT_PDPT_FOR_PHYS"; 4565 case PGMPOOLKIND_EPT_PD_FOR_PHYS: 4566 return "PGMPOOLKIND_EPT_PD_FOR_PHYS"; 4567 case PGMPOOLKIND_EPT_PT_FOR_PHYS: 4568 return "PGMPOOLKIND_EPT_PT_FOR_PHYS"; 4569 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY 4570 case PGMPOOLKIND_ROOT_32BIT_PD: 4571 return "PGMPOOLKIND_ROOT_32BIT_PD"; 4572 case PGMPOOLKIND_ROOT_PAE_PD: 4573 return "PGMPOOLKIND_ROOT_PAE_PD"; 4574 case PGMPOOLKIND_ROOT_PDPT: 4575 return "PGMPOOLKIND_ROOT_PDPT"; 4576 #endif 4577 case PGMPOOLKIND_ROOT_NESTED: 4578 return "PGMPOOLKIND_ROOT_NESTED"; 4579 } 4580 return "Unknown kind!"; 4581 } 4582 #endif
Note:
See TracChangeset
for help on using the changeset viewer.