diff options
author | Brian Carlstrom <bdc@google.com> | 2013-07-23 22:35:16 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2013-07-24 09:19:30 -0700 |
commit | c50d8e11a098cc5c6239aa86b47d4fcf8cbb4899 (patch) | |
tree | 4273347ed7aa19c6edbe70e986f588007ec8f5e0 /compiler/driver | |
parent | a3d6b8cb884fce2fe34258e9d582b11ea9545fd9 (diff) | |
download | art-c50d8e11a098cc5c6239aa86b47d4fcf8cbb4899.zip art-c50d8e11a098cc5c6239aa86b47d4fcf8cbb4899.tar.gz art-c50d8e11a098cc5c6239aa86b47d4fcf8cbb4899.tar.bz2 |
Remove OatWriter buffering to memory for ElfWriterQuick
This allows the oat contents to be directly written to the file.
Change-Id: Ibc7ddf57477b152f07784b52f7334be73fd22833
Diffstat (limited to 'compiler/driver')
-rw-r--r-- | compiler/driver/compiler_driver.cc | 6 | ||||
-rw-r--r-- | compiler/driver/compiler_driver.h | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 1f66730..ea2291c 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -2343,13 +2343,13 @@ bool CompilerDriver::RequiresConstructorBarrier(Thread* self, const DexFile* dex bool CompilerDriver::WriteElf(const std::string& android_root, bool is_host, const std::vector<const art::DexFile*>& dex_files, - std::vector<uint8_t>& oat_contents, + OatWriter& oat_writer, art::File* file) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { #if defined(ART_USE_PORTABLE_COMPILER) - return art::ElfWriterMclinker::Create(file, oat_contents, dex_files, android_root, is_host, *this); + return art::ElfWriterMclinker::Create(file, oat_writer, dex_files, android_root, is_host, *this); #else - return art::ElfWriterQuick::Create(file, oat_contents, dex_files, android_root, is_host, *this); + return art::ElfWriterQuick::Create(file, oat_writer, dex_files, android_root, is_host, *this); #endif } void CompilerDriver::InstructionSetToLLVMTarget(InstructionSet instruction_set, diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h index 1799057..f3f72dd 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -39,6 +39,7 @@ namespace art { class AOTCompilationStats; class ParallelCompilationManager; class DexCompilationUnit; +class OatWriter; class TimingLogger; enum CompilerBackend { @@ -192,7 +193,7 @@ class CompilerDriver { bool WriteElf(const std::string& android_root, bool is_host, const std::vector<const DexFile*>& dex_files, - std::vector<uint8_t>& oat_contents, + OatWriter& oat_writer, File* file); // TODO: move to a common home for llvm helpers once quick/portable are merged |