mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Store pointers as uint64.
Pointers can't be stored as pointers, as that would cause mismatch in wire protocol between 32 and 64 bit builds.
This commit is contained in:
parent
e8d64de5c1
commit
997f0c64c3
@ -18,8 +18,8 @@ enum class QueueType : uint8_t
|
|||||||
struct QueueZoneBegin
|
struct QueueZoneBegin
|
||||||
{
|
{
|
||||||
uint64_t id;
|
uint64_t id;
|
||||||
const char* filename;
|
uint64_t filename; // ptr
|
||||||
const char* function;
|
uint64_t function; // ptr
|
||||||
uint32_t line;
|
uint32_t line;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -54,6 +54,7 @@ static const size_t QueueDataSize[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static_assert( sizeof( QueueDataSize ) / sizeof( size_t ) == (uint8_t)QueueType::NUM_TYPES, "QueueDataSize mismatch" );
|
static_assert( sizeof( QueueDataSize ) / sizeof( size_t ) == (uint8_t)QueueType::NUM_TYPES, "QueueDataSize mismatch" );
|
||||||
|
static_assert( sizeof( void* ) <= sizeof( uint64_t ), "Pointer size > 8 bytes" );
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ public:
|
|||||||
ScopedZone( const char* file, const char* function, uint32_t line )
|
ScopedZone( const char* file, const char* function, uint32_t line )
|
||||||
: m_id( Profiler::GetNewId() )
|
: m_id( Profiler::GetNewId() )
|
||||||
{
|
{
|
||||||
Profiler::ZoneBegin( QueueZoneBegin { m_id, file, function, line } );
|
Profiler::ZoneBegin( QueueZoneBegin { m_id, (uint64_t)file, (uint64_t)function, line } );
|
||||||
}
|
}
|
||||||
|
|
||||||
~ScopedZone()
|
~ScopedZone()
|
||||||
|
Loading…
Reference in New Issue
Block a user