mirror of
https://github.com/wolfpld/tracy
synced 2025-05-01 13:13:53 +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 );
|
assert( head > tail );
|
||||||
hadData = true;
|
hadData = true;
|
||||||
|
|
||||||
|
const auto id = ring.GetId();
|
||||||
|
assert( id != EventContextSwitch );
|
||||||
|
|
||||||
const auto end = head - tail;
|
const auto end = head - tail;
|
||||||
uint64_t pos = 0;
|
uint64_t pos = 0;
|
||||||
while( pos < end )
|
while( pos < end )
|
||||||
@ -1157,8 +1160,6 @@ void SysTraceWorker( void* ptr )
|
|||||||
if( hdr.type == PERF_RECORD_SAMPLE )
|
if( hdr.type == PERF_RECORD_SAMPLE )
|
||||||
{
|
{
|
||||||
auto offset = pos + sizeof( perf_event_header );
|
auto offset = pos + sizeof( perf_event_header );
|
||||||
const auto id = ring.GetId();
|
|
||||||
assert( id != EventContextSwitch );
|
|
||||||
if( id == EventCallstack )
|
if( id == EventCallstack )
|
||||||
{
|
{
|
||||||
// Layout:
|
// Layout:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user