VirtualBox

Changeset 104064 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 26, 2024 2:53:59 PM (12 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
162457
Message:

VMM/IEM: Made the IEMTB::cUsage value the native recompilation is done at configurable. bugref:10370

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

Legend:

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

    r103852 r104064  
    657657                    pTb->cUsed++;
    658658#ifdef VBOX_WITH_IEM_NATIVE_RECOMPILER
    659                     if ((pTb->fFlags & IEMTB_F_TYPE_NATIVE) || pTb->cUsed != 16)
     659                    if ((pTb->fFlags & IEMTB_F_TYPE_NATIVE) || pTb->cUsed != pVCpu->iem.s.uTbNativeRecompileAtUsedCount)
    660660                    {
    661661                        Log10(("TB lookup: fFlags=%#x GCPhysPc=%RGp idxHash=%#x: %p (@ %d / %d)\n",
  • trunk/src/VBox/VMM/VMMR3/IEMR3.cpp

    r103964 r104064  
    182182                          cbInitialExec, cbInitialExec, cbMaxExec);
    183183
     184    /** @cfgm{/IEM/NativeRecompileAtUsedCount, uint32_t, 16}
     185     * The translation block use count value to do native recompilation at. */
     186    uint32_t uTbNativeRecompileAtUsedCount = 16;
     187    rc = CFGMR3QueryU32Def(pIem, "NativeRecompileAtUsedCount", &uTbNativeRecompileAtUsedCount, 16);
     188    AssertLogRelRCReturn(rc, rc);
     189
    184190#endif /* VBOX_WITH_IEM_RECOMPILER*/
    185191
     
    260266        while (iMemMap-- > 0)
    261267            pVCpu->iem.s.aMemMappings[iMemMap].fAccess = IEM_ACCESS_INVALID;
     268
     269#ifdef VBOX_WITH_IEM_RECOMPILER
     270        /*
     271         * Distribute recompiler configuration.
     272         */
     273        pVCpu->iem.s.uTbNativeRecompileAtUsedCount = uTbNativeRecompileAtUsedCount;
     274#endif
    262275    }
    263276
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r104059 r104064  
    18251825    /** The virtual sync time at the last timer poll call. */
    18261826    uint32_t                msRecompilerPollNow;
     1827    /** The IEMTB::cUsed value when to attempt native recompilation of a TB. */
     1828    uint32_t                uTbNativeRecompileAtUsedCount;
    18271829    /** The IEM_CIMPL_F_XXX mask for the current instruction. */
    18281830    uint32_t                fTbCurInstr;
    18291831    /** The IEM_CIMPL_F_XXX mask for the previous instruction. */
    18301832    uint32_t                fTbPrevInstr;
    1831     /** Previous GCPhysInstrBuf value - only valid if fTbCrossedPage is set.   */
    1832     RTGCPHYS                GCPhysInstrBufPrev;
    18331833    /** Strict: Tracking skipped EFLAGS calculations.  Any bits set here are
    18341834     *  currently not up to date in EFLAGS. */
    18351835    uint32_t                fSkippingEFlags;
    1836     uint32_t                au32Padding[1];
     1836    /** Previous GCPhysInstrBuf value - only valid if fTbCrossedPage is set.   */
     1837    RTGCPHYS                GCPhysInstrBufPrev;
    18371838    /** Pointer to the ring-3 TB allocator for this EMT. */
    18381839    R3PTRTYPE(PIEMTBALLOCATOR) pTbAllocatorR3;
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