jdk7/jdk7/hotspot: aa9c266de52a (original) (raw)
OpenJDK / jdk7 / jdk7 / hotspot
changeset 1383:aa9c266de52a
6944473: 6941224 misses new files Summary: Two new files are missing in the push for 6941224. Reviewed-by: twisti Contributed-by: Gary Benson gbenson@redhat.com
twisti | |
---|---|
date | Fri, 16 Apr 2010 05:05:53 -0700 |
parents | d32d2a2f62cd |
children | c544d979f886 |
files | src/cpu/zero/vm/stack_zero.cpp src/cpu/zero/vm/stack_zero.inline.hpp |
diffstat | 2 files changed, 116 insertions(+), 0 deletions(-)[+] [-] src/cpu/zero/vm/stack_zero.cpp 73 src/cpu/zero/vm/stack_zero.inline.hpp 43 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cpu/zero/vm/stack_zero.cpp Fri Apr 16 05:05:53 2010 -0700 @@ -0,0 +1,73 @@ +/*
- *
- *
- *
- *
- CA 95054 USA or visit www.sun.com if you need additional information or
- *
- */ + +#include "incls/_precompiled.incl" +#include "incls/_stack_zero.cpp.incl" + +void ZeroStack::handle_overflow(TRAPS) {
- JavaThread *thread = (JavaThread *) THREAD; +
- // Set up the frame anchor if it isn't already
- bool has_last_Java_frame = thread->has_last_Java_frame();
- if (!has_last_Java_frame) {
- ZeroFrame *frame = thread->top_zero_frame();
- while (frame) {
if (frame->is_shark_frame())[](#l1.40)
break;[](#l1.41)
if (frame->is_interpreter_frame()) {[](#l1.43)
interpreterState istate =[](#l1.44)
frame->as_interpreter_frame()->interpreter_state();[](#l1.45)
if (istate->self_link() == istate)[](#l1.46)
break;[](#l1.47)
}[](#l1.48)
- thread->set_last_Java_frame(frame);
- } +
- // Throw the exception
- switch (thread->thread_state()) {
- case _thread_in_Java:
- InterpreterRuntime::throw_StackOverflowError(thread);
- break;
- default:
- ShouldNotReachHere();
- } +
- // Reset the frame anchor if necessary
- if (!has_last_Java_frame)
- thread->reset_last_Java_frame();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cpu/zero/vm/stack_zero.inline.hpp Fri Apr 16 05:05:53 2010 -0700 @@ -0,0 +1,43 @@ +/*
- *
- *
- *
- *
- CA 95054 USA or visit www.sun.com if you need additional information or
- *
- */ + +// This function should match SharkStack::CreateStackOverflowCheck +inline void ZeroStack::overflow_check(int required_words, TRAPS) {
- JavaThread *thread = (JavaThread *) THREAD; +
- // Check the Zero stack
- if (required_words > available_words()) {
- handle_overflow(THREAD);
- return;
- } +
- // Check the ABI stack
- address stack_top = thread->stack_base() - thread->stack_size();
- int free_stack = ((address) &stack_top) - stack_top;
- if (free_stack < shadow_pages_size()) {
- handle_overflow(THREAD);
- return;
- } +}