VirtualBox

Changeset 31126 in vbox


Ignore:
Timestamp:
Jul 26, 2010 6:21:50 PM (14 years ago)
Author:
vboxsync
Message:

PGM: Mac build fixes.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGMInline.h

    r31123 r31126  
    303303    PPGMMAPSET  pSet    = &pPGMCPU->AutoSet;
    304304
    305     STAM_PROFILE_START(&pPGMCPU->StatR0DynMapHCPageInl, a);
     305    STAM_PROFILE_START(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapHCPageInl, a);
    306306    Assert(!(HCPhys & PAGE_OFFSET_MASK));
    307307    Assert(pSet->cEntries <= RT_ELEMENTS(pSet->aEntries));
     
    313313    {
    314314        *ppv = pSet->aEntries[iEntry].pvPage;
    315         STAM_COUNTER_INC(&pPGMCPU->StatR0DynMapHCPageInlHits);
     315        STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapHCPageInlHits);
    316316    }
    317317    else
    318318    {
    319         STAM_COUNTER_INC(&pPGMCPU->StatR0DynMapHCPageInlMisses);
     319        STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapHCPageInlMisses);
    320320        pgmR0DynMapHCPageCommon(pVM, pSet, HCPhys, ppv);
    321321    }
    322322
    323     STAM_PROFILE_STOP(&pPGMCPU->StatR0DynMapHCPageInl, a);
     323    STAM_PROFILE_STOP(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapHCPageInl, a);
    324324    return VINF_SUCCESS;
    325325}
     
    340340    PPGMCPU pPGMCPU = (PPGMCPU)((uint8_t *)VMMGetCpu(pVM) + pPGM->offVCpuPGM); /* very pretty ;-) */
    341341
    342     STAM_PROFILE_START(&pPGMCPU->StatR0DynMapGCPageInl, a);
     342    STAM_PROFILE_START(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInl, a);
    343343    AssertMsg(!(GCPhys & PAGE_OFFSET_MASK), ("%RGp\n", GCPhys));
    344344
     
    352352    {
    353353        /* This case is not counted into StatR0DynMapGCPageInl. */
    354         STAM_COUNTER_INC(&pPGMCPU->StatR0DynMapGCPageInlRamMisses);
     354        STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlRamMisses);
    355355        return PGMDynMapGCPage(pVM, GCPhys, ppv);
    356356    }
    357357
    358358    RTHCPHYS HCPhys = PGM_PAGE_GET_HCPHYS(&pRam->aPages[off >> PAGE_SHIFT]);
    359     STAM_COUNTER_INC(&pPGMCPU->StatR0DynMapGCPageInlRamHits);
     359    STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlRamHits);
    360360
    361361    /*
     
    372372    {
    373373        *ppv = pSet->aEntries[iEntry].pvPage;
    374         STAM_COUNTER_INC(&pPGMCPU->StatR0DynMapGCPageInlHits);
     374        STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlHits);
    375375    }
    376376    else
    377377    {
    378         STAM_COUNTER_INC(&pPGMCPU->StatR0DynMapGCPageInlMisses);
     378        STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlMisses);
    379379        pgmR0DynMapHCPageCommon(pVM, pSet, HCPhys, ppv);
    380380    }
    381381
    382     STAM_PROFILE_STOP(&pPGMCPU->StatR0DynMapGCPageInl, a);
     382    STAM_PROFILE_STOP(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInl, a);
    383383    return VINF_SUCCESS;
    384384}
     
    410410    {
    411411        /* This case is not counted into StatR0DynMapGCPageInl. */
    412         STAM_COUNTER_INC(&pPGMCPU->StatR0DynMapGCPageInlRamMisses);
     412        STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlRamMisses);
    413413        return PGMDynMapGCPageOff(pVM, GCPhys, ppv);
    414414    }
    415415
    416416    RTHCPHYS HCPhys = PGM_PAGE_GET_HCPHYS(&pRam->aPages[off >> PAGE_SHIFT]);
    417     STAM_COUNTER_INC(&pPGMCPU->StatR0DynMapGCPageInlRamHits);
     417    STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlRamHits);
    418418
    419419    /*
     
    430430    {
    431431        *ppv = (void *)((uintptr_t)pSet->aEntries[iEntry].pvPage | (PAGE_OFFSET_MASK & (uintptr_t)GCPhys));
    432         STAM_COUNTER_INC(&pPGMCPU->StatR0DynMapGCPageInlHits);
     432        STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlHits);
    433433    }
    434434    else
    435435    {
    436         STAM_COUNTER_INC(&pPGMCPU->StatR0DynMapGCPageInlMisses);
     436        STAM_COUNTER_INC(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInlMisses);
    437437        pgmR0DynMapHCPageCommon(pVM, pSet, HCPhys, ppv);
    438438        *ppv = (void *)((uintptr_t)*ppv | (PAGE_OFFSET_MASK & (uintptr_t)GCPhys));
    439439    }
    440440
    441     STAM_PROFILE_STOP(&pPGMCPU->StatR0DynMapGCPageInl, a);
     441    STAM_PROFILE_STOP(&pPGMCPU->CTX_SUFF(pStats)->StatR0DynMapGCPageInl, a);
    442442    return VINF_SUCCESS;
    443443}
  • trunk/src/VBox/VMM/VMMR0/PGMR0DynMap.cpp

    r29259 r31126  
    11861186    PVMCPU pVCpu = VMMGetCpu(pVM);
    11871187#endif
    1188     STAM_COUNTER_INC(&pVCpu->pgm.s.StatR0DynMapPageSlow);
     1188    STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapPageSlow);
    11891189
    11901190    /*
     
    12141214            if (paPages[iFreePage].HCPhys == HCPhys)
    12151215            {
    1216                 STAM_COUNTER_INC(&pVCpu->pgm.s.StatR0DynMapPageSlowLoopHits);
     1216                STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapPageSlowLoopHits);
    12171217                return iFreePage;
    12181218            }
     
    12251225                return UINT32_MAX;
    12261226        }
    1227         STAM_COUNTER_INC(&pVCpu->pgm.s.StatR0DynMapPageSlowLoopMisses);
     1227        STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapPageSlowLoopMisses);
    12281228#ifdef VBOX_WITH_STATISTICS
    12291229        fLooped = true;
     
    12911291    RTSpinlockAcquire(pThis->hSpinlock, &Tmp);
    12921292    AssertMsg(!(HCPhys & PAGE_OFFSET_MASK), ("HCPhys=%RHp\n", HCPhys));
    1293     STAM_COUNTER_INC(&pVCpu->pgm.s.StatR0DynMapPage);
     1293    STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapPage);
    12941294
    12951295    /*
     
    13051305    PPGMR0DYNMAPENTRY   paPages = pThis->paPages;
    13061306    if (RT_LIKELY(paPages[iPage].HCPhys == HCPhys))
    1307         STAM_COUNTER_INC(&pVCpu->pgm.s.StatR0DynMapPageHits0);
     1307        STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapPageHits0);
    13081308    else
    13091309    {
     
    13121312        {
    13131313            iPage = iPage2;
    1314             STAM_COUNTER_INC(&pVCpu->pgm.s.StatR0DynMapPageHits1);
     1314            STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapPageHits1);
    13151315        }
    13161316        else
     
    13201320            {
    13211321                iPage = iPage2;
    1322                 STAM_COUNTER_INC(&pVCpu->pgm.s.StatR0DynMapPageHits2);
     1322                STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapPageHits2);
    13231323            }
    13241324            else
     
    13691369    if (RT_UNLIKELY(fInvalidateIt))
    13701370    {
    1371         STAM_COUNTER_INC(&pVCpu->pgm.s.StatR0DynMapPageInvlPg);
     1371        STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapPageInvlPg);
    13721372        ASMInvalidatePage(pvPage);
    13731373    }
     
    15931593    pSet->iCpu = -1;
    15941594
    1595     STAM_COUNTER_INC(&pVCpu->pgm.s.aStatR0DynMapSetSize[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
     1595    STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->aStatR0DynMapSetSize[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
    15961596    AssertMsg(cEntries < PGMMAPSET_MAX_FILL, ("%u\n", cEntries));
    15971597    if (cEntries > RT_ELEMENTS(pSet->aEntries) * 50 / 100)
     
    16171617    uint32_t cEntries = pSet->cEntries;
    16181618    AssertReturnVoid(cEntries != PGMMAPSET_CLOSED);
    1619     STAM_COUNTER_INC(&pVCpu->pgm.s.aStatR0DynMapSetSize[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
     1619    STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->aStatR0DynMapSetSize[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
    16201620    if (cEntries >= RT_ELEMENTS(pSet->aEntries) * 45 / 100)
    16211621    {
     
    16711671
    16721672                        ASMInvalidatePage(pThis->paPages[iPage].pvPage);
    1673                         STAM_COUNTER_INC(&pVCpu->pgm.s.StatR0DynMapMigrateInvlPg);
     1673                        STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapMigrateInvlPg);
    16741674
    16751675                        RTSpinlockAcquire(pThis->hSpinlock, &Tmp);
     
    17491749
    17501750    pSet->iSubset = pSet->cEntries;
    1751     STAM_COUNTER_INC(&pVCpu->pgm.s.StatR0DynMapSubsets);
     1751    STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapSubsets);
    17521752    return iPrevSubset;
    17531753}
     
    17671767    AssertReturnVoid(cEntries != PGMMAPSET_CLOSED);
    17681768    AssertReturnVoid(pSet->iSubset >= iPrevSubset || iPrevSubset == UINT32_MAX);
    1769     STAM_COUNTER_INC(&pVCpu->pgm.s.aStatR0DynMapSetSize[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
     1769    STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->aStatR0DynMapSetSize[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
    17701770    if (    cEntries >= RT_ELEMENTS(pSet->aEntries) * 40 / 100
    17711771        &&  cEntries != pSet->iSubset)
     
    19151915            {
    19161916                pSet->aEntries[i].cRefs++;
    1917                 STAM_COUNTER_INC(&pVCpu->pgm.s.StatR0DynMapSetSearchHits);
     1917                STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapSetSearchHits);
    19181918                break;
    19191919            }
    19201920        if (i < 0)
    19211921        {
    1922             STAM_COUNTER_INC(&pVCpu->pgm.s.StatR0DynMapSetSearchMisses);
     1922            STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapSetSearchMisses);
    19231923            if (pSet->iSubset < pSet->cEntries)
    19241924            {
    1925                 STAM_COUNTER_INC(&pVCpu->pgm.s.StatR0DynMapSetSearchFlushes);
    1926                 STAM_COUNTER_INC(&pVCpu->pgm.s.aStatR0DynMapSetSize[(pSet->cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
     1925                STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapSetSearchFlushes);
     1926                STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->aStatR0DynMapSetSize[(pSet->cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
    19271927                AssertMsg(pSet->cEntries < PGMMAPSET_MAX_FILL, ("%u\n", pSet->cEntries));
    19281928                pgmDynMapFlushSubset(pSet);
     
    19311931            if (RT_UNLIKELY(pSet->cEntries >= RT_ELEMENTS(pSet->aEntries)))
    19321932            {
    1933                 STAM_COUNTER_INC(&pVCpu->pgm.s.StatR0DynMapSetOptimize);
     1933                STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatR0DynMapSetOptimize);
    19341934                pgmDynMapOptimizeAutoSet(pSet);
    19351935            }
  • trunk/src/VBox/VMM/VMMR0/PGMR0SharedPage.cpp

    r30910 r31126  
    11/* $Id$ */
    22/** @file
    3  * PGM - Page Manager and Monitor, Ring-0.
     3 * PGM - Page Manager and Monitor, Page Sharing, Ring-0.
    44 */
    55
    66/*
    7  * Copyright (C) 2007 Oracle Corporation
     7 * Copyright (C) 2010 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
Note: See TracChangeset for help on using the changeset viewer.

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