Status Update
Comments
sh...@google.com <sh...@google.com> #2
bo...@google.com <bo...@google.com>
ma...@google.com <ma...@google.com> #3
It seems that also the generation is affected. I tried to run:
./gradlew :benchmark:integration-tests:macrobenchmark:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=androidx.benchmark.integration.macrobenchmark.BaselineProfileRuleTest
And I'm getting this failure
androidx.benchmark.integration.macrobenchmark.BaselineProfileRuleTest > filter[emulator-5554 - 11] FAILED
java.lang.IllegalStateException: Unable to recompile androidx.benchmark.integration.macrobenchmark.target (Output(stdout=Failure: package androidx.benchmark.integration.macrobenchmark.target could not be compiled
, stderr=))
Looking at the cmd package compile
command, giving the same error of when force compiling a profile.
Bypassing the reset command, the test also fails with:
java.lang.IllegalStateException: The profile is empty.
at androidx.benchmark.macro.BaselineProfilesKt.profile(BaselineProfiles.kt:168)
at androidx.benchmark.macro.BaselineProfilesKt.collectBaselineProfile(BaselineProfiles.kt:98)
at androidx.benchmark.macro.junit4.BaselineProfileRule.collectBaselineProfile(BaselineProfileRule.kt:94)
at androidx.benchmark.macro.junit4.BaselineProfileRule.collectBaselineProfile$default(BaselineProfileRule.kt:88)
at androidx.benchmark.integration.macrobenchmark.BaselineProfileRuleTest.filter(BaselineProfileRuleTest.kt:64)
Not sure why the test is not running on CI.
ma...@google.com <ma...@google.com> #4
Note that generation requires a rooted emulator and I tested that the app gained the root user.
cc...@google.com <cc...@google.com> #5
Hey Bo, what's the state of this? We've just launched the baseline profile plugin publicly, so more people are going to be trying to automate with emulators, and potentially hitting this issue.
cc...@google.com <cc...@google.com> #6
We updated the compile error in macrobenchmark to point to this bug.
Note that Wear API 30 emulators are also reproducing this issue currently, which is being tracked internally as
Description
Profile verification PR ( link ) is failing on api 30.
Installing the reference profile through
pm install-session
completes withSuccess
but the size of the generated reference profile is zero. Trying to force compile a profile manually placed incur
, generated through profgen, gives the following error:There seems to be some issue related to the compiling a profile. This seems to be an emulator only issue as it seems working fine on Pixel 4 and 5 with api 30.
To reproduce through adb install-multiple (that internally uses pm install-session):
adb install-multiple base.apk base.dm
-> Completes with successadb root
(the ref profile folder is not accessible byshell
user)adb shell ls -la /data/misc/profiles/ref/androidx.profileinstaller.integration.profileverification.target.no_initializer/primary.prof
To reproduce through cmd package compile (i.e. forced compilation)
adb install base.apk
adb push primary.prof /data/misc/profiles/cur/0/androidx.profileinstaller.integration.profileverification.target.no_initializer/primary.prof
adb shell cmd package compile -f -m speed-profile androidx.profileinstaller.integration.profileverification.target.no_initializer
-> Failure: package androidx.profileinstaller.integration.profileverification.target.no_initializer could not be compiled.This exact sequence of steps works on a pixel 4 and 5 with api 30, producing a reference profile non zero size and without throwing the failure in case of forced compilation.