summaryrefslogtreecommitdiff
path: root/compiler/optimizing/loop_analysis.h
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2023-05-15 12:52:41 +0100
committer Jiakai Zhang <jiakaiz@google.com> 2023-05-17 17:32:48 +0000
commit1e023a12fe510f259f7f2ca065591719172f3628 (patch)
tree1268dfaa9b2589965c6100e0b7b3ffab4cd7f6ab /compiler/optimizing/loop_analysis.h
parenta476f1aed79b4d714bb4d71a777bcb639c8a23eb (diff)
Check whether the APK has code before recording JIT profile information.
In the past, Package Manager created empty profile files for APKs that have code, and the runtime did a file existence check (removed by aosp/2407152). With ART Service, no empty profile files are created, so we have no clue whether the APK has code or not. After this change, the runtime opens the APK to check whether the APK has code or not. This change prevents the runtime from writing bootclasspath profiling info to profile files for APKs that have no code. Such files are not suitable for bootclasspath profiling because ART Service has a file GC that cleans them up during daily bg dexopt. This change admittedly makes `Runtime::RegisterAppInfo` slower because it takes some time to open the APK, but in practice, it's okay because Framework creates a classloader for the APK right after calling `Runtime::RegisterAppInfo`, which also involves opening the APK, and that open will be faster after this change. Bug: 282191456 Test: art/test.py -b --host -r -t 595-profile-saving Change-Id: If6ed139dcb7993402ded60a3bbd8fc0530a9c20e
Diffstat (limited to 'compiler/optimizing/loop_analysis.h')
0 files changed, 0 insertions, 0 deletions