continue;
}
const DexFile* dex_file = dex_cache->GetDexFile();
+ CHECK(dex_file_oat_index_map_.find(dex_file) != dex_file_oat_index_map_.end())
+ << "Dex cache should have been pruned " << dex_file->GetLocation()
+ << "; possibly in class path";
DexCacheArraysLayout layout(target_ptr_size_, dex_file);
DCHECK(layout.Valid());
size_t oat_index = GetOatIndexForDexCache(dex_cache);
CHECK(runtime != nullptr);
std::set<DexCacheResolvedClasses> resolved_classes(
profile_compilation_info_->GetResolvedClasses());
+
+ // Filter out class path classes since we don't want to include these in the image.
+ std::unordered_set<std::string> dex_files_locations;
+ for (const DexFile* dex_file : dex_files_) {
+ dex_files_locations.insert(dex_file->GetLocation());
+ }
+ for (auto it = resolved_classes.begin(); it != resolved_classes.end(); ) {
+ if (dex_files_locations.find(it->GetDexLocation()) == dex_files_locations.end()) {
+ VLOG(compiler) << "Removed profile samples for non-app dex file " << it->GetDexLocation();
+ it = resolved_classes.erase(it);
+ } else {
+ ++it;
+ }
+ }
+
image_classes_.reset(new std::unordered_set<std::string>(
runtime->GetClassLinker()->GetClassDescriptorsForProfileKeys(resolved_classes)));
VLOG(compiler) << "Loaded " << image_classes_->size()
bool multi_image_;
bool is_host_;
std::string android_root_;
+ // Dex files we are compiling, does not include the class path dex files.
std::vector<const DexFile*> dex_files_;
std::string no_inline_from_string_;
std::vector<jobject> dex_caches_;