summaryrefslogtreecommitdiffstats
path: root/compiler/utils
diff options
context:
space:
mode:
authorDave Allison <dallison@google.com>2014-07-25 16:15:27 -0700
committerDave Allison <dallison@google.com>2014-08-13 09:01:41 -0700
commit648d7112609dd19c38131b3e71c37bcbbd19d11e (patch)
tree54062831327c660acb309e877e8d8df9ba0c2d5d /compiler/utils
parent99c251bbd225dd97d0deece29559a430b12a0b66 (diff)
downloadart-648d7112609dd19c38131b3e71c37bcbbd19d11e.zip
art-648d7112609dd19c38131b3e71c37bcbbd19d11e.tar.gz
art-648d7112609dd19c38131b3e71c37bcbbd19d11e.tar.bz2
Reduce stack usage for overflow checks
This reduces the stack space reserved for overflow checks to 12K, split into an 8K gap and a 4K protected region. GC needs over 8K when running in a stack overflow situation. Also prevents signal runaway by detecting a signal inside code that resulted from a signal handler invokation. And adds a max signal count to the SignalTest to prevent it running forever. Also reduces the number of iterations for the InterfaceTest as this was taking (almost) forever with the --trace option on run-test. Bug: 15435566 Change-Id: Id4fd46f22d52d42a9eb431ca07948673e8fda694
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/stack_checks.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/utils/stack_checks.h b/compiler/utils/stack_checks.h
index 63adbc2..ce01077 100644
--- a/compiler/utils/stack_checks.h
+++ b/compiler/utils/stack_checks.h
@@ -33,10 +33,9 @@ static constexpr size_t kSmallFrameSize = 1 * KB;
// Determine whether a frame is small or large, used in the decision on whether to elide a
// stack overflow check on method entry.
//
-// A frame is considered large when it's either above kLargeFrameSize, or a quarter of the
-// overflow-usable stack space.
-static inline bool IsLargeFrame(size_t size, InstructionSet isa) {
- return size >= kLargeFrameSize || size >= GetStackOverflowReservedBytes(isa) / 4;
+// A frame is considered large when it's above kLargeFrameSize.
+static inline bool FrameNeedsStackCheck(size_t size, InstructionSet isa) {
+ return size >= kLargeFrameSize;
}
} // namespace art