Changeset 82895 in vbox for trunk/src/VBox
- Timestamp:
- Jan 28, 2020 7:52:56 PM (5 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r82888 r82895 2026 2026 * @param pPool The pool. 2027 2027 * @param iUser The user index. 2028 */ 2029 static int pgmPoolCacheFreeOne(PPGMPOOL pPool, uint16_t iUser) 2028 * @param pszTmpCaller OS X debugging. 2029 */ 2030 static int pgmPoolCacheFreeOne(PPGMPOOL pPool, uint16_t iUser, const char *pszTmpCaller) 2030 2031 { 2031 2032 const PVMCC pVM = pPool->CTX_SUFF(pVM); … … 2056 2057 */ 2057 2058 Assert(iToFree != iUser); 2058 AssertReleaseMsg(iToFree != NIL_PGMPOOL_IDX, ("iToFree=%#x (%#x)\n%.1024Rhxd\n", iToFree, pPool->iAgeTail, pPool)); 2059 if (RT_LIKELY(iToFree != NIL_PGMPOOL_IDX)) /* Temporary OS X debugging */ 2060 { /* likely */ } 2061 else 2062 { 2063 size_t cbPool = RT_UOFFSETOF_DYN(PGMPOOL, aPages[pPool->cMaxPages]) 2064 + pPool->cMaxUsers * sizeof(PGMPOOLUSER) 2065 + pPool->cMaxPhysExts * sizeof(PGMPOOLPHYSEXT); 2066 uint8_t *pbLastPage = (uint8_t *)pPool + ((cbPool - 1) & ~(uintptr_t)PAGE_OFFSET_MASK); 2067 AssertReleaseMsg(iToFree != NIL_PGMPOOL_IDX, ("%s: iToFree=%#x (iAgeTail=%#x) iUser=%#x iLoop=%u - pPool=%p (LB %#zx):\n" 2068 "%.512Rhxd\n" 2069 "pLastPage=%p:\n" 2070 "%.4096Rhxd\n", 2071 pszTmpCaller, iToFree, pPool->iAgeTail, iUser, iLoop, 2072 pPool, cbPool, pPool, pbLastPage, pbLastPage)); 2073 } 2059 2074 pPage = &pPool->aPages[iToFree]; 2060 2075 … … 2789 2804 * @param pPool The pool. 2790 2805 * @param iUser The user index. 2791 */ 2792 static int pgmPoolTrackFreeOneUser(PPGMPOOL pPool, uint16_t iUser) 2806 * @param pszTmpCaller Temporary OS X debugging. 2807 */ 2808 static int pgmPoolTrackFreeOneUser(PPGMPOOL pPool, uint16_t iUser, const char *pszTmpCaller) 2793 2809 { 2794 2810 STAM_COUNTER_INC(&pPool->StatTrackFreeUpOneUser); … … 2800 2816 do 2801 2817 { 2802 int rc2 = pgmPoolCacheFreeOne(pPool, iUser );2818 int rc2 = pgmPoolCacheFreeOne(pPool, iUser, pszTmpCaller); 2803 2819 if (RT_FAILURE(rc2) && rc == VINF_SUCCESS) 2804 2820 rc = rc2; … … 2854 2870 if (i == NIL_PGMPOOL_USER_INDEX) 2855 2871 { 2856 rc = pgmPoolTrackFreeOneUser(pPool, iUser );2872 rc = pgmPoolTrackFreeOneUser(pPool, iUser, __FUNCTION__); 2857 2873 if (RT_FAILURE(rc)) 2858 2874 return rc; … … 2940 2956 if (i == NIL_PGMPOOL_USER_INDEX) 2941 2957 { 2942 int rc = pgmPoolTrackFreeOneUser(pPool, iUser );2958 int rc = pgmPoolTrackFreeOneUser(pPool, iUser, __FUNCTION__); 2943 2959 if (RT_FAILURE(rc)) 2944 2960 return rc; … … 4970 4986 * If the pool isn't full grown yet, expand it. 4971 4987 */ 4988 const char *pszTmp = "pgmPoolMakeMoreFreePages/no-growth"; 4972 4989 if (pPool->cCurPages < pPool->cMaxPages) 4973 4990 { … … 4983 5000 if (pPool->iFreeHead != NIL_PGMPOOL_IDX) 4984 5001 return VINF_SUCCESS; 5002 pszTmp = "pgmPoolMakeMoreFreePages/grew-it"; 4985 5003 } 4986 5004 … … 4988 5006 * Free one cached page. 4989 5007 */ 4990 return pgmPoolCacheFreeOne(pPool, iUser );5008 return pgmPoolCacheFreeOne(pPool, iUser, pszTmp); 4991 5009 } 4992 5010 -
trunk/src/VBox/VMM/VMMR3/PGMPool.cpp
r82555 r82895 234 234 if (RT_FAILURE(rc)) 235 235 return rc; 236 memset((uint8_t *)pPool + cb, 0xbb, RT_ALIGN_Z(cb, PAGE_SIZE) - cb); /* Temporary OS X debugging: Color the unused bytes (ASSUMES page aligned alloc). */ 236 237 pVM->pgm.s.pPoolR3 = pPool; 237 238 pVM->pgm.s.pPoolR0 = MMHyperR3ToR0(pVM, pPool); … … 288 289 289 290 pPool->HCPhysTree = 0; 291 LogRel(("PGM: pgmR3PoolInit: pPool=%p LB %#x paUsers=%p paPhysExts=%p (pEnd=%p) pVM=%p\n", 292 pPool, cb, pPool->paUsersR3, pPool->paPhysExtsR3, (uint8_t *)pPool + cb, pVM)); // Temporary OS X debugging. 290 293 291 294 /*
Note:
See TracChangeset
for help on using the changeset viewer.