+93
−0
+77
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Define the perfetto custom data source LayerDataSource. LayerDataSource is registered with perfetto. The data source is used to listen to perfetto events (setup, start, stop, flush) and to write trace packets to perfetto. The user can configure/start/stop tracing via /system/bin/perfetto. Tracing can operate in the following modes. ACTIVE mode: A layers snapshot is taken and written to perfetto for each vsyncid commit. GENERATED mode: Listens to the perfetto 'flush' event (e.g. when a bugreport is taken). When a 'flush' event is received, the ring buffer of transactions (hold by TransactionTracing) is processed by LayerTraceGenerator, a sequence of layers snapshots is generated and written to perfetto. DUMP mode: When the 'start' event is received a single layers snapshot is taken and written to perfetto. Bug: b/284424784 Test: atest libsurfaceflinger_unittest && atest transactiontrace_testsuite Change-Id: Ic1b10a040ec4533f0b56a4c8087c5a2898e3e34d