diff options
Diffstat (limited to 'runtime/interpreter/interpreter_common.h')
-rw-r--r-- | runtime/interpreter/interpreter_common.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/runtime/interpreter/interpreter_common.h b/runtime/interpreter/interpreter_common.h index b228e28a22..5b942f2e73 100644 --- a/runtime/interpreter/interpreter_common.h +++ b/runtime/interpreter/interpreter_common.h @@ -141,11 +141,8 @@ static inline bool DoFastInvoke(Thread* self, return false; } else { jit::Jit* jit = Runtime::Current()->GetJit(); - if (jit != nullptr) { - if (type == kVirtual) { - jit->InvokeVirtualOrInterface(receiver, sf_method, shadow_frame.GetDexPC(), called_method); - } - jit->AddSamples(self, sf_method, 1, /*with_backedges*/false); + if (jit != nullptr && type == kVirtual) { + jit->InvokeVirtualOrInterface(receiver, sf_method, shadow_frame.GetDexPC(), called_method); } if (called_method->IsIntrinsic()) { if (MterpHandleIntrinsic(&shadow_frame, called_method, inst, inst_data, @@ -182,11 +179,8 @@ static inline bool DoInvoke(Thread* self, return false; } else { jit::Jit* jit = Runtime::Current()->GetJit(); - if (jit != nullptr) { - if (type == kVirtual || type == kInterface) { - jit->InvokeVirtualOrInterface(receiver, sf_method, shadow_frame.GetDexPC(), called_method); - } - jit->AddSamples(self, sf_method, 1, /*with_backedges*/false); + if (jit != nullptr && (type == kVirtual || type == kInterface)) { + jit->InvokeVirtualOrInterface(receiver, sf_method, shadow_frame.GetDexPC(), called_method); } // TODO: Remove the InvokeVirtualOrInterface instrumentation, as it was only used by the JIT. if (type == kVirtual || type == kInterface) { |