mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8058563: InstanceKlass::_dependencies list isn't cleared from empty nmethodBucket entries
Reviewed-by: mgerdin, vlivanov
This commit is contained in:
parent
db5f26110b
commit
0c74942fe6
6 changed files with 243 additions and 17 deletions
|
@ -1628,7 +1628,11 @@ void nmethod::flush_dependencies(BoolObjectClosure* is_alive) {
|
|||
// During GC the is_alive closure is non-NULL, and is used to
|
||||
// determine liveness of dependees that need to be updated.
|
||||
if (is_alive == NULL || klass->is_loader_alive(is_alive)) {
|
||||
InstanceKlass::cast(klass)->remove_dependent_nmethod(this);
|
||||
// The GC defers deletion of this entry, since there might be multiple threads
|
||||
// iterating over the _dependencies graph. Other call paths are single-threaded
|
||||
// and may delete it immediately.
|
||||
bool delete_immediately = is_alive == NULL;
|
||||
InstanceKlass::cast(klass)->remove_dependent_nmethod(this, delete_immediately);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue