diff options
author | Dave Allison <dallison@google.com> | 2014-07-25 16:15:27 -0700 |
---|---|---|
committer | Dave Allison <dallison@google.com> | 2014-08-13 09:01:41 -0700 |
commit | 648d7112609dd19c38131b3e71c37bcbbd19d11e (patch) | |
tree | 54062831327c660acb309e877e8d8df9ba0c2d5d /runtime/arch/x86_64 | |
parent | 99c251bbd225dd97d0deece29559a430b12a0b66 (diff) | |
download | art-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 'runtime/arch/x86_64')
-rw-r--r-- | runtime/arch/x86_64/asm_support_x86_64.h | 6 | ||||
-rw-r--r-- | runtime/arch/x86_64/quick_entrypoints_x86_64.S | 12 |
2 files changed, 3 insertions, 15 deletions
diff --git a/runtime/arch/x86_64/asm_support_x86_64.h b/runtime/arch/x86_64/asm_support_x86_64.h index c3637ef..40958dc 100644 --- a/runtime/arch/x86_64/asm_support_x86_64.h +++ b/runtime/arch/x86_64/asm_support_x86_64.h @@ -28,11 +28,11 @@ #define RUNTIME_REF_AND_ARGS_CALLEE_SAVE_FRAME_OFFSET 16 // Offset of field Thread::self_ verified in InitCpu -#define THREAD_SELF_OFFSET 184 +#define THREAD_SELF_OFFSET 192 // Offset of field Thread::card_table_ verified in InitCpu -#define THREAD_CARD_TABLE_OFFSET 112 +#define THREAD_CARD_TABLE_OFFSET 120 // Offset of field Thread::exception_ verified in InitCpu -#define THREAD_EXCEPTION_OFFSET 120 +#define THREAD_EXCEPTION_OFFSET 128 // Offset of field Thread::thin_lock_thread_id_ verified in InitCpu #define THREAD_ID_OFFSET 12 diff --git a/runtime/arch/x86_64/quick_entrypoints_x86_64.S b/runtime/arch/x86_64/quick_entrypoints_x86_64.S index cbf0f38..48bc240 100644 --- a/runtime/arch/x86_64/quick_entrypoints_x86_64.S +++ b/runtime/arch/x86_64/quick_entrypoints_x86_64.S @@ -284,18 +284,6 @@ NO_ARG_RUNTIME_EXCEPTION art_quick_throw_div_zero, artThrowDivZeroFromCode */ NO_ARG_RUNTIME_EXCEPTION art_quick_throw_stack_overflow, artThrowStackOverflowFromCode -// On entry to this function, RAX contains the ESP value for the overflow region. -DEFINE_FUNCTION SYMBOL(art_quick_throw_stack_overflow_from_signal) - // Here, the RSP is above the protected region. We need to create a - // callee save frame and then move RSP down to the overflow region. - SETUP_SAVE_ALL_CALLEE_SAVE_FRAME // save all registers as basis for long jump context - mov %rsp, %rsi // get current stack pointer, pass SP as second arg - mov %rax, %rsp // move RSP to the overflow region. - mov %gs:THREAD_SELF_OFFSET, %rdi // pass Thread::Current() as first arg - call PLT_SYMBOL(artThrowStackOverflowFromCode) // artThrowStackOverflowFromCode(Thread*, SP) - int3 // unreached -END_FUNCTION SYMBOL(art_quick_throw_stack_overflow_from_signal) - /* * Called by managed code, saves callee saves and then calls artThrowException * that will place a mock Method* at the bottom of the stack. Arg1 holds the exception. |