diff options
author | 2017-10-10 11:54:29 -0700 | |
---|---|---|
committer | 2017-10-11 14:47:06 -0700 | |
commit | 79c87da9d4698ec58ece65af0065eebd55a1cfe0 (patch) | |
tree | 399797f37712da9d20829d5b5059b6c84943cb02 /runtime/jit/jit_code_cache.cc | |
parent | 656e97f949df4081fba908113406b32915174502 (diff) |
Add DexFileLoader class
Added DexFileLoader class, moved functionality from DexFile there:
- Multidex loading logic
- DexFile opening logic for Zip and etc
- Some other helpers
Bug: 63756964
Test: test-art-host
Change-Id: Ic3dfa458947d4b69912dea5cdd836e7e8f55061c
Diffstat (limited to 'runtime/jit/jit_code_cache.cc')
-rw-r--r-- | runtime/jit/jit_code_cache.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc index e122c6da20..47615f56fe 100644 --- a/runtime/jit/jit_code_cache.cc +++ b/runtime/jit/jit_code_cache.cc @@ -26,6 +26,7 @@ #include "base/time_utils.h" #include "cha.h" #include "debugger_interface.h" +#include "dex_file_loader.h" #include "entrypoints/runtime_asm_entrypoints.h" #include "gc/accounting/bitmap-inl.h" #include "gc/scoped_gc_critical_section.h" @@ -1350,7 +1351,8 @@ void JitCodeCache::GetProfiledMethods(const std::set<std::string>& dex_base_loca for (const ProfilingInfo* info : profiling_infos_) { ArtMethod* method = info->GetMethod(); const DexFile* dex_file = method->GetDexFile(); - if (!ContainsElement(dex_base_locations, dex_file->GetBaseLocation())) { + const std::string base_location = DexFileLoader::GetBaseLocation(dex_file->GetLocation()); + if (!ContainsElement(dex_base_locations, base_location)) { // Skip dex files which are not profiled. continue; } @@ -1404,7 +1406,8 @@ void JitCodeCache::GetProfiledMethods(const std::set<std::string>& dex_base_loca is_missing_types = true; continue; } - if (ContainsElement(dex_base_locations, class_dex_file->GetBaseLocation())) { + if (ContainsElement(dex_base_locations, + DexFileLoader::GetBaseLocation(class_dex_file->GetLocation()))) { // Only consider classes from the same apk (including multidex). profile_classes.emplace_back(/*ProfileMethodInfo::ProfileClassReference*/ class_dex_file, type_index); |