shared_memory_abi: Remove unused function and update comment

The fragment size is not necessarily 4 bytes long since
6e516e800c31("protozero: Pack length fields for short nested messages"):
old implementations of tracing service do not seem to have a problem
with this.

Bug: 162206162
Change-Id: If1ebb22d3f1ef553af58933c8944063ccb9f02cf
diff --git a/include/perfetto/ext/tracing/core/shared_memory_abi.h b/include/perfetto/ext/tracing/core/shared_memory_abi.h
index 4e05599..dd146ea 100644
--- a/include/perfetto/ext/tracing/core/shared_memory_abi.h
+++ b/include/perfetto/ext/tracing/core/shared_memory_abi.h
@@ -153,8 +153,10 @@
   // See PageLayout below.
   static constexpr size_t kMaxChunksPerPage = 14;
 
-  // Each TracePacket in the Chunk is prefixed by a 4 bytes redundant VarInt
-  // (see proto_utils.h) stating its size.
+  // Each TracePacket fragment in the Chunk is prefixed by a VarInt stating its
+  // size that is up to 4 bytes long. Since the size is often known after the
+  // fragment has been filled, the VarInt is often redundantly encoded (see
+  // proto_utils.h) to be exactly 4 bytes.
   static constexpr size_t kPacketHeaderSize = 4;
 
   // TraceWriter specifies this invalid packet/fragment size to signal to the
@@ -416,19 +418,6 @@
       return packets.count;
     }
 
-    // Increases |packets.count| to the given |packet_count|, but only if
-    // |packet_count| is larger than the current value of |packets.count|.
-    // Returns the new packet count. Same atomicity guarantees as
-    // IncrementPacketCount().
-    uint16_t IncreasePacketCountTo(uint16_t packet_count) {
-      ChunkHeader* chunk_header = header();
-      auto packets = chunk_header->packets.load(std::memory_order_relaxed);
-      if (packets.count < packet_count)
-        packets.count = packet_count & ChunkHeader::Packets::kMaxCount;
-      chunk_header->packets.store(packets, std::memory_order_release);
-      return packets.count;
-    }
-
     // Flags are cleared by TryAcquireChunk(), by passing the new header for
     // the chunk, or through ClearNeedsPatchingFlag.
     void SetFlag(ChunkHeader::Flags flag) {