< prev index next >

src/share/vm/runtime/thread.hpp

Print this page
rev 8362 : CMS fence eliding using fancy synchronization when using UseCondCardMark


 618   int NativeSyncRecursion;                    // diagnostic
 619 
 620   volatile int _OnTrap;                       // Resume-at IP delta
 621   jint _hashStateW;                           // Marsaglia Shift-XOR thread-local RNG
 622   jint _hashStateX;                           // thread-specific hashCode generator state
 623   jint _hashStateY;
 624   jint _hashStateZ;
 625   void * _schedctl;
 626 
 627 
 628   volatile jint rng[4];                      // RNG for spin loop
 629 
 630   // Low-level leaf-lock primitives used to implement synchronization
 631   // and native monitor-mutex infrastructure.
 632   // Not for general synchronization use.
 633   static void SpinAcquire(volatile int * Lock, const char * Name);
 634   static void SpinRelease(volatile int * Lock);
 635   static void muxAcquire(volatile intptr_t * Lock, const char * Name);
 636   static void muxAcquireW(volatile intptr_t * Lock, ParkEvent * ev);
 637   static void muxRelease(volatile intptr_t * Lock);





 638 };
 639 
 640 // Inline implementation of Thread::current()
 641 // Thread::current is "hot" it's called > 128K times in the 1st 500 msecs of
 642 // startup.
 643 // ThreadLocalStorage::thread is warm -- it's called > 16K times in the same
 644 // period.   This is inlined in thread_<os_family>.inline.hpp.
 645 
 646 inline Thread* Thread::current() {
 647 #ifdef ASSERT
 648   // This function is very high traffic. Define PARANOID to enable expensive
 649   // asserts.
 650 #ifdef PARANOID
 651   // Signal handler should call ThreadLocalStorage::get_thread_slow()
 652   Thread* t = ThreadLocalStorage::get_thread_slow();
 653   assert(t != NULL && !t->is_inside_signal_handler(),
 654          "Don't use Thread::current() inside signal handler");
 655 #endif
 656 #endif
 657   Thread* thread = ThreadLocalStorage::thread();




 618   int NativeSyncRecursion;                    // diagnostic
 619 
 620   volatile int _OnTrap;                       // Resume-at IP delta
 621   jint _hashStateW;                           // Marsaglia Shift-XOR thread-local RNG
 622   jint _hashStateX;                           // thread-specific hashCode generator state
 623   jint _hashStateY;
 624   jint _hashStateZ;
 625   void * _schedctl;
 626 
 627 
 628   volatile jint rng[4];                      // RNG for spin loop
 629 
 630   // Low-level leaf-lock primitives used to implement synchronization
 631   // and native monitor-mutex infrastructure.
 632   // Not for general synchronization use.
 633   static void SpinAcquire(volatile int * Lock, const char * Name);
 634   static void SpinRelease(volatile int * Lock);
 635   static void muxAcquire(volatile intptr_t * Lock, const char * Name);
 636   static void muxAcquireW(volatile intptr_t * Lock, ParkEvent * ev);
 637   static void muxRelease(volatile intptr_t * Lock);
 638 
 639  private:
 640   void *_serialization_page;
 641  public:
 642   void *get_serialization_page();
 643 };
 644 
 645 // Inline implementation of Thread::current()
 646 // Thread::current is "hot" it's called > 128K times in the 1st 500 msecs of
 647 // startup.
 648 // ThreadLocalStorage::thread is warm -- it's called > 16K times in the same
 649 // period.   This is inlined in thread_<os_family>.inline.hpp.
 650 
 651 inline Thread* Thread::current() {
 652 #ifdef ASSERT
 653   // This function is very high traffic. Define PARANOID to enable expensive
 654   // asserts.
 655 #ifdef PARANOID
 656   // Signal handler should call ThreadLocalStorage::get_thread_slow()
 657   Thread* t = ThreadLocalStorage::get_thread_slow();
 658   assert(t != NULL && !t->is_inside_signal_handler(),
 659          "Don't use Thread::current() inside signal handler");
 660 #endif
 661 #endif
 662   Thread* thread = ThreadLocalStorage::thread();


< prev index next >