src/share/vm/runtime/thread.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/runtime

src/share/vm/runtime/thread.hpp

Print this page
rev 7349 : 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
Reviewed-by:


 735 
 736   void set_crash_protection(os::WatcherThreadCrashProtection* crash_protection) {
 737     assert(Thread::current()->is_Watcher_thread(), "Can only be set by WatcherThread");
 738     _crash_protection = crash_protection;
 739   }
 740 
 741   bool has_crash_protection() const { return _crash_protection != NULL; }
 742   os::WatcherThreadCrashProtection* crash_protection() const { return _crash_protection; }
 743 
 744  private:
 745   int sleep() const;
 746 };
 747 
 748 
 749 class CompilerThread;
 750 
 751 typedef void (*ThreadFunction)(JavaThread*, TRAPS);
 752 
 753 class JavaThread: public Thread {
 754   friend class VMStructs;

 755  private:
 756   JavaThread*    _next;                          // The next thread in the Threads list
 757   oop            _threadObj;                     // The Java level thread object
 758 
 759 #ifdef ASSERT
 760  private:
 761   int _java_call_counter;
 762 
 763  public:
 764   int  java_call_counter()                       { return _java_call_counter; }
 765   void inc_java_call_counter()                   { _java_call_counter++; }
 766   void dec_java_call_counter() {
 767     assert(_java_call_counter > 0, "Invalid nesting of JavaCallWrapper");
 768     _java_call_counter--;
 769   }
 770  private:  // restore original namespace restriction
 771 #endif  // ifdef ASSERT
 772 
 773 #ifndef PRODUCT
 774  public:




 735 
 736   void set_crash_protection(os::WatcherThreadCrashProtection* crash_protection) {
 737     assert(Thread::current()->is_Watcher_thread(), "Can only be set by WatcherThread");
 738     _crash_protection = crash_protection;
 739   }
 740 
 741   bool has_crash_protection() const { return _crash_protection != NULL; }
 742   os::WatcherThreadCrashProtection* crash_protection() const { return _crash_protection; }
 743 
 744  private:
 745   int sleep() const;
 746 };
 747 
 748 
 749 class CompilerThread;
 750 
 751 typedef void (*ThreadFunction)(JavaThread*, TRAPS);
 752 
 753 class JavaThread: public Thread {
 754   friend class VMStructs;
 755   friend class WhiteBox;
 756  private:
 757   JavaThread*    _next;                          // The next thread in the Threads list
 758   oop            _threadObj;                     // The Java level thread object
 759 
 760 #ifdef ASSERT
 761  private:
 762   int _java_call_counter;
 763 
 764  public:
 765   int  java_call_counter()                       { return _java_call_counter; }
 766   void inc_java_call_counter()                   { _java_call_counter++; }
 767   void dec_java_call_counter() {
 768     assert(_java_call_counter > 0, "Invalid nesting of JavaCallWrapper");
 769     _java_call_counter--;
 770   }
 771  private:  // restore original namespace restriction
 772 #endif  // ifdef ASSERT
 773 
 774 #ifndef PRODUCT
 775  public:


src/share/vm/runtime/thread.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File