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/debugger.cc | |
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/debugger.cc')
-rw-r--r-- | runtime/debugger.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/debugger.cc b/runtime/debugger.cc index a3d3b470cc..f33c0f8bdf 100644 --- a/runtime/debugger.cc +++ b/runtime/debugger.cc @@ -287,6 +287,13 @@ class DebugInstrumentationListener FINAL : public instrumentation::Instrumentati Dbg::PostException(throw_location, catch_method, catch_dex_pc, exception_object); } + // We only care about how many backward branches were executed in the Jit. + void BackwardBranch(Thread* /*thread*/, mirror::ArtMethod* method, int32_t dex_pc_offset) + OVERRIDE SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { + LOG(ERROR) << "Unexpected backward branch event in debugger " << PrettyMethod(method) + << " " << dex_pc_offset; + } + private: DISALLOW_COPY_AND_ASSIGN(DebugInstrumentationListener); } gDebugInstrumentationListener; |