Mercurial > hg > graal-jvmci-8
diff src/share/vm/utilities/exceptions.hpp @ 8337:37977d1dcedc
Transmit deoptimization reason in thread local.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 18 Mar 2013 00:20:07 +0100 |
parents | 6b6cbd8b8914 |
children | 6b0fd0964b87 |
line wrap: on
line diff
--- a/src/share/vm/utilities/exceptions.hpp Mon Mar 18 00:12:00 2013 +0100 +++ b/src/share/vm/utilities/exceptions.hpp Mon Mar 18 00:20:07 2013 +0100 @@ -61,6 +61,7 @@ friend class VMStructs; protected: + int _pending_deoptimization; bool _pending_monitorenter; oop _pending_exception; // Thread has gc actions. const char* _exception_file; // file information for exception (debugging only) @@ -77,16 +78,19 @@ public: oop pending_exception() const { return _pending_exception; } + int pending_deoptimization() const { return _pending_deoptimization; } bool has_pending_exception() const { return _pending_exception != NULL; } const char* exception_file() const { return _exception_file; } int exception_line() const { return _exception_line; } bool has_pending_monitorenter() const { return _pending_monitorenter; } // Code generation support + static ByteSize pending_deoptimization_offset() { return byte_offset_of(ThreadShadow, _pending_deoptimization); } static ByteSize pending_exception_offset() { return byte_offset_of(ThreadShadow, _pending_exception); } static ByteSize pending_monitorenter_offset() { return byte_offset_of(ThreadShadow, _pending_monitorenter); } - bool set_pending_monitorenter(bool b) { return _pending_monitorenter = b; } + void set_pending_monitorenter(bool b) { _pending_monitorenter = b; } + void set_pending_deoptimization(int reason) { _pending_deoptimization = reason; } // use THROW whenever possible! void set_pending_exception(oop exception, const char* file, int line); @@ -95,7 +99,7 @@ void clear_pending_exception(); ThreadShadow() : _pending_exception(NULL), - _exception_file(NULL), _exception_line(0), _pending_monitorenter(false) {} + _exception_file(NULL), _exception_line(0), _pending_monitorenter(false), _pending_deoptimization(-1) {} };