mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8180175: ObjectSynchronizer only needs to iterate in-use monitors
When using -XX:+MonitorInUseLists, then only iterate in-use monitors. Reviewed-by: zgu, dholmes, rehn
This commit is contained in:
parent
ae8a3dd115
commit
553d1e815b
3 changed files with 47 additions and 0 deletions
|
@ -792,6 +792,12 @@ void Thread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
|
|||
// Do oop for ThreadShadow
|
||||
f->do_oop((oop*)&_pending_exception);
|
||||
handle_area()->oops_do(f);
|
||||
|
||||
if (MonitorInUseLists) {
|
||||
// When using thread local monitor lists, we scan them here,
|
||||
// and the remaining global monitors in ObjectSynchronizer::oops_do().
|
||||
ObjectSynchronizer::thread_local_used_oops_do(this, f);
|
||||
}
|
||||
}
|
||||
|
||||
void Thread::metadata_handles_do(void f(Metadata*)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue