diff options
author | 2018-05-25 14:31:16 -0700 | |
---|---|---|
committer | 2018-05-25 14:41:27 -0700 | |
commit | 2eabc61c9592f18eb02211dd3e76e6d7e6793747 (patch) | |
tree | 7dbd72abe2ea0334f9b245b2bc633744ed508916 /compiler/driver/compiler_driver.cc | |
parent | ad70b322fe9b2d3601dcdcfab915b651716ee448 (diff) |
Fix class_def_idx increment for FastVerify
Fixes vdex golem benchmarks.
Also fixed logic that was overwriting the expected ClassStatus for
debug builds. This is why the tests were passing but the CHECK was
failing for non debug dex2oat.
Added regression test in dex2oat_test.
Bug: 80309967
Test: test-art-host
Change-Id: I91c48ffbe894ab471572418142fcb4ae85bf0864
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r-- | compiler/driver/compiler_driver.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 1b809d232a..decb330f3b 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -1935,11 +1935,10 @@ bool CompilerDriver::FastVerify(jobject jclass_loader, // Just update the compiled_classes_ map. The compiler doesn't need to resolve // the type. ClassReference ref(dex_file, class_def_idx); - ClassStatus existing = ClassStatus::kNotReady; - DCHECK(compiled_classes_.Get(ref, &existing)) << ref.dex_file->GetLocation(); + const ClassStatus existing = ClassStatus::kNotReady; ClassStateTable::InsertResult result = compiled_classes_.Insert(ref, existing, ClassStatus::kVerified); - CHECK_EQ(result, ClassStateTable::kInsertResultSuccess); + CHECK_EQ(result, ClassStateTable::kInsertResultSuccess) << ref.dex_file->GetLocation(); } else { // Update the class status, so later compilation stages know they don't need to verify // the class. @@ -1962,8 +1961,8 @@ bool CompilerDriver::FastVerify(jobject jclass_loader, class_loader, soa.Self()); } + ++class_def_idx; } - ++class_def_idx; } return true; } |