diff options
author | 2025-02-17 14:21:07 +0000 | |
---|---|---|
committer | 2025-02-18 07:19:47 -0800 | |
commit | cb3c3b2819f326d54a6bd960a9a82c5290aa69b0 (patch) | |
tree | 1b71adef87aeebc9bdf92f6c66330c3a31fa1877 /dex2oat/common_compiler_driver_test.cc | |
parent | b4d4a7c4c368272c4368db35ddffbd8fcab544fb (diff) |
Do not inline a method that was marked as un-compilable.
The compiler may have internally mark a method as not compilable. Do not
clear the verification results from the compiler callbacks, we still
need them during compilation.
Test: 860-vdex-failure
Bug: 395243275
Change-Id: I79ba61eb8a7ba6729b22c4c27fa83d8373fce03a
Diffstat (limited to 'dex2oat/common_compiler_driver_test.cc')
-rw-r--r-- | dex2oat/common_compiler_driver_test.cc | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/dex2oat/common_compiler_driver_test.cc b/dex2oat/common_compiler_driver_test.cc index 81e06b2345..7ce5e94bcd 100644 --- a/dex2oat/common_compiler_driver_test.cc +++ b/dex2oat/common_compiler_driver_test.cc @@ -28,7 +28,7 @@ namespace art { -CommonCompilerDriverTest::CommonCompilerDriverTest() : inaccessible_page_(nullptr) {} +CommonCompilerDriverTest::CommonCompilerDriverTest() {} CommonCompilerDriverTest::~CommonCompilerDriverTest() {} void CommonCompilerDriverTest::CompileAll(jobject class_loader, @@ -44,13 +44,7 @@ void CommonCompilerDriverTest::CompileAll(jobject class_loader, timings, &compiler_options_->image_classes_); - // Verification results in the `callback_` should not be used during compilation. - down_cast<QuickCompilerCallbacks*>(callbacks_.get())->SetVerificationResults( - reinterpret_cast<VerificationResults*>(inaccessible_page_)); compiler_driver_->CompileAll(class_loader, dex_files, timings); - down_cast<QuickCompilerCallbacks*>(callbacks_.get())->SetVerificationResults( - verification_results_.get()); - compiler_driver_->FreeThreadPools(); } @@ -107,19 +101,9 @@ void CommonCompilerDriverTest::SetUp() { CommonCompilerTest::SetUp(); CreateCompilerDriver(); - - // Note: We cannot use MemMap because some tests tear down the Runtime and destroy - // the gMaps, so when destroying the MemMap, the test would crash. - const size_t page_size = MemMap::GetPageSize(); - inaccessible_page_ = mmap(nullptr, page_size, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - CHECK(inaccessible_page_ != MAP_FAILED) << strerror(errno); } void CommonCompilerDriverTest::TearDown() { - if (inaccessible_page_ != nullptr) { - munmap(inaccessible_page_, MemMap::GetPageSize()); - inaccessible_page_ = nullptr; - } image_reservation_.Reset(); compiler_driver_.reset(); verification_results_.reset(); |