< prev index next >

src/share/vm/utilities/exceptions.hpp

Print this page
rev 8802 : G1 performance improvements: card batching, joining, sorting, prefetching and write barrier fence elision and simplification based on a global syncrhonization using handshakes piggybacking on thread-local safepoints.

@@ -57,12 +57,13 @@
 // field of the Thread class w/o having access to the Thread's interface (for
 // include hierachy reasons).
 
 class ThreadShadow: public CHeapObj<mtThread> {
   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)
   friend void check_ThreadShadow();              // checks _pending_exception offset
 

@@ -88,11 +89,19 @@
 
   // use CLEAR_PENDING_EXCEPTION whenever possible!
   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;
+  }
 };
 
 
 // Exceptions is a helper class that encapsulates all operations
 // that require access to the thread interface and which are
< prev index next >