OSDN Git Service

Optimize stack overflow handling.
authorMathieu Chartier <mathieuc@google.com>
Wed, 19 Mar 2014 17:17:28 +0000 (10:17 -0700)
committerMathieu Chartier <mathieuc@google.com>
Wed, 19 Mar 2014 22:12:04 +0000 (15:12 -0700)
commit0d507d1e0441e6bd6f3affca3a60774ea920f317
treee07c72972b893e5fc57294b7a6a329cb9985a52c
parent0d9c02e661813abdf18b4e7544e204d2da719d20
Optimize stack overflow handling.

We now subtract the frame size from the stack pointer for methods
which have a frame smaller than a certain size. Also changed code to
use slow paths instead of launchpads.

Delete kStackOverflow launchpad since it is no longer needed.

ARM optimizations:
One less move per stack overflow check (without fault handler for
stack overflows). Use ldr pc instead of ldr r12, b r12.
Code size (boot.oat):
Before: 58405348
After: 57803236

TODO: X86 doesn't have the case for large frames. This could case an
incoming signal to go past the end of the stack (unlikely however).

Change-Id: Ie3a5635cd6fb09de27960e1f8cee45bfae38fb33
compiler/dex/compiler_enums.h
compiler/dex/quick/arm/call_arm.cc
compiler/dex/quick/gen_common.cc
compiler/dex/quick/mips/call_mips.cc
compiler/dex/quick/x86/call_x86.cc
runtime/thread.h