summaryrefslogtreecommitdiff
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r--runtime/class_linker.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 65fe4e4194..89c6a0b717 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -4635,6 +4635,20 @@ bool ClassLinker::VerifyClassUsingOatFile(const DexFile& dex_file,
const OatDexFile* oat_dex_file = dex_file.GetOatDexFile();
// In case we run without an image there won't be a backing oat file.
if (oat_dex_file == nullptr || oat_dex_file->GetOatFile() == nullptr) {
+ if (!kIsDebugBuild && klass->GetClassLoader() == nullptr) {
+ // For boot classpath classes in the case we're not using a default boot image:
+ // we don't have the infrastructure yet to query verification data on individual
+ // boot vdex files, so it's simpler for now to consider all boot classpath classes
+ // verified. This should be taken into account when measuring boot time and app
+ // startup compare to the (current) production system where both:
+ // 1) updatable boot classpath classes, and
+ // 2) classes in /system referencing updatable classes
+ // will be verified at runtime.
+ if (!Runtime::Current()->IsUsingDefaultBootImageLocation()) {
+ oat_file_class_status = ClassStatus::kVerified;
+ return true;
+ }
+ }
return false;
}