diff options
| author | 2023-09-20 06:50:41 +0000 | |
|---|---|---|
| committer | 2023-10-20 14:55:05 +0000 | |
| commit | 8b5c6bd000352c77007c1f00b966b9de957d757e (patch) | |
| tree | 53902fb13e8581d2c39093e2fbe170beef78771e /libs/gui/BufferQueue.cpp | |
| parent | 3feea1b9aadf0777d1a2db15aa9b777a7b19d1b8 (diff) | |
Add layer tracing's MODE_GENERATED_BUGREPORT_ONLY
The generated layers trace can be quite large (100-400 MB), which is way above
the perfetto's field upload budget.
On the field (AOT) we want the layers trace to be generated only when a bugreport
is taken and not when a perfetto's field upload happens. We achieve it as follows:
- In the AOT configuration, enable the 'android.surfaceflinger_layers' data source
with MODE_GENERATED_BUGREPORT_ONLY.
- When LayerTracing receives perfetto's OnFlush event and MODE_GENERATED_BUGREPORT_ONLY is enabled,
generate the layers trace only if the OnFlush event is due to a bugreport being taken:
args.flush_flags.reason() == perfetto::FlushFlags::Reason::kTraceClone &&
args.flush_flags.clone_target() == perfetto::FlushFlags::CloneTarget::kBugreport
In a test environment instead, we can use MODE_GENERATED to test the layers trace generation
without having to take a bugreport.
Bug: b/293429094
Test: 1. Manually start the perfetto's android.surfaceflinger_layers data source
with MODE_GENERATED_BUGREPORT_ONLY setting a high bugreport_score (e.g. 50000)
2. Take a bugreport (adb bugreport)
3. Verify that FS/data/misc/perfetto-traces/bugreport/systrace.pftrace (in the bugreport)
contains the generated layers trace. E.g. inspect bugreport with go/winscope.
Change-Id: I5b3ce59cc762fd5a22170e677e48be987380c94e
Diffstat (limited to 'libs/gui/BufferQueue.cpp')
0 files changed, 0 insertions, 0 deletions