Skip to content

perfetto: Enable TraceBufferV3 in the tracing service - #7908

Open
sashwinbalaji wants to merge 1 commit into
dev/sashwinbalaji/05-tbv3-bufferfrom
dev/sashwinbalaji/06-tbv3-service
Open

sashwinbalaji wants to merge 1 commit into
dev/sashwinbalaji/05-tbv3-bufferfrom
dev/sashwinbalaji/06-tbv3-service

Conversation

@sashwinbalaji

@sashwinbalaji sashwinbalaji commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

A trace config can now use TraceBufferV3 with buffer_type.v3.

  • Builds without zstd skip it and use the next listed type.
  • All TraceBufferV3s of a service share one zstd codec, which is freed
    with the last of them.
  • The memory guardrail counts that codec once.

The service tells buffers when a write batch is complete.

  • At a batch's end, TraceBufferV3 bundles once staging holds its
    target, so a checkpoint pass doesn't split a batch.
  • A batch is a CommitData request, an SMB v2 drain pass or an SMB v1
    scrape.
  • The SMB v2 drain retry moves from the drainer to the producer
    endpoint, so the endpoint can notify after each pass.

Shared memory emulation is not supported yet.

  • One batch can be split across several CommitData requests.
  • So the service does not start an emulated producer's data source
    on a V3 buffer, and drops chunks sent inline to one.

A TODO notes where the service can replace loss bits when it reads
packets.

@sashwinbalaji
sashwinbalaji added this pull request to stack #7909 October 12, 2026 08:20
@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

🎨 Perfetto UI Builds & Tests

@sashwinbalaji
sashwinbalaji force-pushed the dev/sashwinbalaji/06-tbv3-service branch from c77801b to 4bc0ad7 Compare October 14, 2026 10:26
@sashwinbalaji
sashwinbalaji removed this pull request from stack #7909 October 14, 2026 10:31
@sashwinbalaji
sashwinbalaji force-pushed the dev/sashwinbalaji/06-tbv3-service branch from 4bc0ad7 to 8979b9f Compare October 14, 2026 11:47
@sashwinbalaji
sashwinbalaji added this pull request to stack #7974 October 14, 2026 11:48
@sashwinbalaji
sashwinbalaji force-pushed the dev/sashwinbalaji/06-tbv3-service branch from 8979b9f to 5e3ebe2 Compare October 14, 2026 12:04
@sashwinbalaji
sashwinbalaji force-pushed the dev/sashwinbalaji/06-tbv3-service branch 3 times, most recently from ebd5a9e to cdb6b2f Compare October 15, 2026 16:01
@sashwinbalaji
sashwinbalaji force-pushed the dev/sashwinbalaji/06-tbv3-service branch from cdb6b2f to d18a9e9 Compare October 22, 2026 15:57
@sashwinbalaji sashwinbalaji changed the title perfetto: Wire TraceBufferV3 into the tracing service perfetto: Enable TraceBufferV3 in the tracing service Oct 22, 2026
@sashwinbalaji
sashwinbalaji removed this pull request from stack #7974 October 22, 2026 15:59
@sashwinbalaji
sashwinbalaji added this pull request to stack #8212 October 22, 2026 16:00
@sashwinbalaji
sashwinbalaji force-pushed the dev/sashwinbalaji/06-tbv3-service branch 2 times, most recently from 437d021 to 276a6ab Compare October 22, 2026 17:55
@sashwinbalaji
sashwinbalaji force-pushed the dev/sashwinbalaji/06-tbv3-service branch from 276a6ab to 266856d Compare October 26, 2026 00:18
@sashwinbalaji
sashwinbalaji marked this pull request as ready for review October 26, 2026 00:22
@sashwinbalaji
sashwinbalaji requested a review from a team as a code owner October 26, 2026 00:22
@sashwinbalaji
sashwinbalaji force-pushed the dev/sashwinbalaji/06-tbv3-service branch from 266856d to 6afae67 Compare October 26, 2026 11:46
@sashwinbalaji
sashwinbalaji force-pushed the dev/sashwinbalaji/06-tbv3-service branch from 6afae67 to 00c56ca Compare October 29, 2026 18:30
@sashwinbalaji
sashwinbalaji removed this pull request from stack #8212 October 30, 2026 15:28
@sashwinbalaji
sashwinbalaji force-pushed the dev/sashwinbalaji/06-tbv3-service branch from 00c56ca to e7200dd Compare November 4, 2026 11:25
@sashwinbalaji
sashwinbalaji added this pull request to stack #8492 November 4, 2026 11:25
@sashwinbalaji
sashwinbalaji removed this pull request from stack #8492 November 5, 2026 09:39
@sashwinbalaji
sashwinbalaji force-pushed the dev/sashwinbalaji/06-tbv3-service branch from e7200dd to b28a64c Compare November 5, 2026 09:40
@sashwinbalaji
sashwinbalaji added this pull request to stack #8531 November 5, 2026 09:40
@sashwinbalaji
sashwinbalaji force-pushed the dev/sashwinbalaji/06-tbv3-service branch 7 times, most recently from 63fd408 to c150381 Compare November 5, 2026 22:28
A trace config can now use TraceBufferV3 with buffer_type.v3.
- Builds without zstd skip it and use the next listed type.
- All TraceBufferV3s of a service share one zstd codec, which is freed
  with the last of them.
- The memory guardrail counts that codec once.

The service tells buffers when a write batch is complete.
- At a batch's end, TraceBufferV3 bundles once staging holds its
  target, so a checkpoint pass doesn't split a batch.
- A batch is a CommitData request, an SMB v2 drain pass or an SMB v1
  scrape.
- The SMB v2 drain retry moves from the drainer to the producer
  endpoint, so the endpoint can notify after each pass.

Shared memory emulation is not supported yet.
- One batch can be split across several CommitData requests.
- So the service does not start an emulated producer's data source
  on a V3 buffer, and drops chunks sent inline to one.

A TODO notes where the service can replace loss bits when it reads
packets.
@sashwinbalaji
sashwinbalaji force-pushed the dev/sashwinbalaji/06-tbv3-service branch from c150381 to 071f328 Compare November 5, 2026 22:50

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants