1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Read and write whole ZoneEvent/GpuEvent data at once.

This commit is contained in:
Bartosz Taudul
2018-03-15 21:59:16 +01:00
parent e5796af196
commit 9dfa9c95cb
2 changed files with 9 additions and 24 deletions
+5 -2
View File
@@ -79,13 +79,14 @@ struct ZoneEvent
int32_t srcloc;
int8_t cpu_start;
int8_t cpu_end;
StringIdx text;
// This must be last. All above is read/saved as-is.
Vector<ZoneEvent*> child;
};
enum { ZoneEventSize = sizeof( ZoneEvent ) };
static_assert( std::is_standard_layout<ZoneEvent>::value, "ZoneEvent is not standard layout" );
struct LockEvent
{
@@ -129,10 +130,12 @@ struct GpuEvent
int64_t gpuEnd;
int32_t srcloc;
// This must be last. All above is read/saved as-is.
Vector<GpuEvent*> child;
};
enum { GpuEventSize = sizeof( GpuEvent ) };
static_assert( std::is_standard_layout<GpuEvent>::value, "GpuEvent is not standard layout" );
#pragma pack()