VirtualBox

Changeset 2744 in vbox for trunk/src


Ignore:
Timestamp:
May 21, 2007 3:21:25 PM (18 years ago)
Author:
vboxsync
Message:

Gather some more info on that TM.cpp assertion...

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/TM.cpp

    r2623 r2744  
    13681368    const uint64_t u64VirtualNow = TMVirtualGetEx(pVM, false /* don't check timers */);
    13691369    uint64_t u64Now;
    1370 uint64_t off = 0, u64Delta = 0, u64Sub = 0; /* debugging - to be removed */
    1371 bool fWasInCatchup = false;                 /* debugging - to be removed */
     1370uint64_t off = 0, u64Delta = 0, u64Sub = 0;         /* debugging - to be removed */
     1371bool fWasInCatchup = false;                         /* debugging - to be removed */
     1372bool fWasTicking = pVM->tm.s.fVirtualSyncTicking;   /* debugging - to be removed*/
    13721373    if (!pVM->tm.s.fVirtualSyncTicking)
    13731374    {
     
    14231424
    14241425    /* assert sanity */
    1425 #ifdef VBOX_STRICT /* debugging - remove all but the assertions. */
    14261426if (RT_UNLIKELY(    !(u64Now <= u64VirtualNow - pVM->tm.s.offVirtualSyncGivenUp)
    14271427                ||  !(u64Max <= u64VirtualNow - pVM->tm.s.offVirtualSyncGivenUp)
    14281428                ||  !(u64Now <= u64Max)))
    14291429{
    1430     AssertMsg2("Add the following to defect #1414:\n"
    1431                "                         u64Now=%016RX64\n"
    1432                "                         u64Max=%016RX64\n"
    1433                "               pNext->u64Expire=%016RX64\n"
    1434                "                  u64VirtualNow=%016RX64\n"
    1435                "                            off=%016RX64\n"
    1436                "                       u64Delta=%016RX64\n"
    1437                "                         u64Sub=%016RX64\n"
    1438                "                 offVirtualSync=%016RX64\n"
    1439                "          offVirtualSyncGivenUp=%016RX64\n"
    1440                "      u64VirtualSyncCatchUpPrev=%016RX64\n"
    1441                "u32VirtualSyncCatchUpPercentage=%08RX32\n"
    1442                "            fVirtualSyncTicking=%RTbool\n"
    1443                "            fVirtualSyncCatchUp=%RTbool (prev=%RTbool)\n",
    1444                u64Now,
    1445                u64Max,
    1446                pNext->u64Expire,
    1447                u64VirtualNow,
    1448                off,
    1449                u64Delta,
    1450                u64Sub,
    1451                pVM->tm.s.offVirtualSync,
    1452                pVM->tm.s.offVirtualSyncGivenUp,
    1453                pVM->tm.s.u64VirtualSyncCatchUpPrev,
    1454                pVM->tm.s.u32VirtualSyncCatchUpPercentage,
    1455                pVM->tm.s.fVirtualSyncTicking,
    1456                pVM->tm.s.fVirtualSyncCatchUp, fWasInCatchup);
     1430    LogRel(("Add the following to defect #1414:\n"
     1431            "                         u64Now=%016RX64\n"
     1432            "                         u64Max=%016RX64\n"
     1433            "               pNext->u64Expire=%016RX64\n"
     1434            "                 u64VirtualSync=%016RX64\n"
     1435            "                  u64VirtualNow=%016RX64\n"
     1436            "                            off=%016RX64\n"
     1437            "                       u64Delta=%016RX64\n"
     1438            "                         u64Sub=%016RX64\n"
     1439            "                 offVirtualSync=%016RX64\n"
     1440            "          offVirtualSyncGivenUp=%016RX64\n"
     1441            "      u64VirtualSyncCatchUpPrev=%016RX64\n"
     1442            "        u64VirtualSyncStoppedTS=%016RX64\n"
     1443            "u32VirtualSyncCatchUpPercentage=%08RX32\n"
     1444            "            fVirtualSyncTicking=%RTbool (prev=%RTbool)\n"
     1445            "            fVirtualSyncCatchUp=%RTbool (prev=%RTbool)\n",
     1446            u64Now,
     1447            u64Max,
     1448            pNext->u64Expire,
     1449            pVM->tm.s.u64VirtualSync,
     1450            u64VirtualNow,
     1451            off,
     1452            u64Delta,
     1453            u64Sub,
     1454            pVM->tm.s.offVirtualSync,
     1455            pVM->tm.s.offVirtualSyncGivenUp,
     1456            pVM->tm.s.u64VirtualSyncCatchUpPrev,
     1457            pVM->tm.s.u64VirtualSyncStoppedTS,
     1458            pVM->tm.s.u32VirtualSyncCatchUpPercentage,
     1459            pVM->tm.s.fVirtualSyncTicking, fWasTicking,
     1460            pVM->tm.s.fVirtualSyncCatchUp, fWasInCatchup));
    14571461    Assert(u64Now <= u64VirtualNow - pVM->tm.s.offVirtualSyncGivenUp);
    14581462    Assert(u64Max <= u64VirtualNow - pVM->tm.s.offVirtualSyncGivenUp);
    14591463    Assert(u64Now <= u64Max);
    14601464}
    1461 #endif
    14621465
    14631466    /*
     
    16171620            else
    16181621            {
    1619                 /* not bother */
     1622                /* don't bother */
    16201623                STAM_COUNTER_INC(&pVM->tm.s.StatVirtualSyncGiveUpBeforeStarting);
    16211624                ASMAtomicXchgU64((uint64_t volatile *)&pVM->tm.s.offVirtualSyncGivenUp, offNew);
     
    16281631         * Update the offset and restart the clock.
    16291632         */
     1633        Assert(!(offNew & RT_BIT_64(63)));
    16301634        ASMAtomicXchgU64(&pVM->tm.s.offVirtualSync, offNew);
    16311635        ASMAtomicXchgBool(&pVM->tm.s.fVirtualSyncTicking, true);
  • trunk/src/VBox/VMM/TMInternal.h

    r2623 r2744  
    341341     * Thus the current lag is offVirtualSync - offVirtualSyncGivenUp. */
    342342    uint64_t                    offVirtualSyncGivenUp;
     343uint64_t volatile           u64VirtualSyncStoppedTS;/**< for debugging - remove later */
    343344    /** The TMCLOCK_VIRTUAL at the previous TMVirtualGetSync call when catch-up is active. */
    344345    uint64_t volatile           u64VirtualSyncCatchUpPrev;
  • trunk/src/VBox/VMM/VMMAll/TMAll.cpp

    r2581 r2744  
    178178
    179179    /*
    180      * TMCLOCK_VIRTUAL_SYNC 
     180     * TMCLOCK_VIRTUAL_SYNC
    181181     * This isn't quite as stright forward if in a catch-up, not only do
    182182     * we have to adjust the 'now' but when have to adjust the delta as well.
     
    226226}
    227227#endif
     228
    228229
    229230/**
  • trunk/src/VBox/VMM/VMMAll/TMAllVirtual.cpp

    r2611 r2744  
    184184        Assert(pVM->tm.s.fVirtualTicking);
    185185        u64 = tmVirtualGetRaw(pVM);
     186const uint64_t u64VirtualNow = u64;
    186187        if (    fCheckTimers
    187188            &&  !VM_FF_ISSET(pVM, VM_FF_TIMER)
     
    264265            ASMAtomicXchgU64(&pVM->tm.s.u64VirtualSync, u64);
    265266            ASMAtomicXchgBool(&pVM->tm.s.fVirtualSyncTicking, false);
     267pVM->tm.s.u64VirtualSyncStoppedTS = u64VirtualNow;
    266268            if (    fCheckTimers
    267269                &&  !VM_FF_ISSET(pVM, VM_FF_TIMER))
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