mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Combine ContextSwitchCpu writes.
This commit is contained in:
parent
54573fb970
commit
c5dbd749e7
@ -403,6 +403,8 @@ struct ContextSwitchCpu
|
|||||||
tracy_force_inline uint16_t Thread() const { return uint16_t( _start_thread ); }
|
tracy_force_inline uint16_t Thread() const { return uint16_t( _start_thread ); }
|
||||||
tracy_force_inline void SetThread( uint16_t thread ) { memcpy( &_start_thread, &thread, 2 ); }
|
tracy_force_inline void SetThread( uint16_t thread ) { memcpy( &_start_thread, &thread, 2 ); }
|
||||||
|
|
||||||
|
tracy_force_inline void SetStartThread( int64_t start, uint16_t thread ) { assert( start < (int64_t)( 1ull << 47 ) ); _start_thread = ( uint64_t( start ) << 16 ) | thread; }
|
||||||
|
|
||||||
uint64_t _start_thread;
|
uint64_t _start_thread;
|
||||||
Int48 _end;
|
Int48 _end;
|
||||||
};
|
};
|
||||||
|
@ -1543,10 +1543,9 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
|
|||||||
uint16_t thread;
|
uint16_t thread;
|
||||||
f.Read3( deltaStart, deltaEnd, thread );
|
f.Read3( deltaStart, deltaEnd, thread );
|
||||||
refTime += deltaStart;
|
refTime += deltaStart;
|
||||||
ptr->SetStart( refTime );
|
ptr->SetStartThread( refTime, thread );
|
||||||
refTime += deltaEnd;
|
refTime += deltaEnd;
|
||||||
ptr->SetEnd( refTime );
|
ptr->SetEnd( refTime );
|
||||||
ptr->SetThread( thread );
|
|
||||||
ptr++;
|
ptr++;
|
||||||
}
|
}
|
||||||
cnt += sz;
|
cnt += sz;
|
||||||
|
Loading…
Reference in New Issue
Block a user