VirtualBox

Ignore:
Timestamp:
Feb 19, 2015 10:36:46 PM (10 years ago)
Author:
vboxsync
Message:

SUPDrv: Force large deltas on all CPUs for testing purposes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPDrv.c

    r54317 r54318  
    128128/** The TSC-delta threshold for the SUPGIPUSETSCDELTA_ROUGHLY_ZERO rating */
    129129#define GIP_TSC_DELTA_THRESHOLD_ROUGHLY_ZERO        448
     130/** The TSC delta value for the initial GIP master - 0 in regular builds.
     131 * To test the delta code this can be set to a non-zero value.  */
     132#if 1
     133# define GIP_TSC_DELTA_INITIAL_MASTER_VALUE INT64_C(170139095182512) /* 0x00009abd9854acb0 */
     134#else
     135# define GIP_TSC_DELTA_INITIAL_MASTER_VALUE INT64_C(0)
     136#endif
    130137
    131138AssertCompile(GIP_TSC_DELTA_PRIMER_LOOPS < GIP_TSC_DELTA_READ_TIME_LOOPS);
     
    75347541    {
    75357542        if (pGipCpuWorker->i64TSCDelta == INT64_MAX) /* This shouldn't happen, but just in case. */
    7536             ASMAtomicWriteS64(&pGipCpuWorker->i64TSCDelta, 0);
     7543            ASMAtomicWriteS64(&pGipCpuWorker->i64TSCDelta, GIP_TSC_DELTA_INITIAL_MASTER_VALUE);
    75377544        return VINF_SUCCESS;
    75387545    }
     
    76307637            {
    76317638                idxMaster = idxCpu;
    7632                 pGipCpu->i64TSCDelta = 0;
     7639                pGipCpu->i64TSCDelta = GIP_TSC_DELTA_INITIAL_MASTER_VALUE;
    76337640                break;
    76347641            }
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