Status Update
Comments
ra...@google.com <ra...@google.com> #2
How are you generating the startup profile ? Are you using the gradle plugin or are you doing this on your own ?
Is there a way for you to share your code / provide a way for us to reproduce this issue ?
ch...@google.com <ch...@google.com> #3
Thanks for reporting this. The dex layout optimization does not directly alter any code objects, thus this VerifyError
is somewhat orthogonal to the use of the startup profile. The startup profile may prohibit some optimizations that could negatively impact app startup, which may explain why you are seeing this after adding a startup profile.
In order to diagnose this we will need more information.
Would it be possible for you to share a zip dump of the compiler inputs, including the app's Java class files, keep rules, etc.?
You can generate such a dump by issuing the following command.
./gradlew assembleRelease --no-daemon -Dcom.android.tools.r8.dumpinputtodirectory=/path/to/r8/dumps
You can share the zip dump privately with
See also
il...@gmail.com <il...@gmail.com> #4
Thank you for getting back to me. I've collected the R8 dumps and shared them with you.
ch...@google.com <ch...@google.com> #5
Thanks for sharing. I was able to reproduce the issue from the compiler dump and will start diagnosing the issue.
ap...@google.com <ap...@google.com> #6
Branch: main
commit 7cfc5b65a937a35a9f5b8afa1cdccb1fb1ee03c4
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Jun 01 09:38:17 2023
Fix inadequate force inlining with startup profile
Bug:
Change-Id: Idc8fbd95cd3973401d47b3c9182cfbe28b0abbb8
M src/main/java/com/android/tools/r8/features/FeatureSplitBoundaryOptimizationUtils.java
M src/test/java/com/android/tools/r8/startup/ForceInlineAfterVerticalClassMergingStartupTest.java
ap...@google.com <ap...@google.com> #7
Branch: main
commit 41cbbaf377e1d6b979e3da10babae9b065f82ca4
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Jun 01 09:37:46 2023
Reproduce inadequate force inlining with startup profile
Bug:
Change-Id: I2e1b46e672d54294882de7fdaf9ee5c2fb4a5a26
A src/test/java/com/android/tools/r8/startup/ForceInlineAfterVerticalClassMergingStartupTest.java
ch...@google.com <ch...@google.com> #8
This should now be fixed. The fix should land shortly in R8 8.1.53 and when the next version of R8 8.2 is made (8.2.10-dev). This should land in AGP 8.2.0-alpha09.
il...@gmail.com <il...@gmail.com> #9
Thanks for fixing that bug so quickly. Appreciate your work!
ap...@google.com <ap...@google.com> #10
Branch: 8.1
commit cfebaa6900ac3024a46a05fdc7960b58b9121672
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Jun 01 10:54:26 2023
Version 8.1.53
Bug:
Change-Id: Ieabd217192a2daf831befcec640df0f1ae8fbc64
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #11
Branch: 8.1
commit 6ffe085ffe3dca175ac081e15578632fb664047d
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Jun 01 10:54:13 2023
Fix inadequate force inlining with startup profile
Bug:
Change-Id: Idc8fbd95cd3973401d47b3c9182cfbe28b0abbb8
M src/main/java/com/android/tools/r8/features/FeatureSplitBoundaryOptimizationUtils.java
M src/test/java/com/android/tools/r8/startup/ForceInlineAfterVerticalClassMergingStartupTest.java
ap...@google.com <ap...@google.com> #12
Branch: 8.1
commit 625220633518a12c5d97f7888a3616bea959c0a4
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Thu Jun 01 10:54:03 2023
Reproduce inadequate force inlining with startup profile
Bug:
Change-Id: I2e1b46e672d54294882de7fdaf9ee5c2fb4a5a26
A src/test/java/com/android/tools/r8/startup/ForceInlineAfterVerticalClassMergingStartupTest.java
ra...@google.com <ra...@google.com> #13
Can you please try using a new R8 version in the build to see if that resolves your issue ? You should be able to do something like:
pluginManagement {
buildscript {
repositories {
google()
mavenCentral()
maven {
url = uri("https://storage.googleapis.com/r8-releases/raw/main")
}
}
dependencies {
// https://r8.googlesource.com/r8/+log/refs/heads/main
classpath("com.android.tools:r8:7cfc5b65a937a35a9f5b8afa1cdccb1fb1ee03c4")
}
}
// ...
}
il...@gmail.com <il...@gmail.com> #14
Hi! Yes, the issue is now resolved with the newest R8 revisions. Thank you!
sg...@google.com <sg...@google.com> #15
Thanks for trying out the latest main
revision. The fix is merged to the release branch for 8.1, so you should consider using:
pluginManagement {
buildscript {
repositories {
google()
mavenCentral()
maven {
url = uri("https://storage.googleapis.com/r8-releases/raw")
}
}
dependencies {
// https://r8.googlesource.com/r8/+log/refs/heads/8.1
classpath("com.android.tools:r8:8.1.53")
}
}
// ...
}
Description
Hello team! I'm trying to play around with startup profiles and dex-startup-optimization, but the final build results in the next exception. Any ideas on how can we debug and troubleshoot it?
Devices/Android versions reproduced on: Pixel 6 Pro
Env:
Deps: