diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2016-04-14 15:00:33 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2016-04-18 09:25:37 +0100 |
commit | f3f9cf6b65c4bcf9ea44253188d8d910b7cf7e64 (patch) | |
tree | c341adf6dbdf945b698864675f866a631da45b5d /runtime/interpreter/mterp/mterp.cc | |
parent | dc4b6dd86ffe80e67c01df501ed2468bef252808 (diff) | |
download | art-f3f9cf6b65c4bcf9ea44253188d8d910b7cf7e64.tar.gz art-f3f9cf6b65c4bcf9ea44253188d8d910b7cf7e64.tar.bz2 art-f3f9cf6b65c4bcf9ea44253188d8d910b7cf7e64.zip |
Add weight to compiled/interpreter transitions.
Also:
- Cleanup logging.
- Check ArtMethod status before adding compilation requests.
- Don't request osr compilation if we know AddSamples does not come
from a back edge.
Bug: 27865109
(cherry picked from commit 71cd50fb67fa48667b0ab59aa436a582c04ba43d)
Change-Id: Icbe89fe6cc495b113616391a8f257758d34b4b60
Diffstat (limited to 'runtime/interpreter/mterp/mterp.cc')
-rw-r--r-- | runtime/interpreter/mterp/mterp.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/interpreter/mterp/mterp.cc b/runtime/interpreter/mterp/mterp.cc index e00558941c..bd1af04608 100644 --- a/runtime/interpreter/mterp/mterp.cc +++ b/runtime/interpreter/mterp/mterp.cc @@ -689,7 +689,7 @@ extern "C" int16_t MterpAddHotnessBatch(ArtMethod* method, jit::Jit* jit = Runtime::Current()->GetJit(); if (jit != nullptr) { int16_t count = shadow_frame->GetCachedHotnessCountdown() - shadow_frame->GetHotnessCountdown(); - jit->AddSamples(self, method, count); + jit->AddSamples(self, method, count, /*with_backedges*/ true); } return MterpSetUpHotnessCountdown(method, shadow_frame); } @@ -702,7 +702,7 @@ extern "C" bool MterpProfileBranch(Thread* self, ShadowFrame* shadow_frame, int uint32_t dex_pc = shadow_frame->GetDexPC(); jit::Jit* jit = Runtime::Current()->GetJit(); if ((jit != nullptr) && (offset <= 0)) { - jit->AddSamples(self, method, 1); + jit->AddSamples(self, method, 1, /*with_backedges*/ true); } int16_t countdown_value = MterpSetUpHotnessCountdown(method, shadow_frame); if (countdown_value == jit::kJitCheckForOSR) { @@ -722,7 +722,7 @@ extern "C" bool MterpMaybeDoOnStackReplacement(Thread* self, jit::Jit* jit = Runtime::Current()->GetJit(); if (offset <= 0) { // Keep updating hotness in case a compilation request was dropped. Eventually it will retry. - jit->AddSamples(self, method, 1); + jit->AddSamples(self, method, 1, /*with_backedges*/ true); } // Assumes caller has already determined that an OSR check is appropriate. return jit::Jit::MaybeDoOnStackReplacement(self, method, dex_pc, offset, result); |