diff options
| author | 2017-08-09 19:14:01 +0100 | |
|---|---|---|
| committer | 2017-08-09 19:14:01 +0100 | |
| commit | cecc48852f55fd374219519ba9b31cfecf7dd813 (patch) | |
| tree | 8230d7ebbd0ef3d75e72da0110a0e0e493dc58b3 | |
| parent | b00c8b076714b779a2d34f581e849f33f407d6d8 (diff) | |
Don't increment the hotness for invokes.
They don't affect performance and seem to not affect startup.
This will lead to less methods needing to be JITted.
Test: test.py
Change-Id: I635146021a08eabb39d2321ec430cfc8fc23e4e6
| -rw-r--r-- | runtime/interpreter/interpreter_common.h | 14 | ||||
| -rw-r--r-- | runtime/interpreter/mterp/mterp.cc | 1 |
2 files changed, 4 insertions, 11 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) { diff --git a/runtime/interpreter/mterp/mterp.cc b/runtime/interpreter/mterp/mterp.cc index 5955b9001a..88254a8cdc 100644 --- a/runtime/interpreter/mterp/mterp.cc +++ b/runtime/interpreter/mterp/mterp.cc @@ -280,7 +280,6 @@ extern "C" size_t MterpInvokeVirtualQuick(Thread* self, if (jit != nullptr) { jit->InvokeVirtualOrInterface( receiver, shadow_frame->GetMethod(), shadow_frame->GetDexPC(), called_method); - jit->AddSamples(self, shadow_frame->GetMethod(), 1, /*with_backedges*/false); } return !self->IsExceptionPending(); } |