Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit faaaafba authored by Primiano Tucci's avatar Primiano Tucci
Browse files

dumpstate: save background traces when a BR is captured.

Adds a call to perfetto --save-for-bugreport to bugreport.
If a background trace labeled with bugreport_score > 0 is
being recorded when dumpstate is invoked, the tracing daemon
will stop the trace and serialize it into a fixed location
(/data/misc/perfetto-traces/bugreport/systrace.pftrace).
If no background tracing is happening, the command is a no-op.
The trace saving happens in two stages:
1. In the very early stage of dumpstate, the trace is
   snapshoted (if in progress). This prevents that further
   dumpstate activity pushes out interesting contents from
   the trace buffer.
2. In the later stages of dumpstate, the trace is attached
   to the bugreport.zip file and cleaned up.

Bug: 170334305
Change-Id: I4278459697a5ed20b20ee99032884874a82a66be
parent 7de7b8c5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment