feat add tracy profiler
Some checks failed
cpp-template / build (Debug, aarch64-linux-gnu) (push) Failing after 27s
cpp-template / build (Release, mipsel-linux-gnu) (push) Failing after 12m45s
cpp-template / build (Release, host.gcc) (push) Failing after 12m52s
cpp-template / build (Release, arm-linux-gnueabihf) (push) Failing after 12m55s
cpp-template / build (Release, aarch64-linux-gnu) (push) Failing after 13m1s
cpp-template / build (Debug, mipsel-linux-gnu) (push) Failing after 13m6s
cpp-template / build (Debug, host.gcc) (push) Failing after 13m11s
cpp-template / build (Debug, arm-linux-gnueabihf) (push) Failing after 13m19s
Some checks failed
cpp-template / build (Debug, aarch64-linux-gnu) (push) Failing after 27s
cpp-template / build (Release, mipsel-linux-gnu) (push) Failing after 12m45s
cpp-template / build (Release, host.gcc) (push) Failing after 12m52s
cpp-template / build (Release, arm-linux-gnueabihf) (push) Failing after 12m55s
cpp-template / build (Release, aarch64-linux-gnu) (push) Failing after 13m1s
cpp-template / build (Debug, mipsel-linux-gnu) (push) Failing after 13m6s
cpp-template / build (Debug, host.gcc) (push) Failing after 13m11s
cpp-template / build (Debug, arm-linux-gnueabihf) (push) Failing after 13m19s
This commit is contained in:
@@ -9,7 +9,7 @@ namespace tracy
|
||||
|
||||
constexpr unsigned Lz4CompressBound( unsigned isize ) { return isize + ( isize / 255 ) + 16; }
|
||||
|
||||
enum : uint32_t { ProtocolVersion = 74 };
|
||||
enum : uint32_t { ProtocolVersion = 76 };
|
||||
enum : uint16_t { BroadcastVersion = 3 };
|
||||
|
||||
using lz4sz_t = uint32_t;
|
||||
@@ -95,7 +95,6 @@ struct WelcomeMessage
|
||||
double timerMul;
|
||||
int64_t initBegin;
|
||||
int64_t initEnd;
|
||||
uint64_t delay;
|
||||
uint64_t resolution;
|
||||
uint64_t epoch;
|
||||
uint64_t exectime;
|
||||
|
||||
35
third_party/tracy/public/common/TracyQueue.hpp
vendored
35
third_party/tracy/public/common/TracyQueue.hpp
vendored
@@ -61,6 +61,7 @@ enum class QueueType : uint8_t
|
||||
ThreadWakeup,
|
||||
GpuTime,
|
||||
GpuContextName,
|
||||
GpuAnnotationName,
|
||||
CallstackFrameSize,
|
||||
SymbolInformation,
|
||||
ExternalNameMetadata,
|
||||
@@ -111,6 +112,7 @@ enum class QueueType : uint8_t
|
||||
SecondStringData,
|
||||
MemNamePayload,
|
||||
ThreadGroupHint,
|
||||
GpuZoneAnnotation,
|
||||
StringData,
|
||||
ThreadName,
|
||||
PlotName,
|
||||
@@ -331,7 +333,7 @@ struct QueuePlotDataInt : public QueuePlotDataBase
|
||||
int64_t val;
|
||||
};
|
||||
|
||||
struct QueuePlotDataFloat : public QueuePlotDataBase
|
||||
struct QueuePlotDataFloat : public QueuePlotDataBase
|
||||
{
|
||||
float val;
|
||||
};
|
||||
@@ -406,7 +408,8 @@ enum class GpuContextType : uint8_t
|
||||
Direct3D11,
|
||||
Metal,
|
||||
Custom,
|
||||
CUDA
|
||||
CUDA,
|
||||
Rocprof
|
||||
};
|
||||
|
||||
enum GpuContextFlags : uint8_t
|
||||
@@ -446,6 +449,15 @@ struct QueueGpuZoneEnd
|
||||
uint8_t context;
|
||||
};
|
||||
|
||||
struct QueueGpuZoneAnnotation
|
||||
{
|
||||
int64_t noteId;
|
||||
double value;
|
||||
uint32_t thread;
|
||||
uint16_t queryId;
|
||||
uint8_t context;
|
||||
};
|
||||
|
||||
struct QueueGpuTime
|
||||
{
|
||||
int64_t gpuTime;
|
||||
@@ -467,7 +479,7 @@ struct QueueGpuTimeSync
|
||||
int64_t cpuTime;
|
||||
uint8_t context;
|
||||
};
|
||||
|
||||
|
||||
struct QueueGpuContextName
|
||||
{
|
||||
uint8_t context;
|
||||
@@ -479,6 +491,18 @@ struct QueueGpuContextNameFat : public QueueGpuContextName
|
||||
uint16_t size;
|
||||
};
|
||||
|
||||
struct QueueGpuAnnotationName
|
||||
{
|
||||
int64_t noteId;
|
||||
uint8_t context;
|
||||
};
|
||||
|
||||
struct QueueGpuAnnotationNameFat : public QueueGpuAnnotationName
|
||||
{
|
||||
uint64_t ptr;
|
||||
uint16_t size;
|
||||
};
|
||||
|
||||
struct QueueMemNamePayload
|
||||
{
|
||||
uint64_t name;
|
||||
@@ -756,6 +780,8 @@ struct QueueItem
|
||||
QueueGpuTimeSync gpuTimeSync;
|
||||
QueueGpuContextName gpuContextName;
|
||||
QueueGpuContextNameFat gpuContextNameFat;
|
||||
QueueGpuAnnotationName gpuAnnotationName;
|
||||
QueueGpuAnnotationNameFat gpuAnnotationNameFat;
|
||||
QueueMemAlloc memAlloc;
|
||||
QueueMemFree memFree;
|
||||
QueueMemDiscard memDiscard;
|
||||
@@ -789,6 +815,7 @@ struct QueueItem
|
||||
QueueSourceCodeNotAvailable sourceCodeNotAvailable;
|
||||
QueueFiberEnter fiberEnter;
|
||||
QueueFiberLeave fiberLeave;
|
||||
QueueGpuZoneAnnotation zoneAnnotation;
|
||||
};
|
||||
};
|
||||
#pragma pack( pop )
|
||||
@@ -849,6 +876,7 @@ static constexpr size_t QueueDataSize[] = {
|
||||
sizeof( QueueHeader ) + sizeof( QueueThreadWakeup ),
|
||||
sizeof( QueueHeader ) + sizeof( QueueGpuTime ),
|
||||
sizeof( QueueHeader ) + sizeof( QueueGpuContextName ),
|
||||
sizeof( QueueHeader ) + sizeof( QueueGpuAnnotationName ),
|
||||
sizeof( QueueHeader ) + sizeof( QueueCallstackFrameSize ),
|
||||
sizeof( QueueHeader ) + sizeof( QueueSymbolInformation ),
|
||||
sizeof( QueueHeader ), // ExternalNameMetadata - not for wire transfer
|
||||
@@ -900,6 +928,7 @@ static constexpr size_t QueueDataSize[] = {
|
||||
sizeof( QueueHeader ), // second string data
|
||||
sizeof( QueueHeader ) + sizeof( QueueMemNamePayload ),
|
||||
sizeof( QueueHeader ) + sizeof( QueueThreadGroupHint ),
|
||||
sizeof( QueueHeader ) + sizeof( QueueGpuZoneAnnotation ), // GPU zone annotation
|
||||
// keep all QueueStringTransfer below
|
||||
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // string data
|
||||
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // thread name
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# include <malloc.h>
|
||||
# include "TracyUwp.hpp"
|
||||
# include "TracyWinFamily.hpp"
|
||||
#else
|
||||
# include <pthread.h>
|
||||
# include <string.h>
|
||||
@@ -137,7 +137,7 @@ TRACY_API void SetThreadName( const char* name )
|
||||
TRACY_API void SetThreadNameWithHint( const char* name, int32_t groupHint )
|
||||
{
|
||||
#if defined _WIN32
|
||||
# ifdef TRACY_UWP
|
||||
# if defined TRACY_WIN32_NO_DESKTOP
|
||||
static auto _SetThreadDescription = &::SetThreadDescription;
|
||||
# else
|
||||
static auto _SetThreadDescription = (t_SetThreadDescription)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "SetThreadDescription" );
|
||||
@@ -246,7 +246,7 @@ TRACY_API const char* GetThreadName( uint32_t id )
|
||||
#endif
|
||||
|
||||
#if defined _WIN32
|
||||
# ifdef TRACY_UWP
|
||||
# if defined TRACY_WIN32_NO_DESKTOP
|
||||
static auto _GetThreadDescription = &::GetThreadDescription;
|
||||
# else
|
||||
static auto _GetThreadDescription = (t_GetThreadDescription)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "GetThreadDescription" );
|
||||
|
||||
11
third_party/tracy/public/common/TracyUwp.hpp
vendored
11
third_party/tracy/public/common/TracyUwp.hpp
vendored
@@ -1,11 +0,0 @@
|
||||
#ifndef __TRACYUWP_HPP__
|
||||
#define __TRACYUWP_HPP__
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <winapifamily.h>
|
||||
# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
# define TRACY_UWP
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -7,7 +7,7 @@ namespace Version
|
||||
{
|
||||
enum { Major = 0 };
|
||||
enum { Minor = 12 };
|
||||
enum { Patch = 2 };
|
||||
enum { Patch = 4 };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
16
third_party/tracy/public/common/TracyWinFamily.hpp
vendored
Normal file
16
third_party/tracy/public/common/TracyWinFamily.hpp
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef __TRACYWINFAMILY_HPP__
|
||||
#define __TRACYWINFAMILY_HPP__
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <winapifamily.h>
|
||||
# if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
# define TRACY_WIN32_NO_DESKTOP
|
||||
# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_GAMES)
|
||||
# define TRACY_GDK
|
||||
# elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
|
||||
# define TRACY_UWP
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user