VirtualBox

Changeset 54215 in vbox for trunk


Ignore:
Timestamp:
Feb 16, 2015 12:33:36 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
98279
Message:

Runtime,TM: Use GIP's fTscDeltasAreRoughlyInSync.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/sup.h

    r54214 r54215  
    439439    ((a_pGip)->u32Mode == SUPGIPMODE_INVARIANT_TSC && !((a_pGip)->fOsTscDeltasInSync))
    440440
     441/** Whether the application of TSC-deltas are worth it (performance matters). */
     442#define GIP_TSC_DELTAS_ROUGHLY_IN_SYNC(a_pGip)         ((a_pGip)->fTscDeltasRoughlyInSync)
     443
    441444#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
    442445/**
     
    16491652DECLINLINE(uint64_t) SUPReadTsc(void)
    16501653{
    1651     if (GIP_ARE_TSC_DELTAS_APPLICABLE(g_pSUPGlobalInfoPage))
     1654    if (    GIP_ARE_TSC_DELTAS_APPLICABLE(g_pSUPGlobalInfoPage)
     1655        && !GIP_TSC_DELTAS_ROUGHLY_IN_SYNC(g_pSUPGlobalInfoPage))
    16521656    {
    16531657        uint64_t u64Tsc = UINT64_MAX;
  • trunk/src/VBox/Runtime/common/time/timesup.cpp

    r54202 r54215  
    160160 * @returns true if deltas needs to be applied, false if not.
    161161 * @param   pGip                The GIP.
     162 *
     163 * @remarks If you change this, make sure to also change tmR3ReallyNeedDeltas().
    162164 */
    163165static bool rtTimeNanoTsInternalReallyNeedDeltas(PSUPGLOBALINFOPAGE pGip)
    164166{
     167    return !pGip->fOsTscDeltasInSync && !pGip->fTscDeltasRoughlyInSync;
     168#if 0
    165169    if (!pGip->fOsTscDeltasInSync)
    166170    {
     
    173177    }
    174178    return false;
     179#endif
    175180}
    176181
  • trunk/src/VBox/VMM/VMMR3/TM.cpp

    r54214 r54215  
    952952 * @returns true if deltas needs to be applied, false if not.
    953953 * @param   pGip                The GIP.
     954 *
     955 * @remarks If you change this, make sure to also change
     956 *          rtTimeNanoTsInternalReallyNeedDeltas().
    954957 */
    955958static bool tmR3ReallyNeedDeltas(PSUPGLOBALINFOPAGE pGip)
    956959{
     960    return !pGip->fOsTscDeltasInSync && !pGip->fTscDeltasRoughlyInSync;
     961#if 0
    957962    if (!pGip->fOsTscDeltasInSync)
    958963    {
     
    965970    }
    966971    return false;
     972#endif
    967973}
    968974
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