--- old/src/share/vm/utilities/exceptions.hpp 2015-08-12 14:09:49.000000000 +0200 +++ new/src/share/vm/utilities/exceptions.hpp 2015-08-12 14:09:49.000000000 +0200 @@ -59,8 +59,9 @@ class ThreadShadow: public CHeapObj { friend class VMStructs; - protected: + char _yieldpoint_poll; + char _yieldpoint_spill[wordSize - 1]; oop _pending_exception; // Thread has gc actions. const char* _exception_file; // file information for exception (debugging only) int _exception_line; // line information for exception (debugging only) @@ -90,7 +91,15 @@ void clear_pending_exception(); ThreadShadow() : _pending_exception(NULL), - _exception_file(NULL), _exception_line(0) {} + _exception_file(NULL), _exception_line(0), _yieldpoint_poll(3) {} + + void set_yieldpoint(bool should_take_yieldpoint) { + _yieldpoint_poll = should_take_yieldpoint ? 0 : 3; + } + + bool yieldpoint() { + return _yieldpoint_poll == 3; + } };