< prev index next >

src/hotspot/share/runtime/thread.hpp

Print this page




1949     return _stack_size_at_create;
1950   }
1951   static inline void set_stack_size_at_create(size_t value) {
1952     _stack_size_at_create = value;
1953   }
1954 
1955 #if INCLUDE_ALL_GCS
1956   // SATB marking queue support
1957   SATBMarkQueue& satb_mark_queue() { return _satb_mark_queue; }
1958   static SATBMarkQueueSet& satb_mark_queue_set() {
1959     return _satb_mark_queue_set;
1960   }
1961 
1962   // Dirty card queue support
1963   DirtyCardQueue& dirty_card_queue() { return _dirty_card_queue; }
1964   static DirtyCardQueueSet& dirty_card_queue_set() {
1965     return _dirty_card_queue_set;
1966   }
1967 #endif // INCLUDE_ALL_GCS
1968 
1969   // This method initializes the SATB and dirty card queues before a
1970   // JavaThread is added to the Java thread list. Right now, we don't
1971   // have to do anything to the dirty card queue (it should have been
1972   // activated when the thread was created), but we have to activate
1973   // the SATB queue if the thread is created while a marking cycle is
1974   // in progress. The activation / de-activation of the SATB queues at
1975   // the beginning / end of a marking cycle is done during safepoints
1976   // so we have to make sure this method is called outside one to be
1977   // able to safely read the active field of the SATB queue set. Right
1978   // now, it is called just before the thread is added to the Java
1979   // thread list in the Threads::add() method. That method is holding
1980   // the Threads_lock which ensures we are outside a safepoint. We
1981   // cannot do the obvious and set the active field of the SATB queue
1982   // when the thread is created given that, in some cases, safepoints
1983   // might happen between the JavaThread constructor being called and the
1984   // thread being added to the Java thread list (an example of this is
1985   // when the structure for the DestroyJavaVM thread is created).
1986 #if INCLUDE_ALL_GCS
1987   void initialize_queues();
1988 #else  // INCLUDE_ALL_GCS
1989   void initialize_queues() { }
1990 #endif // INCLUDE_ALL_GCS
1991 
1992   // Machine dependent stuff
1993 #include OS_CPU_HEADER(thread)
1994 
1995  public:
1996   void set_blocked_on_compilation(bool value) {
1997     _blocked_on_compilation = value;
1998   }
1999 
2000   bool blocked_on_compilation() {
2001     return _blocked_on_compilation;
2002   }
2003  protected:
2004   bool         _blocked_on_compilation;
2005 
2006 
2007   // JSR166 per-thread parker
2008  private:
2009   Parker*    _parker;
2010  public:
2011   Parker*     parker() { return _parker; }




1949     return _stack_size_at_create;
1950   }
1951   static inline void set_stack_size_at_create(size_t value) {
1952     _stack_size_at_create = value;
1953   }
1954 
1955 #if INCLUDE_ALL_GCS
1956   // SATB marking queue support
1957   SATBMarkQueue& satb_mark_queue() { return _satb_mark_queue; }
1958   static SATBMarkQueueSet& satb_mark_queue_set() {
1959     return _satb_mark_queue_set;
1960   }
1961 
1962   // Dirty card queue support
1963   DirtyCardQueue& dirty_card_queue() { return _dirty_card_queue; }
1964   static DirtyCardQueueSet& dirty_card_queue_set() {
1965     return _dirty_card_queue_set;
1966   }
1967 #endif // INCLUDE_ALL_GCS
1968 























1969   // Machine dependent stuff
1970 #include OS_CPU_HEADER(thread)
1971 
1972  public:
1973   void set_blocked_on_compilation(bool value) {
1974     _blocked_on_compilation = value;
1975   }
1976 
1977   bool blocked_on_compilation() {
1978     return _blocked_on_compilation;
1979   }
1980  protected:
1981   bool         _blocked_on_compilation;
1982 
1983 
1984   // JSR166 per-thread parker
1985  private:
1986   Parker*    _parker;
1987  public:
1988   Parker*     parker() { return _parker; }


< prev index next >