Mercurial > hg > release > icedtea6-1.6
changeset 1335:2b1c03c1e9fa icedtea6-1.4
2009-01-26 Gary Benson <gbenson@redhat.com>
* ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp
(JavaThread::has_special_condition_for_native_trans): New method.
* ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp:
(CppInterpreter::native_entry): Correctly handle safepoints
during post-call thread state transition.
author | Gary Benson <gbenson@redhat.com> |
---|---|
date | Mon, 26 Jan 2009 08:36:15 -0500 |
parents | fed3590e18e7 |
children | 315b62f64c7a |
files | ChangeLog ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp |
diffstat | 3 files changed, 21 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Jan 22 15:06:43 2009 -0500 +++ b/ChangeLog Mon Jan 26 08:36:15 2009 -0500 @@ -1,3 +1,11 @@ +2009-01-26 Gary Benson <gbenson@redhat.com> + + * ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp + (JavaThread::has_special_condition_for_native_trans): New method. + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp: + (CppInterpreter::native_entry): Correctly handle safepoints + during post-call thread state transition. + 2009-01-22 Gary Benson <gbenson@redhat.com> * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp:
--- a/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Thu Jan 22 15:06:43 2009 -0500 +++ b/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Mon Jan 26 08:36:15 2009 -0500 @@ -315,14 +315,10 @@ } } - // We need to call check_special_condition_for_native_trans() if - // any of the thread's suspend flags are set. We can't use the - // various accessors because thread->_suspend_flags is volatile - // and may change while we're reading it. - volatile uint32_t *suspend_flags; - suspend_flags = (uint32_t *) - ((address) thread + in_bytes(JavaThread::suspend_flags_offset())); - if (*suspend_flags != 0) { + // Handle safepoint operations, pending suspend requests, + // and pending asynchronous exceptions. + if (SafepointSynchronize::do_call_back() || + thread->has_special_condition_for_native_trans()) { JavaThread::check_special_condition_for_native_trans(thread); CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops()); }
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp Thu Jan 22 15:06:43 2009 -0500 +++ b/ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp Mon Jan 26 08:36:15 2009 -0500 @@ -95,6 +95,15 @@ } public: + // Check for pending suspend requests and pending asynchronous + // exceptions. There are separate accessors for these, but + // _suspend_flags is volatile so using them would be unsafe. + bool has_special_condition_for_native_trans() + { + return _suspend_flags != 0; + } + + public: bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava)