mirror of
https://github.com/wolfpld/tracy
synced 2025-04-28 20:23:51 +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 )
|
void Profiler::SendCallstack( int depth, const char* skipBefore )
|
||||||
{
|
{
|
||||||
#ifdef TRACY_HAS_CALLSTACK
|
#ifdef TRACY_HAS_CALLSTACK
|
||||||
|
TracyLfqPrepare( QueueType::Callstack );
|
||||||
auto ptr = Callstack( depth );
|
auto ptr = Callstack( depth );
|
||||||
CutCallstack( ptr, skipBefore );
|
CutCallstack( ptr, skipBefore );
|
||||||
|
|
||||||
TracyLfqPrepare( QueueType::Callstack );
|
|
||||||
MemWrite( &item->callstackFat.ptr, (uint64_t)ptr );
|
MemWrite( &item->callstackFat.ptr, (uint64_t)ptr );
|
||||||
TracyLfqCommit;
|
TracyLfqCommit;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user