mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Move ring identifier extraction out of loop.
This commit is contained in:
parent
49844872e6
commit
145e3e213a
@ -1148,6 +1148,9 @@ void SysTraceWorker( void* ptr )
|
||||
assert( head > tail );
|
||||
hadData = true;
|
||||
|
||||
const auto id = ring.GetId();
|
||||
assert( id != EventContextSwitch );
|
||||
|
||||
const auto end = head - tail;
|
||||
uint64_t pos = 0;
|
||||
while( pos < end )
|
||||
@ -1157,8 +1160,6 @@ void SysTraceWorker( void* ptr )
|
||||
if( hdr.type == PERF_RECORD_SAMPLE )
|
||||
{
|
||||
auto offset = pos + sizeof( perf_event_header );
|
||||
const auto id = ring.GetId();
|
||||
assert( id != EventContextSwitch );
|
||||
if( id == EventCallstack )
|
||||
{
|
||||
// Layout:
|
||||
|
Loading…
Reference in New Issue
Block a user