mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Combine ContextSwitchData writes.
This commit is contained in:
parent
d96fcc95c2
commit
54573fb970
@ -382,6 +382,9 @@ struct ContextSwitchData
|
||||
tracy_force_inline int64_t WakeupVal() const { return _wakeup.Val(); }
|
||||
tracy_force_inline void SetWakeup( int64_t wakeup ) { assert( wakeup < (int64_t)( 1ull << 47 ) ); _wakeup.SetVal( wakeup ); }
|
||||
|
||||
tracy_force_inline void SetStartCpu( int64_t start, uint8_t cpu ) { assert( start < (int64_t)( 1ull << 47 ) ); _start_cpu = ( uint64_t( start ) << 16 ) | cpu; }
|
||||
tracy_force_inline void SetEndReasonState( int64_t end, int8_t reason, int8_t state ) { assert( end < (int64_t)( 1ull << 47 ) ); _end_reason_state = ( uint64_t( end ) << 16 ) | ( uint64_t( reason ) << 8 ) | uint8_t( state ); }
|
||||
|
||||
uint64_t _start_cpu;
|
||||
uint64_t _end_reason_state;
|
||||
Int48 _wakeup;
|
||||
|
@ -1497,13 +1497,10 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
|
||||
refTime += deltaWakeup;
|
||||
ptr->SetWakeup( refTime );
|
||||
refTime += deltaStart;
|
||||
ptr->SetStart( refTime );
|
||||
ptr->SetStartCpu( refTime, cpu );
|
||||
if( diff > 0 ) runningTime += diff;
|
||||
refTime += diff;
|
||||
ptr->SetEnd( refTime );
|
||||
ptr->SetCpu( cpu );
|
||||
ptr->SetReason( reason );
|
||||
ptr->SetState( state );
|
||||
ptr->SetEndReasonState( refTime, reason, state );
|
||||
ptr++;
|
||||
}
|
||||
data->runningTime = runningTime;
|
||||
|
Loading…
Reference in New Issue
Block a user