< prev index next >
src/hotspot/share/runtime/thread.inline.hpp
Print this page
rev 47862 : imported patch 10.07.open.rebase_20171110.dcubed
rev 47865 : dholmes CR: Fix indents, trailing spaces and various typos. Add descriptions for the '_cnt', '_max' and '_times" fields, add impl notes to document the type choices.
rev 47866 : robinw CR: Fix some inefficient code, update some comments, fix some indents, and add some 'const' specifiers.
*** 190,205 ****
TerminatedTypes l_terminated = (TerminatedTypes)
OrderAccess::load_acquire((volatile jint *) &_terminated);
return l_terminated == _thread_exiting || check_is_terminated(l_terminated);
}
! inline bool JavaThread::is_terminated() {
// Use load-acquire so that setting of _terminated by
// JavaThread::exit() is seen more quickly.
TerminatedTypes l_terminated = (TerminatedTypes)
OrderAccess::load_acquire((volatile jint *) &_terminated);
! return check_is_terminated(_terminated);
}
inline void JavaThread::set_terminated(TerminatedTypes t) {
// use release-store so the setting of _terminated is seen more quickly
OrderAccess::release_store((volatile jint *) &_terminated, (jint) t);
--- 190,205 ----
TerminatedTypes l_terminated = (TerminatedTypes)
OrderAccess::load_acquire((volatile jint *) &_terminated);
return l_terminated == _thread_exiting || check_is_terminated(l_terminated);
}
! inline bool JavaThread::is_terminated() const {
// Use load-acquire so that setting of _terminated by
// JavaThread::exit() is seen more quickly.
TerminatedTypes l_terminated = (TerminatedTypes)
OrderAccess::load_acquire((volatile jint *) &_terminated);
! return check_is_terminated(l_terminated);
}
inline void JavaThread::set_terminated(TerminatedTypes t) {
// use release-store so the setting of _terminated is seen more quickly
OrderAccess::release_store((volatile jint *) &_terminated, (jint) t);
*** 227,239 ****
inline void Threads::inc_smr_deleted_thread_cnt() {
Atomic::inc(&_smr_deleted_thread_cnt);
}
! inline void Threads::update_smr_deleted_thread_time_max(jint new_value) {
while (true) {
! jint cur_value = _smr_deleted_thread_time_max;
if (new_value <= cur_value) {
// No need to update max value so we're done.
break;
}
if (Atomic::cmpxchg(new_value, &_smr_deleted_thread_time_max, cur_value) == cur_value) {
--- 227,239 ----
inline void Threads::inc_smr_deleted_thread_cnt() {
Atomic::inc(&_smr_deleted_thread_cnt);
}
! inline void Threads::update_smr_deleted_thread_time_max(uint new_value) {
while (true) {
! uint cur_value = _smr_deleted_thread_time_max;
if (new_value <= cur_value) {
// No need to update max value so we're done.
break;
}
if (Atomic::cmpxchg(new_value, &_smr_deleted_thread_time_max, cur_value) == cur_value) {
*** 241,261 ****
break;
}
}
}
! inline void Threads::add_smr_deleted_thread_times(jint add_value) {
Atomic::add(add_value, &_smr_deleted_thread_times);
}
inline void Threads::inc_smr_tlh_cnt() {
Atomic::inc(&_smr_tlh_cnt);
}
! inline void Threads::update_smr_tlh_time_max(jint new_value) {
while (true) {
! jint cur_value = _smr_tlh_time_max;
if (new_value <= cur_value) {
// No need to update max value so we're done.
break;
}
if (Atomic::cmpxchg(new_value, &_smr_tlh_time_max, cur_value) == cur_value) {
--- 241,261 ----
break;
}
}
}
! inline void Threads::add_smr_deleted_thread_times(uint add_value) {
Atomic::add(add_value, &_smr_deleted_thread_times);
}
inline void Threads::inc_smr_tlh_cnt() {
Atomic::inc(&_smr_tlh_cnt);
}
! inline void Threads::update_smr_tlh_time_max(uint new_value) {
while (true) {
! uint cur_value = _smr_tlh_time_max;
if (new_value <= cur_value) {
// No need to update max value so we're done.
break;
}
if (Atomic::cmpxchg(new_value, &_smr_tlh_time_max, cur_value) == cur_value) {
*** 263,272 ****
break;
}
}
}
! inline void Threads::add_smr_tlh_times(jint add_value) {
Atomic::add(add_value, &_smr_tlh_times);
}
#endif // SHARE_VM_RUNTIME_THREAD_INLINE_HPP
--- 263,272 ----
break;
}
}
}
! inline void Threads::add_smr_tlh_times(uint add_value) {
Atomic::add(add_value, &_smr_tlh_times);
}
#endif // SHARE_VM_RUNTIME_THREAD_INLINE_HPP
< prev index next >