mirror of
https://github.com/wolfpld/tracy.git
synced 2026-08-23 03:28:23 +00:00
Prevent inlining next block preparation.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "common/TracySocket.cpp"
|
||||
#include "client/tracy_rpmalloc.cpp"
|
||||
#include "client/TracyDxt1.cpp"
|
||||
#include "client/TracyLfq.cpp"
|
||||
|
||||
#if TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 3 || TRACY_HAS_CALLSTACK == 4 || TRACY_HAS_CALLSTACK == 6
|
||||
# include "libbacktrace/alloc.cpp"
|
||||
|
||||
20
client/TracyLfq.cpp
Normal file
20
client/TracyLfq.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "TracyLfq.hpp"
|
||||
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
LfqBlock* LfqProducerImpl::NextBlock( LfqBlock* tailBlk )
|
||||
{
|
||||
auto next = m_queue->GetFreeBlock();
|
||||
assert( next );
|
||||
assert( next->next.load() == nullptr );
|
||||
assert( tailBlk->next.load() == nullptr );
|
||||
next->thread = m_thread;
|
||||
tailBlk->next.store( next );
|
||||
m_tail.store( next );
|
||||
lfq_dataEnd = next->dataEnd;
|
||||
lfq_tail = &next->tail;
|
||||
return next;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
return tail;
|
||||
}
|
||||
|
||||
inline LfqBlock* NextBlock( LfqBlock* tailBlk );
|
||||
tracy_no_inline LfqBlock* NextBlock( LfqBlock* tailBlk );
|
||||
|
||||
std::atomic<LfqProducerImpl*> m_next;
|
||||
std::atomic<bool> m_active, m_available;
|
||||
@@ -346,21 +346,6 @@ tracy_force_inline void LfqProducerImpl::CleanupThread()
|
||||
m_queue->ReleaseBlocks( blk );
|
||||
}
|
||||
|
||||
inline LfqBlock* LfqProducerImpl::NextBlock( LfqBlock* tailBlk )
|
||||
{
|
||||
auto next = m_queue->GetFreeBlock();
|
||||
assert( next );
|
||||
assert( next->next.load() == nullptr );
|
||||
assert( tailBlk->next.load() == nullptr );
|
||||
next->thread = m_thread;
|
||||
tailBlk->next.store( next );
|
||||
m_tail.store( next );
|
||||
lfq_dataEnd = next->dataEnd;
|
||||
lfq_tail = &next->tail;
|
||||
return next;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user