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

Reviewed-by: coleenp
  • Loading branch information
Thomas Schatzl committed Sep 12, 2023
1 parent 6f2684b commit 50158f3
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

3 comments on commit 50158f3

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on 50158f3 Mar 29, 2024

Choose a reason for hiding this comment

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

/backport jdk21u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 50158f3 Mar 29, 2024

Choose a reason for hiding this comment

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

@GoeLin the backport was successfully created on the branch backport-GoeLin-50158f39 in my personal fork of openjdk/jdk21u-dev. To create a pull request with this backport targeting openjdk/jdk21u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 50158f39 from the openjdk/jdk repository.

The commit being backported was authored by Thomas Schatzl on 12 Sep 2023 and was reviewed by Coleen Phillimore.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21u-dev:

$ git fetch https://github.com/openjdk-bots/jdk21u-dev.git backport-GoeLin-50158f39:backport-GoeLin-50158f39
$ git checkout backport-GoeLin-50158f39
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21u-dev.git backport-GoeLin-50158f39

Please sign in to comment.