mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Move structs out of TracyView.
This commit is contained in:
parent
8868cad7b1
commit
ce35009c63
@ -96,6 +96,80 @@ static_assert( std::numeric_limits<decltype(LockEvent::lockCount)>::max() >= Max
|
||||
|
||||
#pragma pack()
|
||||
|
||||
|
||||
struct MessageData
|
||||
{
|
||||
int64_t time;
|
||||
StringRef ref;
|
||||
};
|
||||
|
||||
struct ThreadData
|
||||
{
|
||||
uint64_t id;
|
||||
bool showFull;
|
||||
bool visible;
|
||||
Vector<ZoneEvent*> timeline;
|
||||
Vector<MessageData*> messages;
|
||||
};
|
||||
|
||||
struct LockMap
|
||||
{
|
||||
uint32_t srcloc;
|
||||
Vector<LockEvent*> timeline;
|
||||
std::unordered_map<uint64_t, uint8_t> threadMap;
|
||||
std::vector<uint64_t> 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<PlotItem*> data;
|
||||
Vector<PlotItem*> 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
|
||||
|
@ -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() )
|
||||
|
@ -46,79 +46,6 @@ private:
|
||||
Short
|
||||
};
|
||||
|
||||
struct MessageData
|
||||
{
|
||||
int64_t time;
|
||||
StringRef ref;
|
||||
};
|
||||
|
||||
struct ThreadData
|
||||
{
|
||||
uint64_t id;
|
||||
bool showFull;
|
||||
bool visible;
|
||||
Vector<ZoneEvent*> timeline;
|
||||
Vector<MessageData*> messages;
|
||||
};
|
||||
|
||||
struct LockMap
|
||||
{
|
||||
uint32_t srcloc;
|
||||
Vector<LockEvent*> timeline;
|
||||
std::unordered_map<uint64_t, uint8_t> threadMap;
|
||||
std::vector<uint64_t> 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<PlotItem*> data;
|
||||
Vector<PlotItem*> 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 );
|
||||
|
Loading…
Reference in New Issue
Block a user