Skip to content

Commit

Permalink
8293584: CodeCache::old_nmethods_do incorrectly filters is_unloading …
Browse files Browse the repository at this point in the history
…nmethods

Reviewed-by: eosterlund, kvn
  • Loading branch information
coleenp committed Nov 21, 2022
1 parent 16ab754 commit 0800813
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/hotspot/share/code/codeCache.cpp
Expand Up @@ -1306,11 +1306,10 @@ void CodeCache::old_nmethods_do(MetadataClosure* f) {
if (old_compiled_method_table != NULL) {
length = old_compiled_method_table->length();
for (int i = 0; i < length; i++) {
CompiledMethod* cm = old_compiled_method_table->at(i);
// Only walk !is_unloading nmethods, the other ones will get removed by the GC.
if (!cm->is_unloading()) {
old_compiled_method_table->at(i)->metadata_do(f);
}
// Walk all methods saved on the last pass. Concurrent class unloading may
// also be looking at this method's metadata, so don't delete it yet if
// it is marked as unloaded.
old_compiled_method_table->at(i)->metadata_do(f);
}
}
log_debug(redefine, class, nmethod)("Walked %d nmethods for mark_on_stack", length);
Expand Down

1 comment on commit 0800813

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.