Fixed
Status Update
Comments
et...@google.com <et...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Albano <
Link:
Fix baseline profiles and benchmarks on android multiuser
Expand for full commit details
Fix baseline profiles and benchmarks on android multiuser
Benchmark and Baseline profile generation require transfering files
between storage accessible by shell and storage accessible by the user.
Shell runs on user 0. When the android selected user is also zero, shell
can see both storages. When the android selected user is not zero, shell
cannot see user storage.
As a result we cannot invoke shell commands operating in user storage
to copy and move files. Instead we need to utilize the running
instrumentation process to access user storage and shell to access shell
storage. In order to communicate between these two, the class
VirtualFile implements a number of methods to copy streams between the
two. When in shell storage we can use commands like `cat` and `cp` from
`/dev/stdin` to a file to write. When in user storage we use the java
api of the running process.
Test: Added and manually. Note we'll need to enable multiuser devices in CI.
Bug: 356684617
Bug: 373641155
Relnote: (Experimental) Enable Baseline Profile generation, and benchmarking on apps installed to a secondary user, such as all apps on headless Android Auto devices. This support has been tested in some scenarios, but let us know with a bug if it doesn't work for you.
Change-Id: I9fcbecf2a9c9075d161de69118c443d7a37102c0
Files:
- A
benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/VirtualFileTest.kt
- M
benchmark/benchmark-common/src/main/java/androidx/benchmark/Shell.kt
- M
benchmark/benchmark-common/src/main/java/androidx/benchmark/UserInfo.kt
- A
benchmark/benchmark-common/src/main/java/androidx/benchmark/VirtualFile.kt
- M
benchmark/benchmark-common/src/main/java/androidx/benchmark/perfetto/PerfettoCapture.kt
- M
benchmark/benchmark-common/src/main/java/androidx/benchmark/perfetto/PerfettoCaptureWrapper.kt
- M
benchmark/benchmark-common/src/main/java/androidx/benchmark/perfetto/PerfettoConfig.kt
- M
benchmark/benchmark-common/src/main/java/androidx/benchmark/perfetto/PerfettoHelper.kt
- M
benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/CompilationModeTest.kt
- M
benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/perfetto/PerfettoSdkHandshakeTest.kt
- M
benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/BaselineProfiles.kt
- M
benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/CompilationMode.kt
- M
benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/MacrobenchmarkScope.kt
- M
benchmark/integration-tests/macrobenchmark/build.gradle
- M
benchmark/integration-tests/macrobenchmark/src/main/java/androidx/benchmark/integration/macrobenchmark/GridBenchmark.kt
Hash: a266d71d544ad51fc75a23917a215a8e3929fd58
Date: Fri May 10 10:02:48 2024
ma...@google.com <ma...@google.com>
pr...@google.com <pr...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.benchmark:benchmark-common:1.4.0-alpha04
androidx.benchmark:benchmark-macro:1.4.0-alpha04
Description
Currently, Macrobenchmark does not support profile generation and extraction beyond SDK 29 on the Android Automotive form factor. aosp/3092660 should resolve this issue.