< prev index next >

src/hotspot/share/runtime/synchronizer.cpp

Print this page

  34 #include "oops/markWord.hpp"
  35 #include "oops/oop.inline.hpp"
  36 #include "runtime/atomic.hpp"
  37 #include "runtime/handles.inline.hpp"
  38 #include "runtime/handshake.hpp"
  39 #include "runtime/interfaceSupport.inline.hpp"
  40 #include "runtime/mutexLocker.hpp"
  41 #include "runtime/objectMonitor.hpp"
  42 #include "runtime/objectMonitor.inline.hpp"
  43 #include "runtime/os.inline.hpp"
  44 #include "runtime/osThread.hpp"
  45 #include "runtime/perfData.hpp"
  46 #include "runtime/safepointMechanism.inline.hpp"
  47 #include "runtime/safepointVerifiers.hpp"
  48 #include "runtime/sharedRuntime.hpp"
  49 #include "runtime/stubRoutines.hpp"
  50 #include "runtime/synchronizer.hpp"
  51 #include "runtime/thread.inline.hpp"
  52 #include "runtime/timer.hpp"
  53 #include "runtime/vframe.hpp"

  54 #include "runtime/vmThread.hpp"
  55 #include "utilities/align.hpp"
  56 #include "utilities/dtrace.hpp"
  57 #include "utilities/events.hpp"
  58 #include "utilities/preserveException.hpp"
  59 
  60 void MonitorList::add(ObjectMonitor* m) {
  61   ObjectMonitor* head;
  62   do {
  63     head = Atomic::load(&_head);
  64     m->set_next_om(head);
  65   } while (Atomic::cmpxchg(&_head, head, m) != head);
  66 
  67   size_t count = Atomic::add(&_count, 1u);
  68   if (count > max()) {
  69     Atomic::inc(&_max);
  70   }
  71 }
  72 
  73 size_t MonitorList::count() const {

  34 #include "oops/markWord.hpp"
  35 #include "oops/oop.inline.hpp"
  36 #include "runtime/atomic.hpp"
  37 #include "runtime/handles.inline.hpp"
  38 #include "runtime/handshake.hpp"
  39 #include "runtime/interfaceSupport.inline.hpp"
  40 #include "runtime/mutexLocker.hpp"
  41 #include "runtime/objectMonitor.hpp"
  42 #include "runtime/objectMonitor.inline.hpp"
  43 #include "runtime/os.inline.hpp"
  44 #include "runtime/osThread.hpp"
  45 #include "runtime/perfData.hpp"
  46 #include "runtime/safepointMechanism.inline.hpp"
  47 #include "runtime/safepointVerifiers.hpp"
  48 #include "runtime/sharedRuntime.hpp"
  49 #include "runtime/stubRoutines.hpp"
  50 #include "runtime/synchronizer.hpp"
  51 #include "runtime/thread.inline.hpp"
  52 #include "runtime/timer.hpp"
  53 #include "runtime/vframe.hpp"
  54 #include "runtime/vframe.inline.hpp"
  55 #include "runtime/vmThread.hpp"
  56 #include "utilities/align.hpp"
  57 #include "utilities/dtrace.hpp"
  58 #include "utilities/events.hpp"
  59 #include "utilities/preserveException.hpp"
  60 
  61 void MonitorList::add(ObjectMonitor* m) {
  62   ObjectMonitor* head;
  63   do {
  64     head = Atomic::load(&_head);
  65     m->set_next_om(head);
  66   } while (Atomic::cmpxchg(&_head, head, m) != head);
  67 
  68   size_t count = Atomic::add(&_count, 1u);
  69   if (count > max()) {
  70     Atomic::inc(&_max);
  71   }
  72 }
  73 
  74 size_t MonitorList::count() const {
< prev index next >