Browse Source

pstats: Actually support large frames (remove check)

Fixes #1574
rdb 3 months ago
parent
commit
d63f708e2c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      panda/src/pstatclient/pStatFrameData.cxx

+ 2 - 2
panda/src/pstatclient/pStatFrameData.cxx

@@ -34,7 +34,7 @@ sort_time() {
  */
  */
 bool PStatFrameData::
 bool PStatFrameData::
 write_datagram(Datagram &destination, PStatClient *client) const {
 write_datagram(Datagram &destination, PStatClient *client) const {
-  if (_time_data.size() >= 65536 || _level_data.size() >= 65536) {
+  if (_time_data.size() >= INT_MAX || _level_data.size() >= INT_MAX) {
     pstats_cat.info()
     pstats_cat.info()
       << "Dropping frame with " << _time_data.size()
       << "Dropping frame with " << _time_data.size()
       << " time measurements and " << _level_data.size()
       << " time measurements and " << _level_data.size()
@@ -63,7 +63,7 @@ write_datagram(Datagram &destination, PStatClient *client) const {
     ptr += 2;
     ptr += 2;
   }
   }
 
 
-  *(uint32_t *)ptr = __builtin_bswap16(_level_data.size());
+  *(uint32_t *)ptr = __builtin_bswap32(_level_data.size());
   ptr += 2;
   ptr += 2;
 
 
   for (const DataPoint &dp : _level_data) {
   for (const DataPoint &dp : _level_data) {