mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Apparently sampled call stacks may be empty.
This commit is contained in:
parent
d43461584a
commit
9b8eb69886
@ -144,6 +144,8 @@ void WINAPI EventRecordCallback( PEVENT_RECORD record )
|
||||
if( sw->stackProcess == s_pid && ( sw->stack[0] & 0x8000000000000000 ) == 0 )
|
||||
{
|
||||
const uint64_t sz = ( record->UserDataLength - 16 ) / 8;
|
||||
if( sz > 0 )
|
||||
{
|
||||
auto trace = (uint64_t*)tracy_malloc( ( 1 + sz ) * sizeof( uint64_t ) );
|
||||
memcpy( trace, &sz, sizeof( uint64_t ) );
|
||||
memcpy( trace+1, sw->stack, sizeof( uint64_t ) * sz );
|
||||
@ -154,6 +156,7 @@ void WINAPI EventRecordCallback( PEVENT_RECORD record )
|
||||
TracyLfqCommit;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user