diff options
author | 2023-11-13 17:57:55 +0000 | |
---|---|---|
committer | 2023-11-13 19:59:24 +0000 | |
commit | d5e5b4a2d9a72edb4cd3de1deffb265772e009b3 (patch) | |
tree | e1e74f371800d9698b8b0c2ddd27d735b696a0ec /runtime/javaheapprof/javaheapsampler.h | |
parent | 854b363b284592d0bbfdbe31eb487fa64a4b9471 (diff) |
Improve the error message for a bad embedded profile.
Because we extract the embedded profile to a memfd and reopen the memfd
with readonly to make SELinux happy, the path populated in the error
message is something like '/proc/self/fd/<fd>'. The full error message
is like:
adb: failed to install CtsCompilationApp_with_bad_profile.apk: Warning: Error occurred during dexopt when processing external profiles:
Failed to load profile '/proc/self/fd/8': The profile does not match the APK (The checksums in the profile do not match the checksums of the .dex files in the APK)
This is confusing to app developers. To fix it, this change keeps the
debug path of the memfd when reopening it. After the change, the full
error message is like:
adb: failed to install CtsCompilationApp_with_bad_profile.apk: Warning: Error occurred during dexopt when processing external profiles:
Failed to load profile 'assets/art-profile/baseline.prof extracted in memory from /data/app/~~mrizrDZHhTbOuf9bsStbTg==/android.compilation.cts-JwRoNgtNyp9wdW66ynnQgA==/base.apk': The profile does not match the APK (The checksums in the profile do not match the checksums of the .dex files in the APK)
Bug: 257532944
Test: `adb install` an APK with a bad embedded profile.
Change-Id: I2a82680a340a47dbf8fbc45639e2d14991e6acfa
Diffstat (limited to 'runtime/javaheapprof/javaheapsampler.h')
0 files changed, 0 insertions, 0 deletions