Skip to content

Commit

Permalink
8316002: Remove unnecessary seen_dead_loader in ClassLoaderDataGraph:…
Browse files Browse the repository at this point in the history
…:do_unloading

Backport-of: 50158f393e0b077b22886f44624ff23e65dedeb8
  • Loading branch information
GoeLin committed Apr 3, 2024
1 parent fa5cc58 commit 8d3151f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/hotspot/share/classfile/classLoaderDataGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,6 @@ bool ClassLoaderDataGraph::do_unloading() {
assert_locked_or_safepoint(ClassLoaderDataGraph_lock);

ClassLoaderData* prev = nullptr;
bool seen_dead_loader = false;
uint loaders_processed = 0;
uint loaders_removed = 0;

Expand All @@ -505,7 +504,6 @@ bool ClassLoaderDataGraph::do_unloading() {
} else {
// Found dead CLD.
loaders_removed++;
seen_dead_loader = true;
data->unload();

// Move dead CLD to unloading list.
Expand All @@ -523,7 +521,7 @@ bool ClassLoaderDataGraph::do_unloading() {

log_debug(class, loader, data)("do_unloading: loaders processed %u, loaders removed %u", loaders_processed, loaders_removed);

return seen_dead_loader;
return loaders_removed != 0;
}

// There's at least one dead class loader. Purge refererences of healthy module
Expand Down

1 comment on commit 8d3151f

@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.