perfetto_hprof: exclude chromium sandboxed processes
We are not able to heap dump chromium/webview sandboxed processes
because chrome's seccomp strict policy prevents us from doing so.
This change detects the presence of chromium sandboxes and ignores
them instead.
Bug: 507048056
Bug: 507079283
Flag: EXEMPT BUGFIX
Test: manual
adb shell aflags enable com.android.art.rw.flags.java_hprof_exclude_chromium_sandbox
adb reboot
cat /tmp/cfg | adb shell perfetto --txt -c - -o /data/misc/perfetto-traces/trace
adb logcat -d -s perfetto -s perfetto_hprof
Check for the presence of "Chromium seccomp detected, skipping Perfetto heap dump" in logs
cfg file used:
```
buffers {
size_kb: 32000
fill_policy: DISCARD
}
data_sources {
config {
name: "android.java_hprof"
java_hprof_config {
process_cmdline: "com.android.chrome:sandboxed*"
process_cmdline: "com.google.android.webview:sandboxed*"
}
}
}
duration_ms: 1000
data_source_stop_timeout_ms: 100000
```
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:1b4974727e9016cf515f17efb937d2ef551878de
Merged-In: I49dab1df204f9ca9f37cde1ac0ab2a5ddecf67a0
Change-Id: I49dab1df204f9ca9f37cde1ac0ab2a5ddecf67a0
1 file changed