mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8257521: runtime/logging/MonitorInflationTest.java crashed in MonitorList::unlink_deflated
Reviewed-by: kbarrett
This commit is contained in:
parent
61e5e393a7
commit
9cd8e38ab8
1 changed files with 3 additions and 2 deletions
|
@ -112,7 +112,8 @@ size_t MonitorList::unlink_deflated(Thread* self, LogStream* ls,
|
||||||
ObjectMonitor* prev = NULL;
|
ObjectMonitor* prev = NULL;
|
||||||
ObjectMonitor* head = Atomic::load_acquire(&_head);
|
ObjectMonitor* head = Atomic::load_acquire(&_head);
|
||||||
ObjectMonitor* m = head;
|
ObjectMonitor* m = head;
|
||||||
do {
|
// The in-use list head can be NULL during the final audit.
|
||||||
|
while (m != NULL) {
|
||||||
if (m->is_being_async_deflated()) {
|
if (m->is_being_async_deflated()) {
|
||||||
// Find next live ObjectMonitor.
|
// Find next live ObjectMonitor.
|
||||||
ObjectMonitor* next = m;
|
ObjectMonitor* next = m;
|
||||||
|
@ -154,7 +155,7 @@ size_t MonitorList::unlink_deflated(Thread* self, LogStream* ls,
|
||||||
"unlinked_count", unlinked_count,
|
"unlinked_count", unlinked_count,
|
||||||
ls, timer_p);
|
ls, timer_p);
|
||||||
}
|
}
|
||||||
} while (m != NULL);
|
}
|
||||||
Atomic::sub(&_count, unlinked_count);
|
Atomic::sub(&_count, unlinked_count);
|
||||||
return unlinked_count;
|
return unlinked_count;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue