< prev index next >

src/hotspot/share/runtime/threadSMR.cpp

Print this page




  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "logging/logStream.hpp"
  27 #include "memory/allocation.inline.hpp"
  28 #include "runtime/jniHandles.inline.hpp"
  29 #include "runtime/thread.inline.hpp"
  30 #include "runtime/threadSMR.inline.hpp"
  31 #include "runtime/vm_operations.hpp"
  32 #include "services/threadService.hpp"
  33 #include "utilities/copy.hpp"
  34 #include "utilities/globalDefinitions.hpp"
  35 #include "utilities/ostream.hpp"
  36 #include "utilities/resourceHash.hpp"
  37 #include "utilities/vmError.hpp"
  38 
  39 Monitor*              ThreadsSMRSupport::_delete_lock =
  40                           new Monitor(Monitor::special, "Thread_SMR_delete_lock",
  41                                       false /* allow_vm_block */,
  42                                       Monitor::_safepoint_check_never);
  43 // The '_cnt', '_max' and '_times" fields are enabled via
  44 // -XX:+EnableThreadSMRStatistics:
  45 
  46 // # of parallel threads in _delete_lock->wait().
  47 // Impl note: Hard to imagine > 64K waiting threads so this could be 16-bit,
  48 // but there is no nice 16-bit _FORMAT support.
  49 uint                  ThreadsSMRSupport::_delete_lock_wait_cnt = 0;
  50 
  51 // Max # of parallel threads in _delete_lock->wait().
  52 // Impl note: See _delete_lock_wait_cnt note.
  53 uint                  ThreadsSMRSupport::_delete_lock_wait_max = 0;
  54 
  55 // Flag to indicate when an _delete_lock->notify() is needed.
  56 // Impl note: See _delete_lock_wait_cnt note.
  57 volatile uint         ThreadsSMRSupport::_delete_notify = 0;
  58 
  59 // # of threads deleted over VM lifetime.
  60 // Impl note: Atomically incremented over VM lifetime so use unsigned for more
  61 // range. Unsigned 64-bit would be more future proof, but 64-bit atomic inc
  62 // isn't available everywhere (or is it?).




  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "logging/logStream.hpp"
  27 #include "memory/allocation.inline.hpp"
  28 #include "runtime/jniHandles.inline.hpp"
  29 #include "runtime/thread.inline.hpp"
  30 #include "runtime/threadSMR.inline.hpp"
  31 #include "runtime/vm_operations.hpp"
  32 #include "services/threadService.hpp"
  33 #include "utilities/copy.hpp"
  34 #include "utilities/globalDefinitions.hpp"
  35 #include "utilities/ostream.hpp"
  36 #include "utilities/resourceHash.hpp"
  37 #include "utilities/vmError.hpp"
  38 




  39 // The '_cnt', '_max' and '_times" fields are enabled via
  40 // -XX:+EnableThreadSMRStatistics:
  41 
  42 // # of parallel threads in _delete_lock->wait().
  43 // Impl note: Hard to imagine > 64K waiting threads so this could be 16-bit,
  44 // but there is no nice 16-bit _FORMAT support.
  45 uint                  ThreadsSMRSupport::_delete_lock_wait_cnt = 0;
  46 
  47 // Max # of parallel threads in _delete_lock->wait().
  48 // Impl note: See _delete_lock_wait_cnt note.
  49 uint                  ThreadsSMRSupport::_delete_lock_wait_max = 0;
  50 
  51 // Flag to indicate when an _delete_lock->notify() is needed.
  52 // Impl note: See _delete_lock_wait_cnt note.
  53 volatile uint         ThreadsSMRSupport::_delete_notify = 0;
  54 
  55 // # of threads deleted over VM lifetime.
  56 // Impl note: Atomically incremented over VM lifetime so use unsigned for more
  57 // range. Unsigned 64-bit would be more future proof, but 64-bit atomic inc
  58 // isn't available everywhere (or is it?).


< prev index next >