Changeset 82929 in vbox
- Timestamp:
- Jan 30, 2020 1:53:06 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 135912
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r82897 r82929 2026 2026 * @param pPool The pool. 2027 2027 * @param iUser The user index. 2028 * @param pszTmpCaller OS X debugging. 2029 */ 2030 static int pgmPoolCacheFreeOne(PPGMPOOL pPool, uint16_t iUser, const char *pszTmpCaller) 2028 */ 2029 static int pgmPoolCacheFreeOne(PPGMPOOL pPool, uint16_t iUser) 2031 2030 { 2032 2031 const PVMCC pVM = pPool->CTX_SUFF(pVM); … … 2057 2056 */ 2058 2057 Assert(iToFree != iUser); 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]) 2058 AssertReleaseMsg(iToFree != NIL_PGMPOOL_IDX, 2059 ("iToFree=%#x (iAgeTail=%#x) iUser=%#x iLoop=%u - pPool=%p LB %#zx\n", 2060 iToFree, pPool->iAgeTail, iUser, iLoop, pPool, 2061 RT_UOFFSETOF_DYN(PGMPOOL, aPages[pPool->cMaxPages]) 2064 2062 + 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 } 2063 + pPool->cMaxPhysExts * sizeof(PGMPOOLPHYSEXT) )); 2064 2074 2065 pPage = &pPool->aPages[iToFree]; 2075 2066 … … 2804 2795 * @param pPool The pool. 2805 2796 * @param iUser The user index. 2806 * @param pszTmpCaller Temporary OS X debugging. 2807 */ 2808 static int pgmPoolTrackFreeOneUser(PPGMPOOL pPool, uint16_t iUser, const char *pszTmpCaller) 2797 */ 2798 static int pgmPoolTrackFreeOneUser(PPGMPOOL pPool, uint16_t iUser) 2809 2799 { 2810 2800 STAM_COUNTER_INC(&pPool->StatTrackFreeUpOneUser); … … 2816 2806 do 2817 2807 { 2818 int rc2 = pgmPoolCacheFreeOne(pPool, iUser , pszTmpCaller);2808 int rc2 = pgmPoolCacheFreeOne(pPool, iUser); 2819 2809 if (RT_FAILURE(rc2) && rc == VINF_SUCCESS) 2820 2810 rc = rc2; … … 2870 2860 if (i == NIL_PGMPOOL_USER_INDEX) 2871 2861 { 2872 rc = pgmPoolTrackFreeOneUser(pPool, iUser , __FUNCTION__);2862 rc = pgmPoolTrackFreeOneUser(pPool, iUser); 2873 2863 if (RT_FAILURE(rc)) 2874 2864 return rc; … … 2956 2946 if (i == NIL_PGMPOOL_USER_INDEX) 2957 2947 { 2958 int rc = pgmPoolTrackFreeOneUser(pPool, iUser , __FUNCTION__);2948 int rc = pgmPoolTrackFreeOneUser(pPool, iUser); 2959 2949 if (RT_FAILURE(rc)) 2960 2950 return rc; … … 4986 4976 * If the pool isn't full grown yet, expand it. 4987 4977 */ 4988 const char *pszTmp = "pgmPoolMakeMoreFreePages/no-growth";4989 4978 if (pPool->cCurPages < pPool->cMaxPages) 4990 4979 { … … 5000 4989 if (pPool->iFreeHead != NIL_PGMPOOL_IDX) 5001 4990 return VINF_SUCCESS; 5002 pszTmp = "pgmPoolMakeMoreFreePages/grew-it";5003 4991 } 5004 4992 … … 5006 4994 * Free one cached page. 5007 4995 */ 5008 return pgmPoolCacheFreeOne(pPool, iUser , pszTmp);4996 return pgmPoolCacheFreeOne(pPool, iUser); 5009 4997 } 5010 4998 -
trunk/src/VBox/VMM/VMMR3/PGMPool.cpp
r82897 r82929 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). */237 236 pVM->pgm.s.pPoolR3 = pPool; 238 237 pVM->pgm.s.pPoolR0 = MMHyperR3ToR0(pVM, pPool); … … 289 288 290 289 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.293 290 294 291 /*
Note:
See TracChangeset
for help on using the changeset viewer.