mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Cosmetics.
This commit is contained in:
parent
26c530a456
commit
04b78bd754
@ -963,14 +963,14 @@ ProfilerData* s_profilerData = nullptr;
|
|||||||
static ProfilerThreadData& GetProfilerThreadData();
|
static ProfilerThreadData& GetProfilerThreadData();
|
||||||
TRACY_API void StartupProfiler()
|
TRACY_API void StartupProfiler()
|
||||||
{
|
{
|
||||||
s_profilerData = (ProfilerData*)tracy_malloc( sizeof( ProfilerData ));
|
s_profilerData = (ProfilerData*)tracy_malloc( sizeof( ProfilerData ) );
|
||||||
new (s_profilerData) ProfilerData();
|
new (s_profilerData) ProfilerData();
|
||||||
s_profilerData->profiler.SpawnWorkerThreads();
|
s_profilerData->profiler.SpawnWorkerThreads();
|
||||||
GetProfilerThreadData().token = ProducerWrapper(*s_profilerData);
|
GetProfilerThreadData().token = ProducerWrapper( *s_profilerData );
|
||||||
}
|
}
|
||||||
static ProfilerData& GetProfilerData()
|
static ProfilerData& GetProfilerData()
|
||||||
{
|
{
|
||||||
assert(s_profilerData);
|
assert( s_profilerData );
|
||||||
return *s_profilerData;
|
return *s_profilerData;
|
||||||
}
|
}
|
||||||
TRACY_API void ShutdownProfiler()
|
TRACY_API void ShutdownProfiler()
|
||||||
@ -980,7 +980,7 @@ TRACY_API void ShutdownProfiler()
|
|||||||
s_profilerData = nullptr;
|
s_profilerData = nullptr;
|
||||||
rpmalloc_finalize();
|
rpmalloc_finalize();
|
||||||
RpThreadInitDone = false;
|
RpThreadInitDone = false;
|
||||||
RpInitDone.store(0, std::memory_order_release);
|
RpInitDone.store( 0, std::memory_order_release );
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
static std::atomic<int> profilerDataLock { 0 };
|
static std::atomic<int> profilerDataLock { 0 };
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user