summaryrefslogtreecommitdiffstats
path: root/compiler/dex/quick/mips/call_mips.cc
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-06-18 17:01:15 -0700
committerAndreas Gampe <agampe@google.com>2014-06-18 17:11:51 -0700
commit7cd26f355ba83be75b72ed628ed5ee84a3245c4f (patch)
tree94152cdd06143bec8c5491dba354cb78214b48c3 /compiler/dex/quick/mips/call_mips.cc
parent0c29909cbde112bc9c04da4ce81421e1a0b39f36 (diff)
downloadandroid_art-7cd26f355ba83be75b72ed628ed5ee84a3245c4f.tar.gz
android_art-7cd26f355ba83be75b72ed628ed5ee84a3245c4f.tar.bz2
android_art-7cd26f355ba83be75b72ed628ed5ee84a3245c4f.zip
ART: Target-dependent stack overflow, less check elision
Refactor the separate stack overflow reserved sizes from thread.h into instruction_set.h and make sure they're used in the compiler. Refactor the decision on when to elide stack overflow checks: especially with large interpreter stack frames, it is not a good idea to elide checks when the frame size is even close to the reserved size. Currently enforce checks when the frame size is >= 2KB, but make sure that frame sizes 1KB and below will elide the checks (number from experience). Bug: 15728765 Change-Id: I016bfd3d8218170cbccbd123ed5e2203db167c06
Diffstat (limited to 'compiler/dex/quick/mips/call_mips.cc')
-rw-r--r--compiler/dex/quick/mips/call_mips.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/dex/quick/mips/call_mips.cc b/compiler/dex/quick/mips/call_mips.cc
index c73420291c..e53105fc84 100644
--- a/compiler/dex/quick/mips/call_mips.cc
+++ b/compiler/dex/quick/mips/call_mips.cc
@@ -305,8 +305,7 @@ void MipsMir2Lir::GenEntrySequence(RegLocation* ArgLocs, RegLocation rl_method)
* We can safely skip the stack overflow check if we're
* a leaf *and* our frame size < fudge factor.
*/
- bool skip_overflow_check = (mir_graph_->MethodIsLeaf() &&
- (static_cast<size_t>(frame_size_) < Thread::kStackOverflowReservedBytes));
+ bool skip_overflow_check = mir_graph_->MethodIsLeaf() && !IsLargeFrame(frame_size_, kMips);
NewLIR0(kPseudoMethodEntry);
RegStorage check_reg = AllocTemp();
RegStorage new_sp = AllocTemp();