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/oat_file.cc | |
parent | 38fee8ef4bc0f4dbe2c6d1f5585895f0c4d16984 (diff) | |
download | art-2535abe7d1fcdd0e6aca782b1f1932a703ed50a4.zip art-2535abe7d1fcdd0e6aca782b1f1932a703ed50a4.tar.gz art-2535abe7d1fcdd0e6aca782b1f1932a703ed50a4.tar.bz2 |
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/oat_file.cc')
-rw-r--r-- | runtime/oat_file.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/oat_file.cc b/runtime/oat_file.cc index 9061bb3..3192e03 100644 --- a/runtime/oat_file.cc +++ b/runtime/oat_file.cc @@ -577,12 +577,12 @@ const OatFile::OatMethod OatFile::OatClass::GetOatMethod(uint32_t method_index) } if (oat_file_->IsExecutable() || Runtime::Current() == nullptr || // This case applies for oatdump. - Runtime::Current()->IsCompiler()) { + Runtime::Current()->IsAotCompiler()) { return OatMethod(oat_file_->Begin(), oat_method_offsets->code_offset_); - } else { - // We aren't allowed to use the compiled code. We just force it down the interpreted version. - return OatMethod(oat_file_->Begin(), 0); } + // We aren't allowed to use the compiled code. We just force it down the interpreted / jit + // version. + return OatMethod(oat_file_->Begin(), 0); } void OatFile::OatMethod::LinkMethod(mirror::ArtMethod* method) const { |