diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-02-17 10:38:49 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2015-02-23 16:45:49 -0800 |
commit | 2535abe7d1fcdd0e6aca782b1f1932a703ed50a4 (patch) | |
tree | 140026ff9638ff34050680b6c706b82fa1740b56 /runtime/gc | |
parent | 38fee8ef4bc0f4dbe2c6d1f5585895f0c4d16984 (diff) | |
download | art-2535abe7d1fcdd0e6aca782b1f1932a703ed50a4.tar.gz art-2535abe7d1fcdd0e6aca782b1f1932a703ed50a4.tar.bz2 art-2535abe7d1fcdd0e6aca782b1f1932a703ed50a4.zip |
Add JIT
Currently disabled by default unless -Xjit is passed in.
The proposed JIT is a method JIT which works by utilizing interpreter
instrumentation to request compilation of hot methods async during
runtime.
JIT options:
-Xjit / -Xnojit
-Xjitcodecachesize:N
-Xjitthreshold:integervalue
The JIT has a shared copy of a compiler driver which is accessed
by worker threads to compile individual methods.
Added JIT code cache and data cache, currently sized at 2 MB
capacity by default. Most apps will only fill a small fraction of
this cache however.
Added support to the compiler for compiling interpreter quickened
byte codes.
Added test target ART_TEST_JIT=TRUE and --jit for run-test.
TODO:
Clean up code cache.
Delete compiled methods after they are added to code cache.
Add more optimizations related to runtime checks e.g. direct pointers
for invokes.
Add method recompilation.
Move instrumentation to DexFile to improve performance and reduce
memory usage.
Bug: 17950037
Change-Id: Ifa5b2684a2d5059ec5a5210733900aafa3c51bca
Diffstat (limited to 'runtime/gc')
-rw-r--r-- | runtime/gc/heap.cc | 2 | ||||
-rw-r--r-- | runtime/gc/space/image_space.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index 419d5558a8..9e159c2533 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -655,7 +655,7 @@ void Heap::DumpObject(std::ostream& stream, mirror::Object* obj) { } bool Heap::IsCompilingBoot() const { - if (!Runtime::Current()->IsCompiler()) { + if (!Runtime::Current()->IsAotCompiler()) { return false; } for (const auto& space : continuous_spaces_) { diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc index d873e6d994..14f770da63 100644 --- a/runtime/gc/space/image_space.cc +++ b/runtime/gc/space/image_space.cc @@ -788,7 +788,7 @@ OatFile* ImageSpace::OpenOatFile(const char* image_path, std::string* error_msg) OatFile* oat_file = OatFile::Open(oat_filename, oat_filename, image_header.GetOatDataBegin(), image_header.GetOatFileBegin(), - !Runtime::Current()->IsCompiler(), error_msg); + !Runtime::Current()->IsAotCompiler(), error_msg); if (oat_file == NULL) { *error_msg = StringPrintf("Failed to open oat file '%s' referenced from image %s: %s", oat_filename.c_str(), GetName(), error_msg->c_str()); |