mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 01:04:36 +00:00
Properly initialize data.
Unused bitbield bits and inactive string index/reference had thrash values in release builds, which prevented de-duplication of source location payloads.
This commit is contained in:
parent
e9395cd988
commit
5afdccfc46
@ -17,11 +17,12 @@ struct StringRef
|
|||||||
{
|
{
|
||||||
enum Type { Ptr, Idx };
|
enum Type { Ptr, Idx };
|
||||||
|
|
||||||
StringRef() : __data( 0 ) {}
|
StringRef() : strptr( 0 ), __data( 0 ) {}
|
||||||
StringRef( Type t, uint64_t data )
|
StringRef( Type t, uint64_t data ) : __data( 0 )
|
||||||
: isidx( t == Idx )
|
|
||||||
, active( 1 )
|
|
||||||
{
|
{
|
||||||
|
isidx = t == Idx;
|
||||||
|
active = 1;
|
||||||
|
|
||||||
if( isidx )
|
if( isidx )
|
||||||
{
|
{
|
||||||
stridx = data;
|
stridx = data;
|
||||||
@ -52,10 +53,11 @@ struct StringRef
|
|||||||
struct StringIdx
|
struct StringIdx
|
||||||
{
|
{
|
||||||
StringIdx() : __data( 0 ) {}
|
StringIdx() : __data( 0 ) {}
|
||||||
StringIdx( uint32_t idx )
|
StringIdx( uint32_t _idx ) : __data( 0 )
|
||||||
: idx( idx )
|
{
|
||||||
, active( 1 )
|
idx = _idx;
|
||||||
{}
|
active = 1;
|
||||||
|
}
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user