summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2016-02-19 12:27:55 +0000
committer Vladimir Marko <vmarko@google.com> 2016-02-24 11:19:23 +0000
commit944da603cde59a4277f3bbc31d860a90842a1a2a (patch)
tree733bc38a905822097a6a601a1de20b49f54440d3 /compiler/driver/compiler_driver.h
parent52d9c2f0c584877e9c7f9e859d8068b3a2ccb12f (diff)
ART: Allow method references across oat files for multi-image, 2nd attempt.
These were disabled because we didn't have sufficient information about the multi-image layout when processing link-time patches in OatWriter. This CL refactors the ELF file creation so that the information is available. Also clean up ImageWriter to use oat file indexes instead of filenames and avoid reopening the oat file to retrieve the checksum. Change-Id: Icc7b528deca29da1e473c8f079521a36d6c4892f
Diffstat (limited to 'compiler/driver/compiler_driver.h')
-rw-r--r--compiler/driver/compiler_driver.h25
1 files changed, 5 insertions, 20 deletions
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index 5e35cbb309..ca340ee92c 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -94,9 +94,11 @@ class CompilerDriver {
bool boot_image, std::unordered_set<std::string>* image_classes,
std::unordered_set<std::string>* compiled_classes,
std::unordered_set<std::string>* compiled_methods,
- size_t thread_count, bool dump_stats, bool dump_passes,
- CumulativeLogger* timer, int swap_fd,
- const std::unordered_map<const DexFile*, const char*>* dex_to_oat_map,
+ size_t thread_count,
+ bool dump_stats,
+ bool dump_passes,
+ CumulativeLogger* timer,
+ int swap_fd,
const ProfileCompilationInfo* profile_compilation_info);
~CompilerDriver();
@@ -113,20 +115,6 @@ class CompilerDriver {
: ArrayRef<const DexFile* const>();
}
- // Are the given dex files compiled into the same oat file? Should only be called after
- // GetDexFilesForOatFile, as the conservative answer (when we don't have a map) is true.
- bool AreInSameOatFile(const DexFile* d1, const DexFile* d2) {
- if (dex_file_oat_filename_map_ == nullptr) {
- // TODO: Check for this wrt/ apps and boot image calls.
- return true;
- }
- auto it1 = dex_file_oat_filename_map_->find(d1);
- DCHECK(it1 != dex_file_oat_filename_map_->end());
- auto it2 = dex_file_oat_filename_map_->find(d2);
- DCHECK(it2 != dex_file_oat_filename_map_->end());
- return it1->second == it2->second;
- }
-
void CompileAll(jobject class_loader,
const std::vector<const DexFile*>& dex_files,
TimingLogger* timings)
@@ -700,9 +688,6 @@ class CompilerDriver {
// List of dex files that will be stored in the oat file.
const std::vector<const DexFile*>* dex_files_for_oat_file_;
- // Map from dex files to the oat file (name) they will be compiled into.
- const std::unordered_map<const DexFile*, const char*>* dex_file_oat_filename_map_;
-
CompiledMethodStorage compiled_method_storage_;
// Info for profile guided compilation.