Status Update
Comments
ma...@google.com <ma...@google.com> #2
I tested it and it's working as expected for me when starting it the first time:
MainActivity: ProfileInstaller status code: 0
MainActivity: Profile not compiled or enqueued
MainActivity: ProfileInstaller status code: 0
MainActivity: Profile not compiled or enqueued
When running the second time is instead:
MainActivity: ProfileInstaller status code: 0
MainActivity: ProfileInstaller: Enqueued for compilation
As you mentioned, this is correct because ProfileVerifier#getProfileInstallResultCode
only verifies if the embedded profile is installed. Since that's the debug version, no profile is embedded and therefore installed.
Instead hasCurrentProfile
returns whether there is an existing profile being built. This is normal because ART collected the methods used during first app execution. The profile will be compiled after first bg-dexopt or when manually triggered. At that point also isCompiledWithProfile
will return true, even if ProfileVerifier#getProfileInstallResultCode
is still 0
.
I'm wondering if the solution here is to improve javadocs and documentation? the method getProfileInstallResultCode
specifically mentions profileInstall
.
Also the javadoc for hasProfileEnqueuedForCompilation
states (
... an app can have a profile enqueued for compilation because of profile installation through profileinstaller or simply when the user starts interacting with the app ...
be...@google.com <be...@google.com> #3
As you mentioned, this is correct because ProfileVerifier#getProfileInstallResultCode only verifies if the embedded profile is installed. Since that's the debug version, no profile is embedded and therefore installed.
Having a way to flag that no embedded profile is available would be very helpful. This could be a new status code to flag RESULT_CODE_NO_PROFILE_EMBEDDED
or similar. WDYT?
I'm wondering if the solution here is to improve javadocs and documentation? the method getProfileInstallResultCode specifically mentions profileInstall.
Yes, we are currently working to create a guide on profile debugging and verification. That's why this came up.
ma...@google.com <ma...@google.com> #4
We can add RESULT_CODE_NO_PROFILE_EMBEDDED
. Lemme go ahead and create a task for it.
ma...@google.com <ma...@google.com> #5
Created
ma...@google.com <ma...@google.com> #6
be...@google.com <be...@google.com> #7
Mark: AFACIT you already addressed the new change in the latest docs update, right?
ma...@google.com <ma...@google.com> #9
Just a heads up that the new version of profile installer hasn't been released yet so those changes are not in the current publicly available version.
Description
Component used: profileinstaller
Version used: 1.3.1 Devices/Android versions reproduced on: Any
./gradlew :app:installDemoDebug
).ProfileVerifier
returns status code0
(RESULT_CODE_NO_PROFILE
) in logcat,hasProfileEnqueuedForCompilation
returnstrue
via the debugger.The debuggable version of Now in Android does not have a baseline profile. So the result code
0
is correct.hasProfileEnqueuedForCompilation
only responds tomHasCurrentProfile
which seems to be insufficient, especially if there's no profile available.