VirtualBox

Changeset 105712 in vbox for trunk


Ignore:
Timestamp:
Aug 16, 2024 8:55:59 PM (5 months ago)
Author:
vboxsync
Message:

VMM/IEM: Kicked out some debug tracing code from iemPollTimers. bugref:10656

File:
1 edited

Legend:

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

    r105698 r105712  
    29442944#define IEM_TIMER_POLL_MAX_ITER         _512K
    29452945
    2946 
    2947 DECL_FORCE_INLINE(uint32_t) iemPollTimersCalcDefaultCountdown(uint64_t cNsDelta)
     2946#ifdef IEM_WITH_ADAPTIVE_TIMER_POLLING
     2947/**
     2948 * Calculates the number of TBs till the next timer polling using defaults.
     2949 *
     2950 * This is used when the previous run wasn't long enough to provide sufficient
     2951 * data and when comming back from the HALT state and we haven't actually
     2952 * executed anything for a while.
     2953 */
     2954DECL_FORCE_INLINE(uint32_t) iemPollTimersCalcDefaultCountdown(uint64_t cNsDelta) RT_NOEXCEPT
    29482955{
    29492956    if (cNsDelta >= IEM_TIMER_POLL_MAX_NS)
     
    29602967    return IEM_TIMER_POLL_MIN_ITER;
    29612968}
     2969#endif
    29622970
    29632971
     
    30533061            STAM_COUNTER_INC(&pVCpu->iem.s.StatTimerPollTiny);
    30543062            cItersTillNextPoll = IEM_TIMER_POLL_MIN_ITER;
    3055             IEMTLBTRACE_USER0(pVCpu, TMVirtualSyncGetLag(pVM), RT_MAKE_U64(cNsSinceLast, cNsDelta), cItersTillNextPoll, 0);
    30563063        }
    30573064        else
     
    30593066            uint32_t const cNsDeltaAdj   = cNsDelta >= IEM_TIMER_POLL_MAX_NS ? IEM_TIMER_POLL_MAX_NS     : (uint32_t)cNsDelta;
    30603067            uint32_t const cNsDeltaSlack = cNsDelta >= IEM_TIMER_POLL_MAX_NS ? IEM_TIMER_POLL_MAX_NS / 2 : cNsDeltaAdj / 4;
    3061             if (   cNsSinceLast            < RT_MAX(IEM_TIMER_POLL_MIN_NS, 64)
     3068            if (   cNsSinceLast       < RT_MAX(IEM_TIMER_POLL_MIN_NS, 64)
    30623069                || cItersTillNextPoll < IEM_TIMER_POLL_MIN_ITER /* paranoia */)
    30633070            {
    30643071                STAM_COUNTER_INC(&pVCpu->iem.s.StatTimerPollDefaultCalc);
    30653072                cItersTillNextPoll = iemPollTimersCalcDefaultCountdown(cNsDeltaAdj);
    3066                 IEMTLBTRACE_USER1(pVCpu, TMVirtualSyncGetLag(pVM), RT_MAKE_U64(cNsSinceLast, cNsDelta), cItersTillNextPoll, 3);
    30673073            }
    30683074            else if (   cNsSinceLast >= cNsDeltaAdj + cNsDeltaSlack
     
    30743080                    cItersTillNextPoll = cNsDeltaAdj / uFactor;
    30753081                    STAM_PROFILE_ADD_PERIOD(&pVCpu->iem.s.StatTimerPollFactorDivision, uFactor);
    3076                     IEMTLBTRACE_USER1(pVCpu, TMVirtualSyncGetLag(pVM), RT_MAKE_U64(cNsSinceLast, cNsDelta), cItersTillNextPoll, 1);
    30773082                }
    30783083                else
     
    30813086                    cItersTillNextPoll = cNsDeltaAdj * uFactor;
    30823087                    STAM_PROFILE_ADD_PERIOD(&pVCpu->iem.s.StatTimerPollFactorMultiplication, uFactor);
    3083                     IEMTLBTRACE_USER1(pVCpu, TMVirtualSyncGetLag(pVM), RT_MAKE_U64(cNsSinceLast, cNsDelta), cItersTillNextPoll, 2);
    30843088                }
    30853089
     
    30983102            }
    30993103            else
    3100             {
    31013104                STAM_COUNTER_INC(&pVCpu->iem.s.StatTimerPollUnchanged);
    3102                 IEMTLBTRACE_USER3(pVCpu, TMVirtualSyncGetLag(pVM), RT_MAKE_U64(cNsSinceLast, cNsDelta), cItersTillNextPoll, 0x00);
    3103             }
    31043105        }
    31053106        pVCpu->iem.s.cTbsTillNextTimerPollPrev = cItersTillNextPoll;
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