Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 5d7c04100e92a4bebc413d726c2626865b3233c5
Author: Chris Craik <ccraik@google.com>
Date: Mon Oct 10 11:03:26 2022
Support for generating baseline profiles without root (API33+)
Fixes:250083467
Fixes:253094958
Test: BaselineProfileRuleTest # on raven running T / API 33, user build
Test: ./gradlew benchmark:b-m:cC
Relnote: """
// BENCHMARK RELEASE NOTES
BaselineProfileRule no longer requires root on Android 13 (API 33),
and is no longer experimental.
This change also fixes how profiles from an app are flushed to disk on
unrooted devices, but requires updating the target app's
profileinstaller dependency.
To use `BaselineProfileRule` and `CompilationMode.Partial()` on an
unrooted device, you must also update your target app to use
`androidx.profileinstaller.profileinstaller:1.3.0-alpha01`. This
enables flushing the profile to disk correctly, so that it can be
compiled/extracted.
// PROFILE INSTALLER RELEASE NOTES
Adds a new shell broadcast that enables Macrobenchmark to fully flush
in-memory profile data to disk, to be included in baseline profile
generation. This is required to use the macrobenchmark library to
capture baseline profiles with `BaselineProfileRule`, and evaluate
profile performance using `CompilationMode.Partial()`.
"""
Change-Id: Ie0a7d13cbe34476113bad955e47ed771d84e65a4
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Shell.kt
M benchmark/benchmark-macro-junit4/api/current.txt
M benchmark/benchmark-macro-junit4/api/public_plus_experimental_current.txt
M benchmark/benchmark-macro-junit4/api/restricted_current.txt
M benchmark/benchmark-macro-junit4/src/main/java/androidx/benchmark/macro/junit4/BaselineProfileRule.kt
M benchmark/benchmark-macro/api/public_plus_experimental_current.txt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/BaselineProfiles.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/CompilationMode.kt
D benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/ExperimentalBaselineProfilesApi.kt
A benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/ProfileInstallBroadcast.kt
M benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/BaselineProfileRuleTest.kt
M benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/GithubBrowserBaselineProfile.kt
M benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/SystemUiBenchmark.kt
M benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/TrivialListScrollBaselineProfile.kt
M benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/TrivialStartupBaselineProfile.kt
M compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/SmallListBaselineProfile.kt
M profileinstaller/profileinstaller/api/current.txt
M profileinstaller/profileinstaller/api/public_plus_experimental_current.txt
M profileinstaller/profileinstaller/api/restricted_current.txt
M profileinstaller/profileinstaller/src/main/AndroidManifest.xml
M profileinstaller/profileinstaller/src/main/java/androidx/profileinstaller/ProfileInstallReceiver.java
M profileinstaller/profileinstaller/src/main/java/androidx/profileinstaller/ProfileInstaller.java
M wear/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/compose/integration/macrobenchmark/BaselineProfile.kt
https://android-review.googlesource.com/2250190
Branch: androidx-main
commit 5d7c04100e92a4bebc413d726c2626865b3233c5
Author: Chris Craik <ccraik@google.com>
Date: Mon Oct 10 11:03:26 2022
Support for generating baseline profiles without root (API33+)
Fixes:250083467
Fixes:253094958
Test: BaselineProfileRuleTest # on raven running T / API 33, user build
Test: ./gradlew benchmark:b-m:cC
Relnote: """
// BENCHMARK RELEASE NOTES
BaselineProfileRule no longer requires root on Android 13 (API 33),
and is no longer experimental.
This change also fixes how profiles from an app are flushed to disk on
unrooted devices, but requires updating the target app's
profileinstaller dependency.
To use `BaselineProfileRule` and `CompilationMode.Partial()` on an
unrooted device, you must also update your target app to use
`androidx.profileinstaller.profileinstaller:1.3.0-alpha01`. This
enables flushing the profile to disk correctly, so that it can be
compiled/extracted.
// PROFILE INSTALLER RELEASE NOTES
Adds a new shell broadcast that enables Macrobenchmark to fully flush
in-memory profile data to disk, to be included in baseline profile
generation. This is required to use the macrobenchmark library to
capture baseline profiles with `BaselineProfileRule`, and evaluate
profile performance using `CompilationMode.Partial()`.
"""
Change-Id: Ie0a7d13cbe34476113bad955e47ed771d84e65a4
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Shell.kt
M benchmark/benchmark-macro-junit4/api/current.txt
M benchmark/benchmark-macro-junit4/api/public_plus_experimental_current.txt
M benchmark/benchmark-macro-junit4/api/restricted_current.txt
M benchmark/benchmark-macro-junit4/src/main/java/androidx/benchmark/macro/junit4/BaselineProfileRule.kt
M benchmark/benchmark-macro/api/public_plus_experimental_current.txt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/BaselineProfiles.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/CompilationMode.kt
D benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/ExperimentalBaselineProfilesApi.kt
A benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/ProfileInstallBroadcast.kt
M benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/BaselineProfileRuleTest.kt
M benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/GithubBrowserBaselineProfile.kt
M benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/SystemUiBenchmark.kt
M benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/TrivialListScrollBaselineProfile.kt
M benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/TrivialStartupBaselineProfile.kt
M compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/SmallListBaselineProfile.kt
M profileinstaller/profileinstaller/api/current.txt
M profileinstaller/profileinstaller/api/public_plus_experimental_current.txt
M profileinstaller/profileinstaller/api/restricted_current.txt
M profileinstaller/profileinstaller/src/main/AndroidManifest.xml
M profileinstaller/profileinstaller/src/main/java/androidx/profileinstaller/ProfileInstallReceiver.java
M profileinstaller/profileinstaller/src/main/java/androidx/profileinstaller/ProfileInstaller.java
M wear/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/compose/integration/macrobenchmark/BaselineProfile.kt
na...@google.com <na...@google.com> #3
The following release(s) address this bug:
androidx.benchmark:benchmark-common:1.2.0-alpha06
androidx.benchmark:benchmark-macro:1.2.0-alpha06
androidx.benchmark:benchmark-macro-junit4:1.2.0-alpha06
androidx.profileinstaller:profileinstaller:1.3.0-alpha01
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit e7b7f8c2f098dd2623e7a7ce45259048963409a7
Author: Chris Craik <ccraik@google.com>
Date: Thu Oct 20 12:50:37 2022
Safe by default shell commands
Fixes: 255402908
Bug: 253094958
Test: Tests in benchmark-common, benchmark-macro, benchmark-junit4 # API 23 26 31 (emulators) 33 (device)
Require caller to specify if they want stdout or stderr, and validate
empty if they are not used.
This will incur a performance penalty for every command changed in
this way, but gives us much greater safety in avoiding ignored shell
commands leaving the test/device in an undefined state. By default,
this was a significant regression in shell execution, so selectively
used unsafe variant, and optimized the script to avoid a chmod and
multiple kotlin-side file deletes.
This also fixes the script command to capture all stderr, instead of
that from just the last command.
For simplicity, removed argument support from scripts, and hard code
perfetto port. This could be fixed by adding back arg support if
needed.
Relnote: "Improved safety of all internal shell commands by validating
all output/errors."
Change-Id: I5984d1f7f176e47445264998250add7c27c5418c
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/OutputsTest.kt
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/ShellBehaviorTest.kt
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/ShellTest.kt
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/perfetto/AtraceTagTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/PropOverride.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Shell.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/PerfettoHelper.kt
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/CompilationModeTest.kt
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/MacrobenchmarkScopeTest.kt
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/perfetto/PerfettoSdkHandshakeTest.kt
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/perfetto/PerfettoTraceProcessorTest.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/benchmark-macro/src/main/java/androidx/benchmark/macro/Metric.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/PowerRail.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/ProfileInstallBroadcast.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/perfetto/PerfettoTraceProcessor.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/perfetto/server/PerfettoHttpServer.kt
M benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/CompilationModeTest.kt
M benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/PerfettoTraceProcessorBenchmark.kt
https://android-review.googlesource.com/2267992
Branch: androidx-main
commit e7b7f8c2f098dd2623e7a7ce45259048963409a7
Author: Chris Craik <ccraik@google.com>
Date: Thu Oct 20 12:50:37 2022
Safe by default shell commands
Fixes: 255402908
Bug: 253094958
Test: Tests in benchmark-common, benchmark-macro, benchmark-junit4 # API 23 26 31 (emulators) 33 (device)
Require caller to specify if they want stdout or stderr, and validate
empty if they are not used.
This will incur a performance penalty for every command changed in
this way, but gives us much greater safety in avoiding ignored shell
commands leaving the test/device in an undefined state. By default,
this was a significant regression in shell execution, so selectively
used unsafe variant, and optimized the script to avoid a chmod and
multiple kotlin-side file deletes.
This also fixes the script command to capture all stderr, instead of
that from just the last command.
For simplicity, removed argument support from scripts, and hard code
perfetto port. This could be fixed by adding back arg support if
needed.
Relnote: "Improved safety of all internal shell commands by validating
all output/errors."
Change-Id: I5984d1f7f176e47445264998250add7c27c5418c
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/OutputsTest.kt
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/ShellBehaviorTest.kt
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/ShellTest.kt
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/perfetto/AtraceTagTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/PropOverride.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Shell.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/PerfettoHelper.kt
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/CompilationModeTest.kt
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/MacrobenchmarkScopeTest.kt
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/perfetto/PerfettoSdkHandshakeTest.kt
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/perfetto/PerfettoTraceProcessorTest.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/benchmark-macro/src/main/java/androidx/benchmark/macro/Metric.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/PowerRail.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/ProfileInstallBroadcast.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/perfetto/PerfettoTraceProcessor.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/perfetto/server/PerfettoHttpServer.kt
M benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/CompilationModeTest.kt
M benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/PerfettoTraceProcessorBenchmark.kt
na...@google.com <na...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.benchmark:benchmark-common:1.2.0-alpha07
androidx.benchmark:benchmark-macro:1.2.0-alpha07
Description
No description yet.