summaryrefslogtreecommitdiff
path: root/runtime/interpreter/interpreter_common.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2017-08-09 19:14:01 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2017-08-09 19:14:01 +0100
commitcecc48852f55fd374219519ba9b31cfecf7dd813 (patch)
tree8230d7ebbd0ef3d75e72da0110a0e0e493dc58b3 /runtime/interpreter/interpreter_common.h
parentb00c8b076714b779a2d34f581e849f33f407d6d8 (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
Diffstat (limited to 'runtime/interpreter/interpreter_common.h')
-rw-r--r--runtime/interpreter/interpreter_common.h14
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) {