src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp
changeset 50572 6d4332f746ad
parent 50443 8e56de95ce10
child 50634 c349d409262a
--- a/src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp	Wed Jun 13 16:32:02 2018 -0700
+++ b/src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp	Thu Jun 14 21:49:46 2018 +0200
@@ -30,6 +30,7 @@
 #include "memory/allocation.hpp"
 #include "memory/resourceArea.hpp"
 #include "runtime/safepoint.hpp"
+#include "oops/reflectionAccessorImplKlassHelper.hpp"
 #include "utilities/globalDefinitions.hpp"
 #include "utilities/ostream.hpp"
 
@@ -202,9 +203,11 @@
       }
 
       if (print_classes) {
-
         if (_classes != NULL) {
           for (LoadedClassInfo* lci = _classes; lci; lci = lci->_next) {
+            // Non-anonymous classes should live in the primary CLD of its loader
+            assert(lci->_cld == _cld, "must be");
+
             branchtracker.print(st);
             if (lci == _classes) { // first iteration
               st->print("%*s ", indentation, "Classes:");
@@ -212,9 +215,15 @@
               st->print("%*s ", indentation, "");
             }
             st->print("%s", lci->_klass->external_name());
+
+            // Special treatment for generated core reflection accessor classes: print invocation target.
+            if (ReflectionAccessorImplKlassHelper::is_generated_accessor(lci->_klass)) {
+              st->print(" (invokes: ");
+              ReflectionAccessorImplKlassHelper::print_invocation_target(st, lci->_klass);
+              st->print(")");
+            }
+
             st->cr();
-            // Non-anonymous classes should live in the primary CLD of its loader
-            assert(lci->_cld == _cld, "must be");
           }
           branchtracker.print(st);
           st->print("%*s ", indentation, "");