I'm using Perfetto to profile my Android app. Everything works fine and I get a trace file, which I am able to convert into an SQLite3 database, extract measurements from and visualise the results.
However, my trace throws an error when it completes:
The settings for the trace are:
Target platform: Andriod P
Long trace, 1m30s duration, max file size 500mb
probes: CPU coarse usage counter with 1000ms poll interval, schedualing details
The settings are configured using the perfetto UI: https://ui.perfetto.dev/#!/record?p=buffers Instructions are copied and pasted to the terminal on a Mac.
Any idea what the error is and how to fix it?
That looks like a data loss in the central buffer, see https://perfetto.dev/docs/concepts/buffers#debugging-data-losses
Either increase the size of the central buffer size (buffers->size or reduce the file_write_period_ms setting