VirtualBox

Changeset 87814 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
Feb 19, 2021 10:03:56 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
142875
Message:

VMM/TM: Eliminated the enmClock member from TMTIMER, we'll be using TMTIMERQUEUE::enmClock instead since the queue is always handy. bugref:9943

Location:
trunk/src/VBox/VMM/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/TMInline.h

    r87813 r87814  
    141141#ifdef VBOX_STRICT
    142142    TMTIMERSTATE const enmState = pTimer->enmState;
    143     Assert(  pTimer->enmClock == TMCLOCK_VIRTUAL_SYNC
     143    Assert(  pQueue->enmClock == TMCLOCK_VIRTUAL_SYNC
    144144           ? enmState == TMTIMERSTATE_ACTIVE
    145145           : enmState == TMTIMERSTATE_PENDING_SCHEDULE || enmState == TMTIMERSTATE_PENDING_STOP_SCHEDULE);
  • trunk/src/VBox/VMM/include/TMInternal.h

    r87813 r87814  
    136136    /** Expire time. */
    137137    volatile uint64_t       u64Expire;
    138     /** Clock to apply to u64Expire. */
    139     TMCLOCK                 enmClock;
     138
     139    /** Timer state. */
     140    volatile TMTIMERSTATE   enmState;
     141    /** The index of the next next timer in the schedule list. */
     142    uint32_t volatile       idxScheduleNext;
     143
     144    /** The index of the next timer in the chain. */
     145    uint32_t                idxNext;
     146    /** The index of the previous timer in the chain. */
     147    uint32_t                idxPrev;
     148
     149    /** The timer frequency hint.  This is 0 if not hint was given. */
     150    uint32_t volatile       uHzHint;
    140151    /** Timer callback type. */
    141152    TMTIMERTYPE             enmType;
     153
     154    /** It's own handle value. */
     155    TMTIMERHANDLE           hSelf;
     156    /** TMTIMER_FLAGS_XXX.   */
     157    uint32_t                fFlags;
     158    /** Explicit alignment padding. */
     159    uint32_t                u32Alignment;
     160
     161    /** User argument. */
     162    RTR3PTR                 pvUser;
     163    /** The critical section associated with the lock. */
     164    R3PTRTYPE(PPDMCRITSECT) pCritSect;
     165
     166    /* new cache line (64-bit / 64 bytes) */
     167
    142168    /** Type specific data. */
    143169    union
     
    178204    } u;
    179205
    180     /** Timer state. */
    181     volatile TMTIMERSTATE   enmState;
    182     /** The index of the next next timer in the schedule list. */
    183     uint32_t volatile       idxScheduleNext;
    184 
    185     /** The index of the next timer in the chain. */
    186     uint32_t                idxNext;
    187     /** The index of the previous timer in the chain. */
    188     uint32_t                idxPrev;
    189 
    190     /** It's own handle value. */
    191     TMTIMERHANDLE           hSelf;
    192     /** TMTIMER_FLAGS_XXX.   */
    193     uint32_t                fFlags;
    194     /** The timer frequency hint.  This is 0 if not hint was given. */
    195     uint32_t volatile       uHzHint;
    196 
    197     /** User argument. */
    198     RTR3PTR                 pvUser;
    199     /** The critical section associated with the lock. */
    200     R3PTRTYPE(PPDMCRITSECT) pCritSect;
    201 
    202206    /** The timer name. */
    203207    char                    szName[32];
    204208
    205 #ifdef VBOX_WITH_STATISTICS
     209    /** @todo think of two useful release statistics counters here to fill up the
     210     *        cache line. */
     211#ifndef VBOX_WITH_STATISTICS
     212    uint64_t                auAlignment2[2];
     213#else
    206214    STAMPROFILE             StatTimer;
    207215    STAMPROFILE             StatCritSectEnter;
     
    210218    STAMCOUNTER             StatSetRelative;
    211219    STAMCOUNTER             StatStop;
     220    uint64_t                auAlignment2[6];
    212221#endif
    213222} TMTIMER;
     223AssertCompileMemberSize(TMTIMER, u64Expire, sizeof(uint64_t));
    214224AssertCompileMemberSize(TMTIMER, enmState, sizeof(uint32_t));
     225AssertCompileSizeAlignment(TMTIMER, 64);
    215226
    216227
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