mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Get LFQ item before capturing callstack.
This is to ensure that thread local structures have been properly initialized (lock-free queue buffers are thread local), as capturing callstack involves allocating memory from rpmalloc, which must be initialized in each thread before allocation.
This commit is contained in:
parent
d530472045
commit
8eb51aa01d
@ -2825,10 +2825,9 @@ void Profiler::ReportTopology()
|
||||
void Profiler::SendCallstack( int depth, const char* skipBefore )
|
||||
{
|
||||
#ifdef TRACY_HAS_CALLSTACK
|
||||
TracyLfqPrepare( QueueType::Callstack );
|
||||
auto ptr = Callstack( depth );
|
||||
CutCallstack( ptr, skipBefore );
|
||||
|
||||
TracyLfqPrepare( QueueType::Callstack );
|
||||
MemWrite( &item->callstackFat.ptr, (uint64_t)ptr );
|
||||
TracyLfqCommit;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user