mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Add SPSC symbol queue.
This commit is contained in:
parent
f2b0aadedc
commit
b4cfb1f2d5
@ -1289,6 +1289,7 @@ Profiler::Profiler()
|
||||
, m_fiQueue( 16 )
|
||||
, m_fiDequeue( 16 )
|
||||
#endif
|
||||
, m_symbolQueue( 64*1024 )
|
||||
, m_frameCount( 0 )
|
||||
, m_isConnected( false )
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <time.h>
|
||||
|
||||
#include "tracy_concurrentqueue.h"
|
||||
#include "tracy_readerwriterqueue.h"
|
||||
#include "TracyCallstack.hpp"
|
||||
#include "TracySysTime.hpp"
|
||||
#include "TracyFastVector.hpp"
|
||||
@ -139,6 +140,20 @@ class Profiler
|
||||
bool flip;
|
||||
};
|
||||
|
||||
enum class SymbolQueueItemType
|
||||
{
|
||||
CallstackFrame,
|
||||
SymbolQuery,
|
||||
CodeLocation,
|
||||
ExternalName
|
||||
};
|
||||
|
||||
struct SymbolQueueItem
|
||||
{
|
||||
SymbolQueueItemType type;
|
||||
uint64_t ptr;
|
||||
};
|
||||
|
||||
public:
|
||||
Profiler();
|
||||
~Profiler();
|
||||
@ -813,6 +828,8 @@ private:
|
||||
TracyMutex m_fiLock;
|
||||
#endif
|
||||
|
||||
ReaderWriterQueue<SymbolQueueItem> m_symbolQueue;
|
||||
|
||||
std::atomic<uint64_t> m_frameCount;
|
||||
std::atomic<bool> m_isConnected;
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
|
Loading…
Reference in New Issue
Block a user