VirtualBox

Changeset 82929 in vbox


Ignore:
Timestamp:
Jan 30, 2020 1:53:06 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
135912
Message:

PGMPool: Undid the OS X debug instrumentation. bugref:9627

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r82897 r82929  
    20262026 * @param   pPool       The pool.
    20272027 * @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 */
     2029static int pgmPoolCacheFreeOne(PPGMPOOL pPool, uint16_t iUser)
    20312030{
    20322031    const PVMCC pVM = pPool->CTX_SUFF(pVM);
     
    20572056*/
    20582057        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])
    20642062                          + 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
    20742065        pPage = &pPool->aPages[iToFree];
    20752066
     
    28042795 * @param   pPool       The pool.
    28052796 * @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 */
     2798static int pgmPoolTrackFreeOneUser(PPGMPOOL pPool, uint16_t iUser)
    28092799{
    28102800    STAM_COUNTER_INC(&pPool->StatTrackFreeUpOneUser);
     
    28162806    do
    28172807    {
    2818         int rc2 = pgmPoolCacheFreeOne(pPool, iUser, pszTmpCaller);
     2808        int rc2 = pgmPoolCacheFreeOne(pPool, iUser);
    28192809        if (RT_FAILURE(rc2) && rc == VINF_SUCCESS)
    28202810            rc = rc2;
     
    28702860        if (i == NIL_PGMPOOL_USER_INDEX)
    28712861        {
    2872             rc = pgmPoolTrackFreeOneUser(pPool, iUser, __FUNCTION__);
     2862            rc = pgmPoolTrackFreeOneUser(pPool, iUser);
    28732863            if (RT_FAILURE(rc))
    28742864                return rc;
     
    29562946    if (i == NIL_PGMPOOL_USER_INDEX)
    29572947    {
    2958         int rc = pgmPoolTrackFreeOneUser(pPool, iUser, __FUNCTION__);
     2948        int rc = pgmPoolTrackFreeOneUser(pPool, iUser);
    29592949        if (RT_FAILURE(rc))
    29602950            return rc;
     
    49864976     * If the pool isn't full grown yet, expand it.
    49874977     */
    4988 const char *pszTmp = "pgmPoolMakeMoreFreePages/no-growth";
    49894978    if (pPool->cCurPages < pPool->cMaxPages)
    49904979    {
     
    50004989        if (pPool->iFreeHead != NIL_PGMPOOL_IDX)
    50014990            return VINF_SUCCESS;
    5002 pszTmp = "pgmPoolMakeMoreFreePages/grew-it";
    50034991    }
    50044992
     
    50064994     * Free one cached page.
    50074995     */
    5008     return pgmPoolCacheFreeOne(pPool, iUser, pszTmp);
     4996    return pgmPoolCacheFreeOne(pPool, iUser);
    50094997}
    50104998
  • trunk/src/VBox/VMM/VMMR3/PGMPool.cpp

    r82897 r82929  
    234234    if (RT_FAILURE(rc))
    235235        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). */
    237236    pVM->pgm.s.pPoolR3 = pPool;
    238237    pVM->pgm.s.pPoolR0 = MMHyperR3ToR0(pVM, pPool);
     
    289288
    290289    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.
    293290
    294291    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette