Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8264644: Add PrintClassLoaderDataGraphAtExit to print the detailed CLD graph #3323

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -945,9 +945,9 @@ void ClassLoaderData::print_on(outputStream* out) const {
out->print_cr("ClassLoaderData(" PTR_FORMAT ")", p2i(this));
out->print_cr(" - name %s", loader_name_and_id());
if (!_holder.is_null()) {
out->print (" - holder ");
_holder.print_on(out);
out->print_cr("");
out->print (" - holder ");
_holder.print_on(out);
out->print_cr("");
}
out->print_cr(" - class loader %p", _class_loader.ptr_raw());

This comment has been minimized.

@dholmes-ora

dholmes-ora Apr 6, 2021
Member

We don't use the %p in VM shared code as it behaves differently across platforms - use PTR_FORMAT.

out->print_cr(" - metaspace %p", _metaspace);
@@ -974,9 +974,9 @@ void ClassLoaderData::print_on(outputStream* out) const {
out->print_cr(" - unnamed module %p", _unnamed_module);
out->print_cr(" - dictionary %p", _dictionary);
if (_jmethod_ids != NULL) {
out->print (" - jmethod count ");
Method::print_jmethod_ids(this, out);
out->print_cr("");
out->print (" - jmethod count ");
Method::print_jmethod_ids(this, out);
out->print_cr("");
}
out->print_cr(" - deallocate list %p", _deallocate_list);
out->print_cr(" - next CLD %p", _next);
@@ -689,6 +689,9 @@ const intx ObjectAlignmentInBytes = 8;
notproduct(bool, PrintSystemDictionaryAtExit, false, \
"Print the system dictionary at exit") \
\
notproduct(bool, PrintClassLoaderDataGraphAtExit, false, \
"Print the class loader data graph at exit") \
\
product(bool, DynamicallyResizeSystemDictionaries, true, DIAGNOSTIC, \
"Dynamically resize system dictionaries as needed") \
\
@@ -330,6 +330,11 @@ void print_statistics() {
ResourceMark rm;
MutexLocker mcld(ClassLoaderDataGraph_lock);
SystemDictionary::print();
}

if (PrintClassLoaderDataGraphAtExit) {
ResourceMark rm;
MutexLocker mcld(ClassLoaderDataGraph_lock);
ClassLoaderDataGraph::print();
}

ProTip! Use n and p to navigate between commits in a pull request.