mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Add extra parameter to server queries.
This commit is contained in:
parent
383918bca4
commit
3e0e120222
@ -2304,10 +2304,12 @@ static bool DontExit() { return false; }
|
||||
bool Profiler::HandleServerQuery()
|
||||
{
|
||||
uint8_t type;
|
||||
if( !m_sock->Read( &type, sizeof( type ), 10, DontExit ) ) return false;
|
||||
|
||||
uint64_t ptr;
|
||||
uint32_t extra;
|
||||
|
||||
if( !m_sock->Read( &type, sizeof( type ), 10, DontExit ) ) return false;
|
||||
if( !m_sock->Read( &ptr, sizeof( ptr ), 10, DontExit ) ) return false;
|
||||
if( !m_sock->Read( &extra, sizeof( extra ), 10, DontExit ) ) return false;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
|
@ -55,6 +55,7 @@ struct ServerQueryPacket
|
||||
{
|
||||
ServerQuery type;
|
||||
uint64_t ptr;
|
||||
uint32_t extra;
|
||||
};
|
||||
|
||||
enum { ServerQueryPacketSize = sizeof( ServerQueryPacket ) };
|
||||
|
@ -2790,9 +2790,9 @@ close:
|
||||
m_connected.store( false, std::memory_order_relaxed );
|
||||
}
|
||||
|
||||
void Worker::Query( ServerQuery type, uint64_t data )
|
||||
void Worker::Query( ServerQuery type, uint64_t data, uint32_t extra )
|
||||
{
|
||||
ServerQueryPacket query { type, data };
|
||||
ServerQueryPacket query { type, data, extra };
|
||||
if( m_serverQuerySpaceLeft > 0 )
|
||||
{
|
||||
m_serverQuerySpaceLeft--;
|
||||
@ -2806,7 +2806,7 @@ void Worker::Query( ServerQuery type, uint64_t data )
|
||||
|
||||
void Worker::QueryTerminate()
|
||||
{
|
||||
ServerQueryPacket query { ServerQueryTerminate, 0 };
|
||||
ServerQueryPacket query { ServerQueryTerminate, 0, 0 };
|
||||
m_sock.Send( &query, ServerQueryPacketSize );
|
||||
}
|
||||
|
||||
|
@ -515,7 +515,7 @@ public:
|
||||
private:
|
||||
void Network();
|
||||
void Exec();
|
||||
void Query( ServerQuery type, uint64_t data );
|
||||
void Query( ServerQuery type, uint64_t data, uint32_t extra = 0 );
|
||||
void QueryTerminate();
|
||||
|
||||
tracy_force_inline bool DispatchProcess( const QueueItem& ev, const char*& ptr );
|
||||
|
Loading…
Reference in New Issue
Block a user