diff --git a/server/TracyEvent.hpp b/server/TracyEvent.hpp index cb205332..a6a5c2ef 100644 --- a/server/TracyEvent.hpp +++ b/server/TracyEvent.hpp @@ -96,6 +96,80 @@ static_assert( std::numeric_limits::max() >= Max #pragma pack() + +struct MessageData +{ + int64_t time; + StringRef ref; +}; + +struct ThreadData +{ + uint64_t id; + bool showFull; + bool visible; + Vector timeline; + Vector messages; +}; + +struct LockMap +{ + uint32_t srcloc; + Vector timeline; + std::unordered_map threadMap; + std::vector threadList; + bool visible; +}; + +struct LockHighlight +{ + int64_t id; + int64_t begin; + int64_t end; + uint8_t thread; + bool blocked; +}; + +struct PlotItem +{ + int64_t time; + double val; +}; + +struct PlotData +{ + uint64_t name; + double min; + double max; + bool showFull; + bool visible; + Vector data; + Vector postpone; + uint64_t postponeTime; +}; + +struct StringLocation +{ + const char* ptr; + uint32_t idx; +}; + +struct SourceLocationHasher +{ + size_t operator()( const SourceLocation* ptr ) const + { + return charutil::hash( (const char*)ptr, sizeof( SourceLocation ) ); + } +}; + +struct SourceLocationComparator +{ + bool operator()( const SourceLocation* lhs, const SourceLocation* rhs ) const + { + return memcmp( lhs, rhs, sizeof( SourceLocation ) ) == 0; + } +}; + } #endif diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 9c54973b..39776d3c 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -902,7 +902,7 @@ void View::AddCustomString( uint64_t ptr, char* str, size_t sz ) m_pendingCustomStrings.emplace( ptr, StoreString( str, sz ) ); } -View::StringLocation View::StoreString( char* str, size_t sz ) +StringLocation View::StoreString( char* str, size_t sz ) { StringLocation ret; const char backup = str[sz]; @@ -1017,7 +1017,7 @@ void View::InsertMessageData( MessageData* msg, uint64_t thread ) } } -View::ThreadData* View::NoticeThread( uint64_t thread ) +ThreadData* View::NoticeThread( uint64_t thread ) { auto it = m_threadMap.find( thread ); if( it == m_threadMap.end() ) diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 10f71f56..51e12a0e 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -46,79 +46,6 @@ private: Short }; - struct MessageData - { - int64_t time; - StringRef ref; - }; - - struct ThreadData - { - uint64_t id; - bool showFull; - bool visible; - Vector timeline; - Vector messages; - }; - - struct LockMap - { - uint32_t srcloc; - Vector timeline; - std::unordered_map threadMap; - std::vector threadList; - bool visible; - }; - - struct LockHighlight - { - int64_t id; - int64_t begin; - int64_t end; - uint8_t thread; - bool blocked; - }; - - struct PlotItem - { - int64_t time; - double val; - }; - - struct PlotData - { - uint64_t name; - double min; - double max; - bool showFull; - bool visible; - Vector data; - Vector postpone; - uint64_t postponeTime; - }; - - struct StringLocation - { - const char* ptr; - uint32_t idx; - }; - - struct SourceLocationHasher - { - size_t operator()( const SourceLocation* ptr ) const - { - return charutil::hash( (const char*)ptr, sizeof( SourceLocation ) ); - } - }; - - struct SourceLocationComparator - { - bool operator()( const SourceLocation* lhs, const SourceLocation* rhs ) const - { - return memcmp( lhs, rhs, sizeof( SourceLocation ) ) == 0; - } - }; - void Worker(); void DispatchProcess( const QueueItem& ev, char*& ptr );