Add rpmalloc thread state accessor.

This commit is contained in:
Bartosz Taudul 2022-02-14 17:53:27 +01:00
parent 20680fa6a3
commit 793e6b0e29
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 4 additions and 2 deletions

View File

@ -1073,8 +1073,6 @@ std::atomic<bool> s_symbolThreadGone { false };
static Thread* s_sysTraceThread = nullptr; static Thread* s_sysTraceThread = nullptr;
#endif #endif
TRACY_API bool ProfilerAvailable() { return s_instance != nullptr; }
TRACY_API int64_t GetFrequencyQpc() TRACY_API int64_t GetFrequencyQpc()
{ {
#if defined _WIN32 #if defined _WIN32
@ -1301,6 +1299,9 @@ TRACY_API LuaZoneState& GetLuaZoneState() { return s_luaZoneState; }
# endif # endif
#endif #endif
TRACY_API bool ProfilerAvailable() { return s_instance != nullptr; }
TRACY_API bool ProfilerAllocatorAvailable() { return !RpThreadShutdown; }
Profiler::Profiler() Profiler::Profiler()
: m_timeBegin( 0 ) : m_timeBegin( 0 )
, m_mainThread( detail::GetThreadHandleImpl() ) , m_mainThread( detail::GetThreadHandleImpl() )

View File

@ -65,6 +65,7 @@ TRACY_API std::atomic<uint8_t>& GetGpuCtxCounter();
TRACY_API GpuCtxWrapper& GetGpuCtx(); TRACY_API GpuCtxWrapper& GetGpuCtx();
TRACY_API uint32_t GetThreadHandle(); TRACY_API uint32_t GetThreadHandle();
TRACY_API bool ProfilerAvailable(); TRACY_API bool ProfilerAvailable();
TRACY_API bool ProfilerAllocatorAvailable();
TRACY_API int64_t GetFrequencyQpc(); TRACY_API int64_t GetFrequencyQpc();
struct SourceLocationData struct SourceLocationData