mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Add checker for profiler availability.
This commit is contained in:
parent
cf8620b956
commit
530e464347
@ -863,7 +863,7 @@ static void CrashHandler( int signal, siginfo_t* info, void* /*ucontext*/ )
|
|||||||
|
|
||||||
enum { QueuePrealloc = 256 * 1024 };
|
enum { QueuePrealloc = 256 * 1024 };
|
||||||
|
|
||||||
static Profiler* s_instance;
|
static Profiler* s_instance = nullptr;
|
||||||
static Thread* s_thread;
|
static Thread* s_thread;
|
||||||
static Thread* s_compressThread;
|
static Thread* s_compressThread;
|
||||||
|
|
||||||
@ -871,6 +871,8 @@ static Thread* s_compressThread;
|
|||||||
static Thread* s_sysTraceThread = nullptr;
|
static Thread* s_sysTraceThread = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
TRACY_API bool ProfilerAvailable() { return s_instance != nullptr; }
|
||||||
|
|
||||||
#ifdef TRACY_DELAYED_INIT
|
#ifdef TRACY_DELAYED_INIT
|
||||||
struct ThreadNameData;
|
struct ThreadNameData;
|
||||||
TRACY_API moodycamel::ConcurrentQueue<QueueItem>& GetQueue();
|
TRACY_API moodycamel::ConcurrentQueue<QueueItem>& GetQueue();
|
||||||
|
@ -59,6 +59,7 @@ TRACY_API std::atomic<uint8_t>& GetGpuCtxCounter();
|
|||||||
TRACY_API GpuCtxWrapper& GetGpuCtx();
|
TRACY_API GpuCtxWrapper& GetGpuCtx();
|
||||||
TRACY_API uint64_t GetThreadHandle();
|
TRACY_API uint64_t GetThreadHandle();
|
||||||
TRACY_API void InitRPMallocThread();
|
TRACY_API void InitRPMallocThread();
|
||||||
|
TRACY_API bool ProfilerAvailable();
|
||||||
|
|
||||||
struct SourceLocationData
|
struct SourceLocationData
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user