Skip to content

traced_probes: Add android.aflags data source#5209

Open
sashwinbalaji wants to merge 3 commits intomainfrom
dev/sashwinbalaji/aflags_device
Open

traced_probes: Add android.aflags data source#5209
sashwinbalaji wants to merge 3 commits intomainfrom
dev/sashwinbalaji/aflags_device

Conversation

@sashwinbalaji
Copy link
Member

This data source captures snapshots of Android aconfig flags. It invokes 'aflags list --format proto' and parses the binary protobuf.

Bug: b/314981157
Test: record_android_trace with android.aflags data source

@sashwinbalaji sashwinbalaji requested a review from a team as a code owner March 20, 2026 10:23
@github-actions
Copy link

github-actions bot commented Mar 20, 2026

@sashwinbalaji sashwinbalaji force-pushed the dev/sashwinbalaji/aflags_device branch from 40a0d73 to 87e2efe Compare March 20, 2026 18:48
This data source captures snapshots of Android aconfig flags.
It invokes 'aflags list --format proto' and parses the binary protobuf.

The data source supports one-shot capture at the start of the trace
or periodic polling. It uses an incremental state to only emit flags
that have changed since the last snapshot.

The trace format uses raw strings for flag metadata (package, name, etc.)
to keep the implementation simple and avoid interning complexity,
adding ~120KB per full system snapshot.

Test: perfetto_unittests --gtest_filter='AndroidAflagsDataSourceTest.*'
Test: record_android_trace with android.aflags data source
Change-Id: Icff7ad647df9c332e1e9a1f94b5fc935b19f2a12
Change-Id: I905dbde109dc9d7d983a9b9d0d442dec8037106a
Change-Id: Ic85daf27a040fd61cc7e6fdd067ec945b68c53b8
@sashwinbalaji sashwinbalaji force-pushed the dev/sashwinbalaji/aflags_device branch from 87e2efe to cc4c3d8 Compare March 20, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants