< prev index next >

src/hotspot/share/runtime/thread.hpp

Print this page




 719 
 720   bool    on_local_stack(address adr) const {
 721     // QQQ this has knowledge of direction, ought to be a stack method
 722     return (_stack_base >= adr && adr >= stack_end());
 723   }
 724 
 725   int     lgrp_id() const        { return _lgrp_id; }
 726   void    set_lgrp_id(int value) { _lgrp_id = value; }
 727 
 728   // Printing
 729   void print_on(outputStream* st, bool print_extended_info) const;
 730   virtual void print_on(outputStream* st) const { print_on(st, false); }
 731   void print() const;
 732   virtual void print_on_error(outputStream* st, char* buf, int buflen) const;
 733   void print_value_on(outputStream* st) const;
 734 
 735   // Debug-only code
 736 #ifdef ASSERT
 737  private:
 738   // Deadlock detection support for Mutex locks. List of locks own by thread.
 739   Monitor* _owned_locks;
 740   // Mutex::set_owner_implementation is the only place where _owned_locks is modified,
 741   // thus the friendship
 742   friend class Mutex;
 743   friend class Monitor;
 744 
 745  public:
 746   void print_owned_locks_on(outputStream* st) const;
 747   void print_owned_locks() const                 { print_owned_locks_on(tty);    }
 748   Monitor* owned_locks() const                   { return _owned_locks;          }
 749   bool owns_locks() const                        { return owned_locks() != NULL; }
 750 
 751   // Deadlock detection
 752   ResourceMark* current_resource_mark()          { return _current_resource_mark; }
 753   void set_current_resource_mark(ResourceMark* rm) { _current_resource_mark = rm; }
 754 #endif // ASSERT
 755 
 756   // These functions check conditions on a JavaThread before possibly going to a safepoint,
 757   // including NoSafepointVerifier.
 758   void check_for_valid_safepoint_state(bool potential_vm_operation) NOT_DEBUG_RETURN;
 759   void check_possible_safepoint() NOT_DEBUG_RETURN;
 760 
 761  private:
 762   volatile int _jvmti_env_iteration_count;
 763 
 764  public:
 765   void entering_jvmti_env_iteration()            { ++_jvmti_env_iteration_count; }
 766   void leaving_jvmti_env_iteration()             { --_jvmti_env_iteration_count; }
 767   bool is_inside_jvmti_env_iteration()           { return _jvmti_env_iteration_count > 0; }
 768 




 719 
 720   bool    on_local_stack(address adr) const {
 721     // QQQ this has knowledge of direction, ought to be a stack method
 722     return (_stack_base >= adr && adr >= stack_end());
 723   }
 724 
 725   int     lgrp_id() const        { return _lgrp_id; }
 726   void    set_lgrp_id(int value) { _lgrp_id = value; }
 727 
 728   // Printing
 729   void print_on(outputStream* st, bool print_extended_info) const;
 730   virtual void print_on(outputStream* st) const { print_on(st, false); }
 731   void print() const;
 732   virtual void print_on_error(outputStream* st, char* buf, int buflen) const;
 733   void print_value_on(outputStream* st) const;
 734 
 735   // Debug-only code
 736 #ifdef ASSERT
 737  private:
 738   // Deadlock detection support for Mutex locks. List of locks own by thread.
 739   Mutex* _owned_locks;
 740   // Mutex::set_owner_implementation is the only place where _owned_locks is modified,
 741   // thus the friendship
 742   friend class Mutex;
 743   friend class Monitor;
 744 
 745  public:
 746   void print_owned_locks_on(outputStream* st) const;
 747   void print_owned_locks() const                 { print_owned_locks_on(tty);    }
 748   Mutex* owned_locks() const                     { return _owned_locks;          }
 749   bool owns_locks() const                        { return owned_locks() != NULL; }
 750 
 751   // Deadlock detection
 752   ResourceMark* current_resource_mark()          { return _current_resource_mark; }
 753   void set_current_resource_mark(ResourceMark* rm) { _current_resource_mark = rm; }
 754 #endif // ASSERT
 755 
 756   // These functions check conditions on a JavaThread before possibly going to a safepoint,
 757   // including NoSafepointVerifier.
 758   void check_for_valid_safepoint_state(bool potential_vm_operation) NOT_DEBUG_RETURN;
 759   void check_possible_safepoint() NOT_DEBUG_RETURN;
 760 
 761  private:
 762   volatile int _jvmti_env_iteration_count;
 763 
 764  public:
 765   void entering_jvmti_env_iteration()            { ++_jvmti_env_iteration_count; }
 766   void leaving_jvmti_env_iteration()             { --_jvmti_env_iteration_count; }
 767   bool is_inside_jvmti_env_iteration()           { return _jvmti_env_iteration_count > 0; }
 768 


< prev index next >