src/hotspot/share/runtime/safepoint.hpp
changeset 57758 91a758925be7
parent 55569 8e3a0ebf3497
child 58679 9c3209ff7550
child 59258 4c2557ab304e
equal deleted inserted replaced
57757:902cef494e66 57758:91a758925be7
   110   // _wait_barrier, where they can quickly be started again.
   110   // _wait_barrier, where they can quickly be started again.
   111   static WaitBarrier* _wait_barrier;
   111   static WaitBarrier* _wait_barrier;
   112   static long         _end_of_last_safepoint;     // Time of last safepoint in milliseconds
   112   static long         _end_of_last_safepoint;     // Time of last safepoint in milliseconds
   113   static julong       _coalesced_vmop_count;     // coalesced vmop count
   113   static julong       _coalesced_vmop_count;     // coalesced vmop count
   114 
   114 
   115   // Statistics
       
   116   static void begin_statistics(int nof_threads, int nof_running);
       
   117   static void update_statistics_on_spin_end();
       
   118   static void update_statistics_on_sync_end(jlong end_time);
       
   119   static void update_statistics_on_cleanup_end(jlong end_time);
       
   120   static void end_statistics(jlong end_time);
       
   121   static void print_statistics();
       
   122 
       
   123   // For debug long safepoint
   115   // For debug long safepoint
   124   static void print_safepoint_timeout();
   116   static void print_safepoint_timeout();
   125 
   117 
   126   // Helper methods for safepoint procedure:
   118   // Helper methods for safepoint procedure:
   127   static void arm_safepoint();
   119   static void arm_safepoint();
   213   // At polling page safepoint (NOT a poll return safepoint):
   205   // At polling page safepoint (NOT a poll return safepoint):
   214   volatile bool                   _at_poll_safepoint;
   206   volatile bool                   _at_poll_safepoint;
   215   JavaThread*                     _thread;
   207   JavaThread*                     _thread;
   216   bool                            _safepoint_safe;
   208   bool                            _safepoint_safe;
   217   volatile uint64_t               _safepoint_id;
   209   volatile uint64_t               _safepoint_id;
   218   JavaThreadState                 _orig_thread_state;
       
   219 
   210 
   220   ThreadSafepointState*           _next;
   211   ThreadSafepointState*           _next;
   221 
   212 
   222   void account_safe_thread();
   213   void account_safe_thread();
   223 
   214 
   239 
   230 
   240   uint64_t get_safepoint_id() const;
   231   uint64_t get_safepoint_id() const;
   241   void     reset_safepoint_id();
   232   void     reset_safepoint_id();
   242   void     set_safepoint_id(uint64_t sid);
   233   void     set_safepoint_id(uint64_t sid);
   243 
   234 
   244   JavaThreadState orig_thread_state() const { return _orig_thread_state; }
       
   245 
       
   246   // Support for safepoint timeout (debugging)
   235   // Support for safepoint timeout (debugging)
   247   bool is_at_poll_safepoint()           { return _at_poll_safepoint; }
   236   bool is_at_poll_safepoint()           { return _at_poll_safepoint; }
   248   void set_at_poll_safepoint(bool val)  { _at_poll_safepoint = val; }
   237   void set_at_poll_safepoint(bool val)  { _at_poll_safepoint = val; }
   249 
   238 
   250   void handle_polling_page_exception();
   239   void handle_polling_page_exception();
   251 
   240 
   252   // debugging
   241   // debugging
   253   void print_on(outputStream* st) const;
   242   void print_on(outputStream* st) const;
   254   void print() const;
       
   255 
   243 
   256   // Initialize
   244   // Initialize
   257   static void create(JavaThread *thread);
   245   static void create(JavaThread *thread);
   258   static void destroy(JavaThread *thread);
   246   static void destroy(JavaThread *thread);
   259 };
   247 };