diff options
author | Vladimir Marko <vmarko@google.com> | 2024-04-30 13:50:20 +0200 |
---|---|---|
committer | VladimĂr Marko <vmarko@google.com> | 2024-05-02 11:30:36 +0000 |
commit | e679afd5437f87cbbd5e735a1da707e32d550147 (patch) | |
tree | 2b62b05f4771a4e90d291ba4b175d8bc676f2730 | |
parent | 143bd67b70818587f96dd20e8bb9d7c2a8824def (diff) | |
download | art-e679afd5437f87cbbd5e735a1da707e32d550147.tar.gz |
Clean up `SkipClass()` in `CompilerDriver()`.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I1bf923406e4e28b0ba483e82b02e195c4b3c9837
-rw-r--r-- | dex2oat/driver/compiler_driver.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/dex2oat/driver/compiler_driver.cc b/dex2oat/driver/compiler_driver.cc index 329c0d76a1..e830e86d90 100644 --- a/dex2oat/driver/compiler_driver.cc +++ b/dex2oat/driver/compiler_driver.cc @@ -1641,7 +1641,7 @@ class ParallelCompilationManager { static bool SkipClass(jobject class_loader, const DexFile& dex_file, ObjPtr<mirror::Class> klass) REQUIRES_SHARED(Locks::mutator_lock_) { DCHECK(klass != nullptr); - const DexFile& original_dex_file = *klass->GetDexCache()->GetDexFile(); + const DexFile& original_dex_file = klass->GetDexFile(); if (&dex_file != &original_dex_file) { if (class_loader == nullptr) { LOG(WARNING) << "Skipping class " << klass->PrettyDescriptor() << " from " @@ -2029,10 +2029,10 @@ class VerifyClassVisitor : public CompilationVisitor { break; } } - } else if (&klass->GetDexFile() != &dex_file) { + } else if (SkipClass(jclass_loader, dex_file, klass.Get())) { // Skip a duplicate class (as the resolved class is from another, earlier dex file). return; // Do not update state. - } else if (!SkipClass(jclass_loader, dex_file, klass.Get())) { + } else { CHECK(klass->IsResolved()) << klass->PrettyClass(); failure_kind = class_linker->VerifyClass(soa.Self(), soa.Self()->GetVerifierDeps(), @@ -2092,9 +2092,6 @@ class VerifyClassVisitor : public CompilationVisitor { DCHECK_EQ(failure_kind, verifier::FailureKind::kHardFailure); } } - } else { - // Make the skip a soft failure, essentially being considered as verify at runtime. - failure_kind = verifier::FailureKind::kSoftFailure; } verifier::VerifierDeps::MaybeRecordVerificationStatus(soa.Self()->GetVerifierDeps(), dex_file, @@ -2708,8 +2705,6 @@ static void CompileDexFile(CompilerDriver* driver, soa.Self()->ClearException(); dex_cache = hs.NewHandle(class_linker->FindDexCache(soa.Self(), dex_file)); } else if (SkipClass(jclass_loader, dex_file, klass.Get())) { - return; - } else if (&klass->GetDexFile() != &dex_file) { // Skip a duplicate class (as the resolved class is from another, earlier dex file). return; // Do not update state. } else { |