diff options
| author | 2016-04-12 16:33:24 +0100 | |
|---|---|---|
| committer | 2016-04-13 17:34:53 +0100 | |
| commit | 274fe4adcb0610a9920be7814d9beb9cac6417ce (patch) | |
| tree | 4a5c41dd2568869ceaf0a510e37065a606f512fb /runtime/interpreter/interpreter_switch_impl.cc | |
| parent | 6990775e323cd9164d6cc10955a047b9d9f15f32 (diff) | |
Remove the JIT from the instrumentation framework.
This was slowing down the interpreter for no reason.
Also, call AddSamples for invoke-static and invoke-direct.
Change-Id: I7b5641097f7741dd32feb1ce6af739fd27fb37c2
Diffstat (limited to 'runtime/interpreter/interpreter_switch_impl.cc')
| -rw-r--r-- | runtime/interpreter/interpreter_switch_impl.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/runtime/interpreter/interpreter_switch_impl.cc b/runtime/interpreter/interpreter_switch_impl.cc index 442e1915f8..ca1d635d51 100644 --- a/runtime/interpreter/interpreter_switch_impl.cc +++ b/runtime/interpreter/interpreter_switch_impl.cc @@ -18,7 +18,6 @@ #include "experimental_flags.h" #include "interpreter_common.h" #include "jit/jit.h" -#include "jit/jit_instrumentation.h" #include "safe_math.h" #include <memory> // std::unique_ptr @@ -74,7 +73,9 @@ namespace interpreter { #define BRANCH_INSTRUMENTATION(offset) \ do { \ - instrumentation->Branch(self, method, dex_pc, offset); \ + if (UNLIKELY(instrumentation->HasBranchListeners())) { \ + instrumentation->Branch(self, method, dex_pc, offset); \ + } \ JValue result; \ if (jit::Jit::MaybeDoOnStackReplacement(self, method, dex_pc, offset, &result)) { \ if (interpret_one_instruction) { \ @@ -87,8 +88,8 @@ namespace interpreter { #define HOTNESS_UPDATE() \ do { \ - if (jit_instrumentation_cache != nullptr) { \ - jit_instrumentation_cache->AddSamples(self, method, 1); \ + if (jit != nullptr) { \ + jit->AddSamples(self, method, 1); \ } \ } while (false) @@ -115,10 +116,6 @@ JValue ExecuteSwitchImpl(Thread* self, const DexFile::CodeItem* code_item, uint16_t inst_data; ArtMethod* method = shadow_frame.GetMethod(); jit::Jit* jit = Runtime::Current()->GetJit(); - jit::JitInstrumentationCache* jit_instrumentation_cache = nullptr; - if (jit != nullptr) { - jit_instrumentation_cache = jit->GetInstrumentationCache(); - } // TODO: collapse capture-variable+create-lambda into one opcode, then we won't need // to keep this live for the scope of the entire function call. |