equal
deleted
inserted
replaced
33 #include "runtime/thread.inline.hpp" |
33 #include "runtime/thread.inline.hpp" |
34 #include "runtime/threadCritical.hpp" |
34 #include "runtime/threadCritical.hpp" |
35 #include "utilities/events.hpp" |
35 #include "utilities/events.hpp" |
36 #include "utilities/exceptions.hpp" |
36 #include "utilities/exceptions.hpp" |
37 |
37 |
38 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC |
|
39 |
|
40 // Implementation of ThreadShadow |
38 // Implementation of ThreadShadow |
41 void check_ThreadShadow() { |
39 void check_ThreadShadow() { |
42 const ByteSize offset1 = byte_offset_of(ThreadShadow, _pending_exception); |
40 const ByteSize offset1 = byte_offset_of(ThreadShadow, _pending_exception); |
43 const ByteSize offset2 = Thread::pending_exception_offset(); |
41 const ByteSize offset2 = Thread::pending_exception_offset(); |
44 if (offset1 != offset2) fatal("ThreadShadow::_pending_exception is not positioned correctly"); |
42 if (offset1 != offset2) fatal("ThreadShadow::_pending_exception is not positioned correctly"); |
142 ttyLocker ttyl; |
140 ttyLocker ttyl; |
143 tty->print_cr("Exception <%s%s%s> (" INTPTR_FORMAT ") \n" |
141 tty->print_cr("Exception <%s%s%s> (" INTPTR_FORMAT ") \n" |
144 "thrown [%s, line %d]\nfor thread " INTPTR_FORMAT, |
142 "thrown [%s, line %d]\nfor thread " INTPTR_FORMAT, |
145 h_exception->print_value_string(), |
143 h_exception->print_value_string(), |
146 message ? ": " : "", message ? message : "", |
144 message ? ": " : "", message ? message : "", |
147 (address)h_exception(), file, line, thread); |
145 p2i(h_exception()), file, line, p2i(thread)); |
148 } |
146 } |
149 // for AbortVMOnException flag |
147 // for AbortVMOnException flag |
150 NOT_PRODUCT(Exceptions::debug_check_abort(h_exception, message)); |
148 NOT_PRODUCT(Exceptions::debug_check_abort(h_exception, message)); |
151 |
149 |
152 // Check for special boot-strapping/vm-thread handling |
150 // Check for special boot-strapping/vm-thread handling |
165 |
163 |
166 // vm log |
164 // vm log |
167 if (LogEvents){ |
165 if (LogEvents){ |
168 Events::log_exception(thread, "Exception <%s%s%s> (" INTPTR_FORMAT ") thrown at [%s, line %d]", |
166 Events::log_exception(thread, "Exception <%s%s%s> (" INTPTR_FORMAT ") thrown at [%s, line %d]", |
169 h_exception->print_value_string(), message ? ": " : "", message ? message : "", |
167 h_exception->print_value_string(), message ? ": " : "", message ? message : "", |
170 (address)h_exception(), file, line); |
168 p2i(h_exception()), file, line); |
171 } |
169 } |
172 } |
170 } |
173 |
171 |
174 |
172 |
175 void Exceptions::_throw_msg(Thread* thread, const char* file, int line, Symbol* name, const char* message, |
173 void Exceptions::_throw_msg(Thread* thread, const char* file, int line, Symbol* name, const char* message, |