< prev index next >
src/hotspot/share/runtime/biasedLocking.cpp
Print this page
rev 47862 : imported patch 10.07.open.rebase_20171110.dcubed
rev 47866 : robinw CR: Fix some inefficient code, update some comments, fix some indents, and add some 'const' specifiers.
@@ -213,17 +213,13 @@
// Handle case where the thread toward which the object was biased has exited
bool thread_is_alive = false;
if (requesting_thread == biased_thread) {
thread_is_alive = true;
} else {
- for (JavaThreadIteratorWithHandle jtiwh; JavaThread *cur_thread = jtiwh.next(); ) {
- if (cur_thread == biased_thread) {
- thread_is_alive = true;
- break;
+ ThreadsListHandle tlh;
+ thread_is_alive = tlh.includes(biased_thread);
}
- }
- }
if (!thread_is_alive) {
if (allow_rebias) {
obj->set_mark(biased_prototype);
} else {
obj->set_mark(unbiased_prototype);
< prev index next >