VirtualBox

Changeset 87937 in vbox for trunk


Ignore:
Timestamp:
Mar 3, 2021 1:32:33 PM (4 years ago)
Author:
vboxsync
Message:

DevRTC: Corrected timer Hz hinting. (info timers; AMD-V)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevRTC.cpp

    r87773 r87937  
    254254
    255255#ifdef IN_RING3
    256         if (RT_UNLIKELY(period != pThis->CurLogPeriod))
    257 #else
    258         if (RT_UNLIKELY(period != pThis->CurHintPeriod))
    259 #endif
     256        if (RT_LIKELY(period == pThis->CurLogPeriod))
     257        { /* likely */ }
     258        else
    260259        {
    261 #ifdef IN_RING3
    262260            if (pThis->cRelLogEntries++ < 64)
    263261                LogRel(("RTC: period=%#x (%d) %u Hz\n", period, period, _32K / period));
    264             pThis->CurLogPeriod  = period;
     262            pThis->CurLogPeriod = period;
     263        }
    265264#endif
     265        if (RT_LIKELY(period == pThis->CurHintPeriod))
     266        { /* likely */ }
     267        else
     268        {
    266269            pThis->CurHintPeriod = period;
    267270            PDMDevHlpTimerSetFrequencyHint(pDevIns, pThis->hPeriodicTimer, _32K / period);
     
    275278#endif
    276279        PDMDevHlpTimerStop(pDevIns, pThis->hPeriodicTimer);
     280        pThis->CurHintPeriod = 0;
     281        pThis->CurLogPeriod = 0;
    277282    }
    278283    RT_NOREF(pDevIns);
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