Bump protocol to simplify IsQueryPrio().

This commit is contained in:
Bartosz Taudul 2022-04-18 13:39:49 +02:00
parent cd3f9c8831
commit 95187c94e9
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 8 additions and 15 deletions

View File

@ -9,7 +9,7 @@ namespace tracy
constexpr unsigned Lz4CompressBound( unsigned isize ) { return isize + ( isize / 255 ) + 16; } constexpr unsigned Lz4CompressBound( unsigned isize ) { return isize + ( isize / 255 ) + 16; }
enum : uint32_t { ProtocolVersion = 55 }; enum : uint32_t { ProtocolVersion = 56 };
enum : uint16_t { BroadcastVersion = 2 }; enum : uint16_t { BroadcastVersion = 2 };
using lz4sz_t = uint32_t; using lz4sz_t = uint32_t;
@ -44,18 +44,19 @@ enum ServerQuery : uint8_t
ServerQueryThreadString, ServerQueryThreadString,
ServerQuerySourceLocation, ServerQuerySourceLocation,
ServerQueryPlotName, ServerQueryPlotName,
ServerQueryCallstackFrame,
ServerQueryFrameName, ServerQueryFrameName,
ServerQueryDisconnect,
ServerQueryExternalName,
ServerQueryParameter, ServerQueryParameter,
ServerQueryFiberName,
// Items above are high priority. Split order must be preserved. See IsQueryPrio().
ServerQueryDisconnect,
ServerQueryCallstackFrame,
ServerQueryExternalName,
ServerQuerySymbol, ServerQuerySymbol,
ServerQuerySymbolCode, ServerQuerySymbolCode,
ServerQueryCodeLocation, ServerQueryCodeLocation,
ServerQuerySourceCode, ServerQuerySourceCode,
ServerQueryDataTransfer, ServerQueryDataTransfer,
ServerQueryDataTransferPart, ServerQueryDataTransferPart
ServerQueryFiberName
}; };
struct ServerQueryPacket struct ServerQueryPacket

View File

@ -254,17 +254,9 @@ static uint64_t ReadHwSampleVec( FileRead& f, SortedVector<Int48, Int48Sort>& ve
return sz; return sz;
} }
// Should be just a simple comparison. Do this when protocol version changes.
static bool IsQueryPrio( ServerQuery type ) static bool IsQueryPrio( ServerQuery type )
{ {
return return type < ServerQuery::ServerQueryDisconnect;
type == ServerQuery::ServerQueryString ||
type == ServerQuery::ServerQueryThreadString ||
type == ServerQuery::ServerQuerySourceLocation ||
type == ServerQuery::ServerQueryPlotName ||
type == ServerQuery::ServerQueryFrameName ||
type == ServerQuery::ServerQueryParameter ||
type == ServerQuery::ServerQueryFiberName;
} }