Skip to content

what's expected buffer clearing behaviour of perfetto trigger mode #949

Answered by LalitMaganti
wangjiyang asked this question in Q&A
Discussion options

You must be logged in to vote

There's a deep misunderstanding of triggers: please first read https://perfetto.dev/docs/concepts/config#triggers.

CLONE_SNAPSHOT triggers are a very advanced mode of triggering: it snapshots the state of the buffer every time the trigger is received and saves it to a file. It does not clear the state of the buffer when the snapshot is taken, just "clones" and takes a snapshot.

You are also using DISCARD mode of the buffers which makes zero sense for CLONE_SNAPSHOT triggers. RING_BUFFER is the only thing which makes sense for CLONE_SHAPSHOT tracing.

The traces will increase in size until they hit your buffer size and then they will stay at that size, always dumping the most recent snapsho…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by LalitMaganti
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #933 on November 27, 2024 03:00.