< prev index next >
src/hotspot/share/runtime/threadSMR.inline.hpp
Print this page
*** 54,64 ****
// These three inlines are private to ThreadsSMRSupport, but
// they are called by public inline update_tlh_stats() below:
inline void ThreadsSMRSupport::add_tlh_times(uint add_value) {
! Atomic::add(add_value, &_tlh_times);
}
inline void ThreadsSMRSupport::inc_tlh_cnt() {
Atomic::inc(&_tlh_cnt);
}
--- 54,64 ----
// These three inlines are private to ThreadsSMRSupport, but
// they are called by public inline update_tlh_stats() below:
inline void ThreadsSMRSupport::add_tlh_times(uint add_value) {
! Atomic::add(&_tlh_times, add_value);
}
inline void ThreadsSMRSupport::inc_tlh_cnt() {
Atomic::inc(&_tlh_cnt);
}
*** 68,78 ****
uint cur_value = _tlh_time_max;
if (new_value <= cur_value) {
// No need to update max value so we're done.
break;
}
! if (Atomic::cmpxchg(new_value, &_tlh_time_max, cur_value) == cur_value) {
// Updated max value so we're done. Otherwise try it all again.
break;
}
}
}
--- 68,78 ----
uint cur_value = _tlh_time_max;
if (new_value <= cur_value) {
// No need to update max value so we're done.
break;
}
! if (Atomic::cmpxchg(&_tlh_time_max, cur_value, new_value) == cur_value) {
// Updated max value so we're done. Otherwise try it all again.
break;
}
}
}
< prev index next >