what's expected buffer clearing behaviour of perfetto trigger mode #949
-
Hi Perfetto team, I am using perfetto to try to collect some traces from device. What I am expected is continious tracing and spliting traces into multiple splitted ones, to tracing&profiling for several days to reproduce one issue. I noticed there's a Here's the config I am using.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
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 snapshot of the trace into the file. |
Beta Was this translation helpful? Give feedback.
-
You are correct. I noticed I set a pretty large buffer and result in takes a long time to fill it up. |
Beta Was this translation helpful? Give feedback.
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…