diff options
author | Bartosz Taudul <wolf@nereid.pl> | 2022-04-18 14:39:49 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf@nereid.pl> | 2022-04-18 14:39:49 +0300 |
commit | 95187c94e94c46214cb56e480f92fbaa40fbdcc0 (patch) | |
tree | 3e2079175cfa8284b4ab24340a311c67c9872c22 | |
parent | cd3f9c8831342af6670e200ccd2f365842602abf (diff) |
Bump protocol to simplify IsQueryPrio().
-rw-r--r-- | common/TracyProtocol.hpp | 11 | ||||
-rw-r--r-- | server/TracyWorker.cpp | 10 |
2 files changed, 7 insertions, 14 deletions
diff --git a/common/TracyProtocol.hpp b/common/TracyProtocol.hpp index a647b031..dc2df5f0 100644 --- a/common/TracyProtocol.hpp +++ b/common/TracyProtocol.hpp @@ -9,7 +9,7 @@ namespace tracy 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 }; using lz4sz_t = uint32_t; @@ -44,18 +44,19 @@ enum ServerQuery : uint8_t ServerQueryThreadString, ServerQuerySourceLocation, ServerQueryPlotName, - ServerQueryCallstackFrame, ServerQueryFrameName, + ServerQueryParameter, + ServerQueryFiberName, + // Items above are high priority. Split order must be preserved. See IsQueryPrio(). ServerQueryDisconnect, + ServerQueryCallstackFrame, ServerQueryExternalName, - ServerQueryParameter, ServerQuerySymbol, ServerQuerySymbolCode, ServerQueryCodeLocation, ServerQuerySourceCode, ServerQueryDataTransfer, - ServerQueryDataTransferPart, - ServerQueryFiberName + ServerQueryDataTransferPart }; struct ServerQueryPacket diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index d9967a93..552432b3 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -254,17 +254,9 @@ static uint64_t ReadHwSampleVec( FileRead& f, SortedVector<Int48, Int48Sort>& ve return sz; } -// Should be just a simple comparison. Do this when protocol version changes. static bool IsQueryPrio( ServerQuery type ) { - return - type == ServerQuery::ServerQueryString || - type == ServerQuery::ServerQueryThreadString || - type == ServerQuery::ServerQuerySourceLocation || - type == ServerQuery::ServerQueryPlotName || - type == ServerQuery::ServerQueryFrameName || - type == ServerQuery::ServerQueryParameter || - type == ServerQuery::ServerQueryFiberName; + return type < ServerQuery::ServerQueryDisconnect; } |