mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
7200470: KeepAliveClosure not needed in CodeCache::do_unloading
Removed the unused keep_alive parameter Reviewed-by: stefank, dholmes, kamg, coleenp
This commit is contained in:
parent
d6538dc298
commit
fcae0353d2
9 changed files with 14 additions and 29 deletions
|
@ -1472,9 +1472,7 @@ void nmethod::flush_dependencies(BoolObjectClosure* is_alive) {
|
|||
|
||||
|
||||
// If this oop is not live, the nmethod can be unloaded.
|
||||
bool nmethod::can_unload(BoolObjectClosure* is_alive,
|
||||
OopClosure* keep_alive,
|
||||
oop* root, bool unloading_occurred) {
|
||||
bool nmethod::can_unload(BoolObjectClosure* is_alive, oop* root, bool unloading_occurred) {
|
||||
assert(root != NULL, "just checking");
|
||||
oop obj = *root;
|
||||
if (obj == NULL || is_alive->do_object_b(obj)) {
|
||||
|
@ -1583,8 +1581,7 @@ void nmethod::post_compiled_method_unload() {
|
|||
// GC to unload an nmethod if it contains otherwise unreachable
|
||||
// oops.
|
||||
|
||||
void nmethod::do_unloading(BoolObjectClosure* is_alive,
|
||||
OopClosure* keep_alive, bool unloading_occurred) {
|
||||
void nmethod::do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred) {
|
||||
// Make sure the oop's ready to receive visitors
|
||||
assert(!is_zombie() && !is_unloaded(),
|
||||
"should not call follow on zombie or unloaded nmethod");
|
||||
|
@ -1672,7 +1669,7 @@ void nmethod::do_unloading(BoolObjectClosure* is_alive,
|
|||
(r->oop_addr() >= oops_begin() && r->oop_addr() < oops_end()),
|
||||
"oop must be found in exactly one place");
|
||||
if (r->oop_is_immediate() && r->oop_value() != NULL) {
|
||||
if (can_unload(is_alive, keep_alive, r->oop_addr(), unloading_occurred)) {
|
||||
if (can_unload(is_alive, r->oop_addr(), unloading_occurred)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1684,7 +1681,7 @@ void nmethod::do_unloading(BoolObjectClosure* is_alive,
|
|||
// Scopes
|
||||
for (oop* p = oops_begin(); p < oops_end(); p++) {
|
||||
if (*p == Universe::non_oop_word()) continue; // skip non-oops
|
||||
if (can_unload(is_alive, keep_alive, p, unloading_occurred)) {
|
||||
if (can_unload(is_alive, p, unloading_occurred)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue