From 648d7112609dd19c38131b3e71c37bcbbd19d11e Mon Sep 17 00:00:00 2001 From: Dave Allison Date: Fri, 25 Jul 2014 16:15:27 -0700 Subject: 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 --- compiler/utils/stack_checks.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'compiler/utils/stack_checks.h') diff --git a/compiler/utils/stack_checks.h b/compiler/utils/stack_checks.h index 63adbc2328..ce01077808 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 -- cgit v1.2.3-59-g8ed1b