VirtualBox

Changeset 37137 in vbox


Ignore:
Timestamp:
May 18, 2011 2:49:39 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
71810
Message:

Remvoed the non-PGM_USE_RAMRANGE_SEARCH_TREES code.

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

Legend:

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

    r36902 r37137  
    180180    STAM_COUNTER_INC(&pVM->pgm.s.CTX_SUFF(pStats)->CTX_MID_Z(Stat,RamRangeTlbMisses));
    181181
    182 #ifdef PGM_USE_RAMRANGE_SEARCH_TREES
    183182    PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRangeTree);
    184183    while (pRam)
     
    196195    }
    197196    return NULL;
    198 #else
    199     PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRangesX);
    200     while (GCPhys > pRam->GCPhysLast)
    201     {
    202         pRam = pRam->CTX_SUFF(pNext);
    203         if (!pRam)
    204             return NULL;
    205     }
    206     if (GCPhys < pRam->GCPhys)
    207         return NULL;
    208 
    209     pVM->pgm.s.CTX_SUFF(apRamRangesTlb)[PGM_RAMRANGE_TLB_IDX(GCPhys)] = pRam;
    210     return pRam;
    211 #endif
    212197}
    213198
     
    222207    STAM_COUNTER_INC(&pVM->pgm.s.CTX_SUFF(pStats)->CTX_MID_Z(Stat,RamRangeTlbMisses));
    223208
    224 #ifdef PGM_USE_RAMRANGE_SEARCH_TREES
    225209    PPGMRAMRANGE pLastLeft = NULL;
    226210    PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRangeTree);
     
    242226    }
    243227    return pLastLeft;
    244 #else
    245     PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRangesX);
    246     while (GCPhys > pRam->GCPhysLast)
    247     {
    248         pRam = pRam->CTX_SUFF(pNext);
    249         if (!pRam)
    250             return NULL;
    251     }
    252     pVM->pgm.s.CTX_SUFF(apRamRangesTlb)[PGM_RAMRANGE_TLB_IDX(GCPhys)] = pRam;
    253     return pRam;
    254 #endif
    255228}
    256229
     
    265238    STAM_COUNTER_INC(&pVM->pgm.s.CTX_SUFF(pStats)->CTX_MID_Z(Stat,RamRangeTlbMisses));
    266239
    267 #ifdef PGM_USE_RAMRANGE_SEARCH_TREES
    268240    PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRangeTree);
    269241    while (pRam)
     
    281253            pRam = pRam->CTX_SUFF(pRight);
    282254    }
    283 #else
    284     for (PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRangesX);
    285          pRam;
    286          pRam = pRam->CTX_SUFF(pNext))
    287     {
    288         RTGCPHYS off = GCPhys - pRam->GCPhys;
    289         if (off < pRam->cb)
    290         {
    291             pVM->pgm.s.CTX_SUFF(apRamRangesTlb)[PGM_RAMRANGE_TLB_IDX(GCPhys)] = pRam;
    292             return &pRam->aPages[off >> PAGE_SHIFT];
    293         }
    294     }
    295 #endif
    296255    return NULL;
    297256}
     
    307266    STAM_COUNTER_INC(&pVM->pgm.s.CTX_SUFF(pStats)->CTX_MID_Z(Stat,RamRangeTlbMisses));
    308267
    309 #ifdef PGM_USE_RAMRANGE_SEARCH_TREES
    310268    PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRangeTree);
    311269    while (pRam)
     
    324282            pRam = pRam->CTX_SUFF(pRight);
    325283    }
    326 #else
    327     for (PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRangesX);
    328          pRam;
    329          pRam = pRam->CTX_SUFF(pNext))
    330     {
    331         RTGCPHYS off = GCPhys - pRam->GCPhys;
    332         if (off < pRam->cb)
    333         {
    334             pVM->pgm.s.CTX_SUFF(apRamRangesTlb)[PGM_RAMRANGE_TLB_IDX(GCPhys)] = pRam;
    335             *ppPage = &pRam->aPages[off >> PAGE_SHIFT];
    336             return VINF_SUCCESS;
    337         }
    338     }
    339 #endif
    340284
    341285    *ppPage = NULL;
     
    353297    STAM_COUNTER_INC(&pVM->pgm.s.CTX_SUFF(pStats)->CTX_MID_Z(Stat,RamRangeTlbMisses));
    354298
    355 #ifdef PGM_USE_RAMRANGE_SEARCH_TREES
    356299    PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRangeTree);
    357300    while (pRam)
     
    371314            pRam = pRam->CTX_SUFF(pRight);
    372315    }
    373 #else
    374     for (PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRangesX);
    375          pRam;
    376          pRam = pRam->CTX_SUFF(pNext))
    377     {
    378         RTGCPHYS off = GCPhys - pRam->GCPhys;
    379         if (off < pRam->cb)
    380         {
    381             pVM->pgm.s.CTX_SUFF(apRamRangesTlb)[PGM_RAMRANGE_TLB_IDX(GCPhys)] = pRam;
    382             *ppRam  = pRam;
    383             *ppPage = &pRam->aPages[off >> PAGE_SHIFT];
    384             return VINF_SUCCESS;
    385         }
    386     }
    387 #endif
    388316
    389317    *ppRam  = NULL;
  • trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp

    r36960 r37137  
    578578}
    579579
    580 #ifdef PGM_USE_RAMRANGE_SEARCH_TREES
    581580
    582581#define MAKE_LEAF(a_pNode) \
     
    720719#undef INSERT_LEFT
    721720#undef INSERT_RIGHT
    722 #endif /* PGM_USE_RAMRANGE_SEARCH_TREES */
    723721
    724722/**
     
    770768    ASMAtomicIncU32(&pVM->pgm.s.idRamRangesGen);
    771769
    772 #ifdef PGM_USE_RAMRANGE_SEARCH_TREES
    773770    pgmR3PhysRebuildRamRangeSearchTrees(pVM);
    774 #endif
    775771}
    776772
     
    810806    ASMAtomicIncU32(&pVM->pgm.s.idRamRangesGen);
    811807
    812 #ifdef PGM_USE_RAMRANGE_SEARCH_TREES
    813808    pgmR3PhysRebuildRamRangeSearchTrees(pVM);
    814 #endif
    815809    pgmUnlock(pVM);
    816810}
     
    848842    ASMAtomicIncU32(&pVM->pgm.s.idRamRangesGen);
    849843
    850 #ifdef PGM_USE_RAMRANGE_SEARCH_TREES
    851844    pgmR3PhysRebuildRamRangeSearchTrees(pVM);
    852 #endif
    853845    pgmUnlock(pVM);
    854846}
  • trunk/src/VBox/VMM/include/PGMInternal.h

    r36940 r37137  
    12641264
    12651265
    1266 /** Enables the RAM range search trees. */
    1267 #define PGM_USE_RAMRANGE_SEARCH_TREES
    1268 
    12691266/**
    12701267 * RAM range for GC Phys to HC Phys conversion.
     
    13021299    RCPTRTYPE(struct PGMRAMRANGE *)     pSelfRC;
    13031300
    1304 #ifdef PGM_USE_RAMRANGE_SEARCH_TREES
    13051301    /** Alignment padding. */
    13061302    RTRCPTR                             Alignment0;
     
    13171313    /** Pointer to the right search three node - raw-mode context. */
    13181314    RCPTRTYPE(struct PGMRAMRANGE *)     pRightRC;
    1319 #endif
    13201315
    13211316    /** Padding to make aPage aligned on sizeof(PGMPAGE). */
    1322 #ifdef PGM_USE_RAMRANGE_SEARCH_TREES
    1323 # if HC_ARCH_BITS == 32
     1317#if HC_ARCH_BITS == 32
    13241318    uint32_t                            au32Alignment2[HC_ARCH_BITS == 32 ? 2 : 0];
    1325 # endif
    1326 #else
    1327     uint32_t                            au32Alignment2[HC_ARCH_BITS == 32 ? 1 : 3];
    13281319#endif
    13291320    /** Array of physical guest page tracking structures. */
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