src/hotspot/share/runtime/interfaceSupport.cpp
changeset 59247 56bf71d64d51
parent 58527 f9cc0141574c
child 59252 623722a6aeb9
equal deleted inserted replaced
59246:fcad92f425c5 59247:56bf71d64d51
    86   static volatile int RuntimeHistogram_lock = 0;
    86   static volatile int RuntimeHistogram_lock = 0;
    87   _name = elementName;
    87   _name = elementName;
    88   uintx count = 0;
    88   uintx count = 0;
    89 
    89 
    90   while (Atomic::cmpxchg(1, &RuntimeHistogram_lock, 0) != 0) {
    90   while (Atomic::cmpxchg(1, &RuntimeHistogram_lock, 0) != 0) {
    91     while (OrderAccess::load_acquire(&RuntimeHistogram_lock) != 0) {
    91     while (Atomic::load_acquire(&RuntimeHistogram_lock) != 0) {
    92       count +=1;
    92       count +=1;
    93       if ( (WarnOnStalledSpinLock > 0)
    93       if ( (WarnOnStalledSpinLock > 0)
    94         && (count % WarnOnStalledSpinLock == 0)) {
    94         && (count % WarnOnStalledSpinLock == 0)) {
    95         warning("RuntimeHistogram_lock seems to be stalled");
    95         warning("RuntimeHistogram_lock seems to be stalled");
    96       }
    96       }