)]}'
{
  "commit": "811264e77c67392f600192a817118afeda3a0de5",
  "tree": "3e07cec67db060733555795b0fafe8377ea15b63",
  "parents": [
    "7464a8f9f2322ce6191894b7823c4ee6e65beca3"
  ],
  "author": {
    "name": "S Ashwin Balaji",
    "email": "sashwinbalaji@google.com",
    "time": "Tue Aug 11 09:22:25 2026 +0100"
  },
  "committer": {
    "name": "S Ashwin Balaji",
    "email": "sashwinbalaji@google.com",
    "time": "Wed Aug 12 10:16:55 2026 +0100"
  },
  "message": "perfetto: Add opt-in shift-left compaction to TraceBufferV2\n\nIn long streaming sessions the consumer periodically drains the buffer,\nbut the freed space stays resident: consumed chunks are only turned\ninto padding, so a buffer keeps roughly its full size in dirty pages\neven when almost everything in it has been read.\n\nTeach TraceBufferV2 to compact itself in BeginRead(), the only point\nwhere no read iterators or packet slices can be outstanding. When at\nleast 64 KB is reclaimable and at most 1/8th of the initialized region\nis still live, live chunks are packed to the front of the buffer\npreserving ring order, the per-sequence chunk index is re-pointed to\nthe new offsets, used_size_ shrinks accordingly and the now-unused\nwhole pages are released back to the OS via AdviseDontNeed().\n\nThe feature only applies to kOverwrite buffers and is gated by the\ntbv2_shift_left_compaction aconfig flag (default off). A new\nper-buffer `compactions` counter in TraceStats.BufferStats makes the\nbehavior observable in traces.\n\nBug: 536851377\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d0767784111eb4a3a8b3949c46edc8a5ab313530",
      "old_mode": 33188,
      "old_path": "CHANGELOG",
      "new_id": "d7833619564340d92b60b040a6b1920e8625d33d",
      "new_mode": 33188,
      "new_path": "CHANGELOG"
    },
    {
      "type": "modify",
      "old_id": "43c86b9efb4713d35a73b57aecf6168e0270f504",
      "old_mode": 33188,
      "old_path": "include/perfetto/ext/base/flags.h",
      "new_id": "7f1f8a9251016aed53f04df805db9ecaf3361689",
      "new_mode": 33188,
      "new_path": "include/perfetto/ext/base/flags.h"
    },
    {
      "type": "modify",
      "old_id": "13493d2a0348a812c95e01fdab38ff10a57f1432",
      "old_mode": 33188,
      "old_path": "perfetto_flags.aconfig",
      "new_id": "9bee62152916613ee5c932b7fcb19dad1315c78a",
      "new_mode": 33188,
      "new_path": "perfetto_flags.aconfig"
    },
    {
      "type": "modify",
      "old_id": "e646c6dcf2ea9c19ac90a3547d9bf72074671b44",
      "old_mode": 33188,
      "old_path": "protos/perfetto/common/trace_stats.proto",
      "new_id": "e994359bc6f9a16ca390da70723e1be95724f5e8",
      "new_mode": 33188,
      "new_path": "protos/perfetto/common/trace_stats.proto"
    },
    {
      "type": "modify",
      "old_id": "fa8b3ad772d7f7dbdedbbc46e1caeadf1a0ccd61",
      "old_mode": 33188,
      "old_path": "protos/perfetto/trace/perfetto_trace.proto",
      "new_id": "1e8b61767876d0c0b23c6ce012bf3f25024a2254",
      "new_mode": 33188,
      "new_path": "protos/perfetto/trace/perfetto_trace.proto"
    },
    {
      "type": "modify",
      "old_id": "67f3ade78343c63f8bffe6420eae041365aeae31",
      "old_mode": 33188,
      "old_path": "src/trace_processor/importers/proto/proto_trace_reader.cc",
      "new_id": "c40020e41e9ce86212717271f2be19a0c52a14fc",
      "new_mode": 33188,
      "new_path": "src/trace_processor/importers/proto/proto_trace_reader.cc"
    },
    {
      "type": "modify",
      "old_id": "097a9da404b293f17d8ca610b49a6aeb5421d232",
      "old_mode": 33188,
      "old_path": "src/trace_processor/storage/stats.h",
      "new_id": "5cb563404ba0fc20ff1559ef4766b47ec3e3c5b4",
      "new_mode": 33188,
      "new_path": "src/trace_processor/storage/stats.h"
    },
    {
      "type": "modify",
      "old_id": "bf043f4a440c6f29e18ddd099d614358efedfb01",
      "old_mode": 33188,
      "old_path": "src/tracing/service/trace_buffer.h",
      "new_id": "5649b1d8bfca4ef6ea9adef4b21a5ffbec8b5c44",
      "new_mode": 33188,
      "new_path": "src/tracing/service/trace_buffer.h"
    },
    {
      "type": "modify",
      "old_id": "5fc2a2851e29c37bc95b37d28697833d60fa8ede",
      "old_mode": 33188,
      "old_path": "src/tracing/service/trace_buffer_v2.cc",
      "new_id": "ee638a2c5fc766d57e76d7299fb0fb2c56a039d5",
      "new_mode": 33188,
      "new_path": "src/tracing/service/trace_buffer_v2.cc"
    },
    {
      "type": "modify",
      "old_id": "ebfdba71167c42d066039bc71f89693010ee97cf",
      "old_mode": 33188,
      "old_path": "src/tracing/service/trace_buffer_v2.h",
      "new_id": "7888cfc40bd41d981680b1c916a170bb0de3256c",
      "new_mode": 33188,
      "new_path": "src/tracing/service/trace_buffer_v2.h"
    },
    {
      "type": "modify",
      "old_id": "45b3c7a6a19d54541c916eda9efa0f161555ebcd",
      "old_mode": 33188,
      "old_path": "src/tracing/service/trace_buffer_v2_unittest.cc",
      "new_id": "62670a1a4a70401b6e45f6ebc7ae903e6d2ca97c",
      "new_mode": 33188,
      "new_path": "src/tracing/service/trace_buffer_v2_unittest.cc"
    },
    {
      "type": "modify",
      "old_id": "f282e799867ebfff764c0e5b16419d6585a1a412",
      "old_mode": 33188,
      "old_path": "test/trace_processor/diff_tests/parser/parsing/android_sched_and_ps_stats.out",
      "new_id": "84ceb5e2852295149ac1bfee2f2a0bef7e44be53",
      "new_mode": 33188,
      "new_path": "test/trace_processor/diff_tests/parser/parsing/android_sched_and_ps_stats.out"
    }
  ]
}
