src/hotspot/share/runtime/thread.hpp
changeset 57745 789e967c2731
parent 57699 4aea554692aa
child 57758 91a758925be7
equal deleted inserted replaced
57739:6717d7e59db4 57745:789e967c2731
   365   }
   365   }
   366 
   366 
   367   void set_missed_ic_stub_refill_verifier(ICRefillVerifier* verifier) {
   367   void set_missed_ic_stub_refill_verifier(ICRefillVerifier* verifier) {
   368     _missed_ic_stub_refill_verifier = verifier;
   368     _missed_ic_stub_refill_verifier = verifier;
   369   }
   369   }
   370 #endif
   370 #endif // ASSERT
   371 
   371 
   372  private:
   372  private:
   373 
   373 
   374   // Debug support for checking if code allows safepoints or not.
   374   // Debug support for checking if code allows safepoints or not.
   375   // Safepoints in the VM can happen because of allocation, invoking a VM operation, or blocking on
   375   // Safepoints in the VM can happen because of allocation, invoking a VM operation, or blocking on
   379   //
   379   //
   380   // The class NoSafepointVerifier is used to set this counter.
   380   // The class NoSafepointVerifier is used to set this counter.
   381   //
   381   //
   382   NOT_PRODUCT(int _no_safepoint_count;)         // If 0, thread allow a safepoint to happen
   382   NOT_PRODUCT(int _no_safepoint_count;)         // If 0, thread allow a safepoint to happen
   383 
   383 
       
   384  private:
   384   // Used by SkipGCALot class.
   385   // Used by SkipGCALot class.
   385   NOT_PRODUCT(bool _skip_gcalot;)               // Should we elide gc-a-lot?
   386   NOT_PRODUCT(bool _skip_gcalot;)               // Should we elide gc-a-lot?
   386 
   387 
       
   388   friend class GCLocker;
   387   friend class NoSafepointVerifier;
   389   friend class NoSafepointVerifier;
   388   friend class PauseNoSafepointVerifier;
   390   friend class PauseNoSafepointVerifier;
   389   friend class GCLocker;
       
   390 
   391 
   391   volatile void* _polling_page;                 // Thread local polling page
   392   volatile void* _polling_page;                 // Thread local polling page
   392 
   393 
   393   ThreadLocalAllocBuffer _tlab;                 // Thread-local eden
   394   ThreadLocalAllocBuffer _tlab;                 // Thread-local eden
   394   jlong _allocated_bytes;                       // Cumulative number of bytes allocated on
   395   jlong _allocated_bytes;                       // Cumulative number of bytes allocated on
   755   bool owns_locks_but_compiled_lock() const;
   756   bool owns_locks_but_compiled_lock() const;
   756 
   757 
   757   // Deadlock detection
   758   // Deadlock detection
   758   ResourceMark* current_resource_mark()          { return _current_resource_mark; }
   759   ResourceMark* current_resource_mark()          { return _current_resource_mark; }
   759   void set_current_resource_mark(ResourceMark* rm) { _current_resource_mark = rm; }
   760   void set_current_resource_mark(ResourceMark* rm) { _current_resource_mark = rm; }
   760 #endif
   761 #endif // ASSERT
   761 
   762 
   762   void check_for_valid_safepoint_state(bool potential_vm_operation) PRODUCT_RETURN;
   763   // These functions check conditions on a JavaThread before possibly going to a safepoint,
       
   764   // including NoSafepointVerifier.
       
   765   void check_for_valid_safepoint_state(bool potential_vm_operation) NOT_DEBUG_RETURN;
       
   766   void check_possible_safepoint() NOT_DEBUG_RETURN;
   763 
   767 
   764  private:
   768  private:
   765   volatile int _jvmti_env_iteration_count;
   769   volatile int _jvmti_env_iteration_count;
   766 
   770 
   767  public:
   771  public:
  1219   ~JavaThread();
  1223   ~JavaThread();
  1220 
  1224 
  1221 #ifdef ASSERT
  1225 #ifdef ASSERT
  1222   // verify this JavaThread hasn't be published in the Threads::list yet
  1226   // verify this JavaThread hasn't be published in the Threads::list yet
  1223   void verify_not_published();
  1227   void verify_not_published();
  1224 #endif
  1228 #endif // ASSERT
  1225 
  1229 
  1226   //JNI functiontable getter/setter for JVMTI jni function table interception API.
  1230   //JNI functiontable getter/setter for JVMTI jni function table interception API.
  1227   void set_jni_functions(struct JNINativeInterface_* functionTable) {
  1231   void set_jni_functions(struct JNINativeInterface_* functionTable) {
  1228     _jni_environment.functions = functionTable;
  1232     _jni_environment.functions = functionTable;
  1229   }
  1233   }