Skip to content

Commit 24fae7a

Browse files
committedFeb 15, 2024
8324514: ClassLoaderData::print_on should print address of class loader
Backport-of: fb822e49f2a84423c8fd17db2e95bbdd5e7ec191
1 parent 786c5fb commit 24fae7a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎src/hotspot/share/classfile/classLoaderData.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,11 @@ void ClassLoaderData::print_on(outputStream* out) const {
10091009
_holder.print_on(out);
10101010
out->print_cr("");
10111011
}
1012-
out->print_cr(" - class loader " INTPTR_FORMAT, p2i(_class_loader.ptr_raw()));
1012+
if (!_unloading) {
1013+
out->print_cr(" - class loader " INTPTR_FORMAT, p2i(_class_loader.peek()));
1014+
} else {
1015+
out->print_cr(" - class loader <unloading, oop is bad>");
1016+
}
10131017
out->print_cr(" - metaspace " INTPTR_FORMAT, p2i(_metaspace));
10141018
out->print_cr(" - unloading %s", _unloading ? "true" : "false");
10151019
out->print_cr(" - class mirror holder %s", _has_class_mirror_holder ? "true" : "false");

1 commit comments

Comments
 (1)

openjdk-notifier[bot] commented on Feb 15, 2024

@openjdk-notifier[bot]
Please sign in to comment.