diff options
| author | 2018-06-27 15:49:25 +0000 | |
|---|---|---|
| committer | 2018-06-27 15:49:25 +0000 | |
| commit | f5020eecfde4e91e4499418f9e189f08cd4ecbd5 (patch) | |
| tree | f4777bfc1b122a4c9dfa15e7eb35ac3c306baf2f | |
| parent | 0028ce042e6b0f8446d59d0632c344824aae20fc (diff) | |
| parent | b40d361019897e8b8484b772ccc0be433abafb5f (diff) | |
Merge "ART: Finish old move of OatDexFile"
| -rw-r--r-- | dex2oat/linker/oat_writer_test.cc | 4 | ||||
| -rw-r--r-- | oatdump/oatdump.cc | 33 | ||||
| -rw-r--r-- | runtime/art_method.cc | 2 | ||||
| -rw-r--r-- | runtime/class_linker.cc | 4 | ||||
| -rw-r--r-- | runtime/gc/space/image_space.cc | 8 | ||||
| -rw-r--r-- | runtime/oat_file.cc | 57 | ||||
| -rw-r--r-- | runtime/oat_file.h | 2 | ||||
| -rw-r--r-- | runtime/oat_file_assistant.cc | 6 | ||||
| -rw-r--r-- | runtime/runtime.cc | 2 | ||||
| -rw-r--r-- | test/117-nopatchoat/nopatchoat.cc | 6 | ||||
| -rw-r--r-- | test/common/runtime_state.cc | 4 |
11 files changed, 61 insertions, 67 deletions
diff --git a/dex2oat/linker/oat_writer_test.cc b/dex2oat/linker/oat_writer_test.cc index 85eaa844d2..7aa1ebb98e 100644 --- a/dex2oat/linker/oat_writer_test.cc +++ b/dex2oat/linker/oat_writer_test.cc @@ -425,8 +425,8 @@ TEST_F(OatTest, WriteRead) { ASSERT_TRUE(java_lang_dex_file_ != nullptr); const DexFile& dex_file = *java_lang_dex_file_; uint32_t dex_file_checksum = dex_file.GetLocationChecksum(); - const OatFile::OatDexFile* oat_dex_file = oat_file->GetOatDexFile(dex_file.GetLocation().c_str(), - &dex_file_checksum); + const OatDexFile* oat_dex_file = oat_file->GetOatDexFile(dex_file.GetLocation().c_str(), + &dex_file_checksum); ASSERT_TRUE(oat_dex_file != nullptr); CHECK_EQ(dex_file.GetLocationChecksum(), oat_dex_file->GetDexFileLocationChecksum()); ScopedObjectAccess soa(Thread::Current()); diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc index 2b0095ce27..21ce8c84c4 100644 --- a/oatdump/oatdump.cc +++ b/oatdump/oatdump.cc @@ -115,10 +115,9 @@ const char* image_roots_descriptions_[] = { }; // Map is so that we don't allocate multiple dex files for the same OatDexFile. -static std::map<const OatFile::OatDexFile*, - std::unique_ptr<const DexFile>> opened_dex_files; +static std::map<const OatDexFile*, std::unique_ptr<const DexFile>> opened_dex_files; -const DexFile* OpenDexFile(const OatFile::OatDexFile* oat_dex_file, std::string* error_msg) { +const DexFile* OpenDexFile(const OatDexFile* oat_dex_file, std::string* error_msg) { DCHECK(oat_dex_file != nullptr); auto it = opened_dex_files.find(oat_dex_file); if (it != opened_dex_files.end()) { @@ -240,15 +239,15 @@ class OatSymbolizer FINAL { } void Walk() { - std::vector<const OatFile::OatDexFile*> oat_dex_files = oat_file_->GetOatDexFiles(); + std::vector<const OatDexFile*> oat_dex_files = oat_file_->GetOatDexFiles(); for (size_t i = 0; i < oat_dex_files.size(); i++) { - const OatFile::OatDexFile* oat_dex_file = oat_dex_files[i]; + const OatDexFile* oat_dex_file = oat_dex_files[i]; CHECK(oat_dex_file != nullptr); WalkOatDexFile(oat_dex_file); } } - void WalkOatDexFile(const OatFile::OatDexFile* oat_dex_file) { + void WalkOatDexFile(const OatDexFile* oat_dex_file) { std::string error_msg; const DexFile* const dex_file = OpenDexFile(oat_dex_file, &error_msg); if (dex_file == nullptr) { @@ -529,7 +528,7 @@ class OatDumper { // Dumping the dex file overview is compact enough to do even if header only. for (size_t i = 0; i < oat_dex_files_.size(); i++) { - const OatFile::OatDexFile* oat_dex_file = oat_dex_files_[i]; + const OatDexFile* oat_dex_file = oat_dex_files_[i]; CHECK(oat_dex_file != nullptr); std::string error_msg; const DexFile* const dex_file = OpenDexFile(oat_dex_file, &error_msg); @@ -598,7 +597,7 @@ class OatDumper { << "\n"; } for (size_t i = 0; i < oat_dex_files_.size(); i++) { - const OatFile::OatDexFile* oat_dex_file = oat_dex_files_[i]; + const OatDexFile* oat_dex_file = oat_dex_files_[i]; CHECK(oat_dex_file != nullptr); if (!DumpOatDexFile(os, *oat_dex_file)) { success = false; @@ -630,7 +629,7 @@ class OatDumper { size_t i = 0; for (const auto& vdex_dex_file : vdex_dex_files) { - const OatFile::OatDexFile* oat_dex_file = oat_dex_files_[i]; + const OatDexFile* oat_dex_file = oat_dex_files_[i]; CHECK(oat_dex_file != nullptr); CHECK(vdex_dex_file != nullptr); if (!ExportDexFile(os, *oat_dex_file, vdex_dex_file.get())) { @@ -670,7 +669,7 @@ class OatDumper { const void* GetQuickOatCode(ArtMethod* m) REQUIRES_SHARED(Locks::mutator_lock_) { for (size_t i = 0; i < oat_dex_files_.size(); i++) { - const OatFile::OatDexFile* oat_dex_file = oat_dex_files_[i]; + const OatDexFile* oat_dex_file = oat_dex_files_[i]; CHECK(oat_dex_file != nullptr); std::string error_msg; const DexFile* const dex_file = OpenDexFile(oat_dex_file, &error_msg); @@ -786,7 +785,7 @@ class OatDumper { // region, so if we keep a sorted sequence of the start of each region, we can infer the length // of a piece of code by using upper_bound to find the start of the next region. for (size_t i = 0; i < oat_dex_files_.size(); i++) { - const OatFile::OatDexFile* oat_dex_file = oat_dex_files_[i]; + const OatDexFile* oat_dex_file = oat_dex_files_[i]; CHECK(oat_dex_file != nullptr); std::string error_msg; const DexFile* const dex_file = OpenDexFile(oat_dex_file, &error_msg); @@ -825,7 +824,7 @@ class OatDumper { offsets_.insert(oat_method.GetVmapTableOffset()); } - bool DumpOatDexFile(std::ostream& os, const OatFile::OatDexFile& oat_dex_file) { + bool DumpOatDexFile(std::ostream& os, const OatDexFile& oat_dex_file) { bool success = true; bool stop_analysis = false; os << "OatDexFile:\n"; @@ -906,9 +905,7 @@ class OatDumper { // Dex resource is extracted from the oat_dex_file and its checksum is repaired since it's not // unquickened. Otherwise the dex_file has been fully unquickened and is expected to verify the // original checksum. - bool ExportDexFile(std::ostream& os, - const OatFile::OatDexFile& oat_dex_file, - const DexFile* dex_file) { + bool ExportDexFile(std::ostream& os, const OatDexFile& oat_dex_file, const DexFile* dex_file) { std::string error_msg; std::string dex_file_location = oat_dex_file.GetDexFileLocation(); size_t fsize = oat_dex_file.FileSize(); @@ -1717,7 +1714,7 @@ class OatDumper { } const OatFile& oat_file_; - const std::vector<const OatFile::OatDexFile*> oat_dex_files_; + const std::vector<const OatDexFile*> oat_dex_files_; const OatDumperOptions& options_; uint32_t resolved_addr2instr_; const InstructionSet instruction_set_; @@ -1856,7 +1853,7 @@ class ImageDumper { oat_dumper_.reset(new OatDumper(*oat_file, *oat_dumper_options_)); - for (const OatFile::OatDexFile* oat_dex_file : oat_file->GetOatDexFiles()) { + for (const OatDexFile* oat_dex_file : oat_file->GetOatDexFiles()) { CHECK(oat_dex_file != nullptr); stats_.oat_dex_file_sizes.push_back(std::make_pair(oat_dex_file->GetDexFileLocation(), oat_dex_file->FileSize())); @@ -2782,7 +2779,7 @@ static jobject InstallOatFile(Runtime* runtime, OatFile* oat_file_ptr = oat_file.get(); ClassLinker* class_linker = runtime->GetClassLinker(); runtime->GetOatFileManager().RegisterOatFile(std::move(oat_file)); - for (const OatFile::OatDexFile* odf : oat_file_ptr->GetOatDexFiles()) { + for (const OatDexFile* odf : oat_file_ptr->GetOatDexFiles()) { std::string error_msg; const DexFile* const dex_file = OpenDexFile(odf, &error_msg); CHECK(dex_file != nullptr) << error_msg; diff --git a/runtime/art_method.cc b/runtime/art_method.cc index 5b4dcb73fd..80b6921c8a 100644 --- a/runtime/art_method.cc +++ b/runtime/art_method.cc @@ -550,7 +550,7 @@ bool ArtMethod::EqualParameters(Handle<mirror::ObjectArray<mirror::Class>> param ArrayRef<const uint8_t> ArtMethod::GetQuickenedInfo() { const DexFile& dex_file = GetDeclaringClass()->GetDexFile(); - const OatFile::OatDexFile* oat_dex_file = dex_file.GetOatDexFile(); + const OatDexFile* oat_dex_file = dex_file.GetOatDexFile(); if (oat_dex_file == nullptr || (oat_dex_file->GetOatFile() == nullptr)) { return ArrayRef<const uint8_t>(); } diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index 7b92ba41a5..c219d3dd68 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -1338,7 +1338,7 @@ static std::unique_ptr<const DexFile> OpenOatDexFile(const OatFile* oat_file, REQUIRES_SHARED(Locks::mutator_lock_) { DCHECK(error_msg != nullptr); std::unique_ptr<const DexFile> dex_file; - const OatFile::OatDexFile* oat_dex_file = oat_file->GetOatDexFile(location, nullptr, error_msg); + const OatDexFile* oat_dex_file = oat_file->GetOatDexFile(location, nullptr, error_msg); if (oat_dex_file == nullptr) { return std::unique_ptr<const DexFile>(); } @@ -4181,7 +4181,7 @@ bool ClassLinker::VerifyClassUsingOatFile(const DexFile& dex_file, } } - const OatFile::OatDexFile* oat_dex_file = dex_file.GetOatDexFile(); + 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) { return false; diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc index e754fbcbae..cbce940337 100644 --- a/runtime/gc/space/image_space.cc +++ b/runtime/gc/space/image_space.cc @@ -1875,7 +1875,7 @@ std::string ImageSpace::GetMultiImageBootClassPath( bool ImageSpace::ValidateOatFile(const OatFile& oat_file, std::string* error_msg) { const ArtDexFileLoader dex_file_loader; - for (const OatFile::OatDexFile* oat_dex_file : oat_file.GetOatDexFiles()) { + for (const OatDexFile* oat_dex_file : oat_file.GetOatDexFiles()) { const std::string& dex_file_location = oat_dex_file->GetDexFileLocation(); // Skip multidex locations - These will be checked when we visit their @@ -1909,9 +1909,9 @@ bool ImageSpace::ValidateOatFile(const OatFile& oat_file, std::string* error_msg std::string multi_dex_location = DexFileLoader::GetMultiDexLocation( i, dex_file_location.c_str()); - const OatFile::OatDexFile* multi_dex = oat_file.GetOatDexFile(multi_dex_location.c_str(), - nullptr, - error_msg); + const OatDexFile* multi_dex = oat_file.GetOatDexFile(multi_dex_location.c_str(), + nullptr, + error_msg); if (multi_dex == nullptr) { *error_msg = StringPrintf("ValidateOatFile oat file '%s' is missing entry '%s'", oat_file.GetLocation().c_str(), diff --git a/runtime/oat_file.cc b/runtime/oat_file.cc index 9355ae720d..8842942e7a 100644 --- a/runtime/oat_file.cc +++ b/runtime/oat_file.cc @@ -1598,9 +1598,9 @@ ArrayRef<GcRoot<mirror::Object>> OatFile::GetBssGcRoots() const { } } -const OatFile::OatDexFile* OatFile::GetOatDexFile(const char* dex_location, - const uint32_t* dex_location_checksum, - std::string* error_msg) const { +const OatDexFile* OatFile::GetOatDexFile(const char* dex_location, + const uint32_t* dex_location_checksum, + std::string* error_msg) const { // NOTE: We assume here that the canonical location for a given dex_location never // changes. If it does (i.e. some symlink used by the filename changes) we may return // an incorrect OatDexFile. As long as we have a checksum to check, we shall return @@ -1609,7 +1609,7 @@ const OatFile::OatDexFile* OatFile::GetOatDexFile(const char* dex_location, // TODO: Additional analysis of usage patterns to see if this can be simplified // without any performance loss, for example by not doing the first lock-free lookup. - const OatFile::OatDexFile* oat_dex_file = nullptr; + const OatDexFile* oat_dex_file = nullptr; StringPiece key(dex_location); // Try to find the key cheaply in the oat_dex_files_ map which holds dex locations // directly mentioned in the oat file and doesn't require locking. @@ -1667,17 +1667,17 @@ const OatFile::OatDexFile* OatFile::GetOatDexFile(const char* dex_location, return oat_dex_file; } -OatFile::OatDexFile::OatDexFile(const OatFile* oat_file, - const std::string& dex_file_location, - const std::string& canonical_dex_file_location, - uint32_t dex_file_location_checksum, - const uint8_t* dex_file_pointer, - const uint8_t* lookup_table_data, - const IndexBssMapping* method_bss_mapping_data, - const IndexBssMapping* type_bss_mapping_data, - const IndexBssMapping* string_bss_mapping_data, - const uint32_t* oat_class_offsets_pointer, - const DexLayoutSections* dex_layout_sections) +OatDexFile::OatDexFile(const OatFile* oat_file, + const std::string& dex_file_location, + const std::string& canonical_dex_file_location, + uint32_t dex_file_location_checksum, + const uint8_t* dex_file_pointer, + const uint8_t* lookup_table_data, + const IndexBssMapping* method_bss_mapping_data, + const IndexBssMapping* type_bss_mapping_data, + const IndexBssMapping* string_bss_mapping_data, + const uint32_t* oat_class_offsets_pointer, + const DexLayoutSections* dex_layout_sections) : oat_file_(oat_file), dex_file_location_(dex_file_location), canonical_dex_file_location_(canonical_dex_file_location), @@ -1708,16 +1708,15 @@ OatFile::OatDexFile::OatDexFile(const OatFile* oat_file, } } -OatFile::OatDexFile::OatDexFile(TypeLookupTable&& lookup_table) - : lookup_table_(std::move(lookup_table)) {} +OatDexFile::OatDexFile(TypeLookupTable&& lookup_table) : lookup_table_(std::move(lookup_table)) {} -OatFile::OatDexFile::~OatDexFile() {} +OatDexFile::~OatDexFile() {} -size_t OatFile::OatDexFile::FileSize() const { +size_t OatDexFile::FileSize() const { return reinterpret_cast<const DexFile::Header*>(dex_file_pointer_)->file_size_; } -std::unique_ptr<const DexFile> OatFile::OatDexFile::OpenDexFile(std::string* error_msg) const { +std::unique_ptr<const DexFile> OatDexFile::OpenDexFile(std::string* error_msg) const { ScopedTrace trace(__PRETTY_FUNCTION__); static constexpr bool kVerify = false; static constexpr bool kVerifyChecksum = false; @@ -1732,11 +1731,11 @@ std::unique_ptr<const DexFile> OatFile::OatDexFile::OpenDexFile(std::string* err error_msg); } -uint32_t OatFile::OatDexFile::GetOatClassOffset(uint16_t class_def_index) const { +uint32_t OatDexFile::GetOatClassOffset(uint16_t class_def_index) const { return oat_class_offsets_pointer_[class_def_index]; } -OatFile::OatClass OatFile::OatDexFile::GetOatClass(uint16_t class_def_index) const { +OatFile::OatClass OatDexFile::GetOatClass(uint16_t class_def_index) const { uint32_t oat_class_offset = GetOatClassOffset(class_def_index); const uint8_t* oat_class_pointer = oat_file_->Begin() + oat_class_offset; @@ -1778,10 +1777,10 @@ OatFile::OatClass OatFile::OatDexFile::GetOatClass(uint16_t class_def_index) con reinterpret_cast<const OatMethodOffsets*>(methods_pointer)); } -const DexFile::ClassDef* OatFile::OatDexFile::FindClassDef(const DexFile& dex_file, - const char* descriptor, - size_t hash) { - const OatFile::OatDexFile* oat_dex_file = dex_file.GetOatDexFile(); +const DexFile::ClassDef* OatDexFile::FindClassDef(const DexFile& dex_file, + const char* descriptor, + size_t hash) { + const OatDexFile* oat_dex_file = dex_file.GetOatDexFile(); DCHECK_EQ(ComputeModifiedUtf8Hash(descriptor), hash); bool used_lookup_table = false; const DexFile::ClassDef* lookup_table_classdef = nullptr; @@ -1829,7 +1828,7 @@ void OatDexFile::MadviseDexFile(const DexFile& dex_file, MadviseState state) { dex_file.Begin() + dex_file.Size(), MADV_RANDOM); } - const OatFile::OatDexFile* oat_dex_file = dex_file.GetOatDexFile(); + const OatDexFile* oat_dex_file = dex_file.GetOatDexFile(); if (oat_dex_file != nullptr) { // Should always be there. const DexLayoutSections* const sections = oat_dex_file->GetDexLayoutSections(); @@ -1947,7 +1946,7 @@ OatFile::OatClass OatFile::FindOatClass(const DexFile& dex_file, uint16_t class_def_idx, bool* found) { DCHECK_NE(class_def_idx, DexFile::kDexNoIndex16); - const OatFile::OatDexFile* oat_dex_file = dex_file.GetOatDexFile(); + const OatDexFile* oat_dex_file = dex_file.GetOatDexFile(); if (oat_dex_file == nullptr || oat_dex_file->GetOatFile() == nullptr) { *found = false; return OatFile::OatClass::Invalid(); @@ -1956,7 +1955,7 @@ OatFile::OatClass OatFile::FindOatClass(const DexFile& dex_file, return oat_dex_file->GetOatClass(class_def_idx); } -void OatFile::OatDexFile::AssertAotCompiler() { +void OatDexFile::AssertAotCompiler() { CHECK(Runtime::Current()->IsAotCompiler()); } diff --git a/runtime/oat_file.h b/runtime/oat_file.h index d72b6a8971..5f87bf0f99 100644 --- a/runtime/oat_file.h +++ b/runtime/oat_file.h @@ -70,8 +70,6 @@ class OatFile { // Special classpath that skips shared library check. static constexpr const char* kSpecialSharedLibrary = "&"; - typedef art::OatDexFile OatDexFile; - // Opens an oat file contained within the given elf file. This is always opened as // non-executable at the moment. static OatFile* OpenWithElfFile(int zip_fd, diff --git a/runtime/oat_file_assistant.cc b/runtime/oat_file_assistant.cc index 6c869cada5..f7c74cc23b 100644 --- a/runtime/oat_file_assistant.cc +++ b/runtime/oat_file_assistant.cc @@ -354,7 +354,7 @@ bool OatFileAssistant::LoadDexFiles( std::vector<std::unique_ptr<const DexFile>>* out_dex_files) { // Load the main dex file. std::string error_msg; - const OatFile::OatDexFile* oat_dex_file = oat_file.GetOatDexFile( + const OatDexFile* oat_dex_file = oat_file.GetOatDexFile( dex_location.c_str(), nullptr, &error_msg); if (oat_dex_file == nullptr) { LOG(WARNING) << error_msg; @@ -453,7 +453,7 @@ bool OatFileAssistant::DexChecksumUpToDate(const OatFile& file, std::string* err for (uint32_t i = 0; i < number_of_dex_files; i++) { std::string dex = DexFileLoader::GetMultiDexLocation(i, dex_location_.c_str()); uint32_t expected_checksum = (*required_dex_checksums)[i]; - const OatFile::OatDexFile* oat_dex_file = file.GetOatDexFile(dex.c_str(), nullptr); + const OatDexFile* oat_dex_file = file.GetOatDexFile(dex.c_str(), nullptr); if (oat_dex_file == nullptr) { *error_msg = StringPrintf("failed to find %s in %s", dex.c_str(), file.GetLocation().c_str()); return false; @@ -921,7 +921,7 @@ const std::vector<uint32_t>* OatFileAssistant::GetRequiredDexChecksums() { required_dex_checksums_found_ = true; for (size_t i = 0; i < odex_file->GetOatHeader().GetDexFileCount(); i++) { std::string dex = DexFileLoader::GetMultiDexLocation(i, dex_location_.c_str()); - const OatFile::OatDexFile* odex_dex_file = odex_file->GetOatDexFile(dex.c_str(), nullptr); + const OatDexFile* odex_dex_file = odex_file->GetOatDexFile(dex.c_str(), nullptr); if (odex_dex_file == nullptr) { required_dex_checksums_found_ = false; break; diff --git a/runtime/runtime.cc b/runtime/runtime.cc index 3b4d177646..f7674c89d3 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -1020,7 +1020,7 @@ static bool OpenDexFilesFromImage(const std::string& image_location, return false; } - for (const OatFile::OatDexFile* oat_dex_file : oat_file->GetOatDexFiles()) { + for (const OatDexFile* oat_dex_file : oat_file->GetOatDexFiles()) { if (oat_dex_file == nullptr) { *failures += 1; continue; diff --git a/test/117-nopatchoat/nopatchoat.cc b/test/117-nopatchoat/nopatchoat.cc index 7c382588a4..a8a895a6b3 100644 --- a/test/117-nopatchoat/nopatchoat.cc +++ b/test/117-nopatchoat/nopatchoat.cc @@ -28,7 +28,7 @@ namespace art { class NoPatchoatTest { public: - static const OatFile::OatDexFile* getOatDexFile(jclass cls) { + static const OatDexFile* getOatDexFile(jclass cls) { ScopedObjectAccess soa(Thread::Current()); ObjPtr<mirror::Class> klass = soa.Decode<mirror::Class>(cls); const DexFile& dex_file = klass->GetDexFile(); @@ -42,13 +42,13 @@ class NoPatchoatTest { } static bool hasExecutableOat(jclass cls) { - const OatFile::OatDexFile* oat_dex_file = getOatDexFile(cls); + const OatDexFile* oat_dex_file = getOatDexFile(cls); return oat_dex_file != nullptr && oat_dex_file->GetOatFile()->IsExecutable(); } static bool needsRelocation(jclass cls) { - const OatFile::OatDexFile* oat_dex_file = getOatDexFile(cls); + const OatDexFile* oat_dex_file = getOatDexFile(cls); if (oat_dex_file == nullptr) { return false; diff --git a/test/common/runtime_state.cc b/test/common/runtime_state.cc index f89888bb99..f2da6febe0 100644 --- a/test/common/runtime_state.cc +++ b/test/common/runtime_state.cc @@ -60,7 +60,7 @@ extern "C" JNIEXPORT jboolean JNICALL Java_Main_hasOatFile(JNIEnv* env, jclass c ObjPtr<mirror::Class> klass = soa.Decode<mirror::Class>(cls); const DexFile& dex_file = klass->GetDexFile(); - const OatFile::OatDexFile* oat_dex_file = dex_file.GetOatDexFile(); + const OatDexFile* oat_dex_file = dex_file.GetOatDexFile(); return (oat_dex_file != nullptr) ? JNI_TRUE : JNI_FALSE; } @@ -100,7 +100,7 @@ extern "C" JNIEXPORT jboolean JNICALL Java_Main_compiledWithOptimizing(JNIEnv* e ObjPtr<mirror::Class> klass = soa.Decode<mirror::Class>(cls); const DexFile& dex_file = klass->GetDexFile(); - const OatFile::OatDexFile* oat_dex_file = dex_file.GetOatDexFile(); + const OatDexFile* oat_dex_file = dex_file.GetOatDexFile(); if (oat_dex_file == nullptr) { // Could be JIT, which also uses optimizing, but conservatively say no. return JNI_FALSE; |