< prev index next >

src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp

Print this page




 139 
 140   LoadedClassInfo* _classes;
 141   int _num_classes;
 142 
 143   LoadedClassInfo* _anon_classes;
 144   int _num_anon_classes;
 145 
 146   void print_with_childs(outputStream* st, BranchTracker& branchtracker,
 147       bool print_classes, bool verbose) const {
 148 
 149     ResourceMark rm;
 150 
 151     if (_cld == NULL) {
 152       // Not sure how this could happen: we added a preliminary node for a parent but then never encountered
 153       // its CLD?
 154       return;
 155     }
 156 
 157     // Retrieve information.
 158     const Klass* const loader_klass = _cld->class_loader_klass();
 159     const Symbol* const loader_name = _cld->class_loader_name();
 160 
 161     branchtracker.print(st);
 162 
 163     // e.g. "+--- jdk.internal.reflect.DelegatingClassLoader"
 164     st->print("+%.*s", BranchTracker::twig_len, "----------");
 165     if (_cld->is_the_null_class_loader_data()) {
 166       st->print(" <bootstrap>");
 167     } else {
 168       if (loader_name != NULL) {
 169         st->print(" \"%s\",", loader_name->as_C_string());
 170       }
 171       st->print(" %s", loader_klass != NULL ? loader_klass->external_name() : "??");
 172       st->print(" {" PTR_FORMAT "}", p2i(_loader_oop));
 173     }
 174     st->cr();
 175 
 176     // Output following this node (node details and child nodes) - up to the next sibling node
 177     // needs to be prefixed with "|" if there is a follow up sibling.
 178     const bool have_sibling = _next != NULL;
 179     BranchTracker::Mark trm(branchtracker, have_sibling);
 180 
 181     {
 182       // optional node details following this node needs to be prefixed with "|"
 183       // if there are follow up child nodes.
 184       const bool have_child = _child != NULL;
 185       BranchTracker::Mark trm(branchtracker, have_child);
 186 
 187       // Empty line
 188       branchtracker.print(st);
 189       st->cr();
 190 




 139 
 140   LoadedClassInfo* _classes;
 141   int _num_classes;
 142 
 143   LoadedClassInfo* _anon_classes;
 144   int _num_anon_classes;
 145 
 146   void print_with_childs(outputStream* st, BranchTracker& branchtracker,
 147       bool print_classes, bool verbose) const {
 148 
 149     ResourceMark rm;
 150 
 151     if (_cld == NULL) {
 152       // Not sure how this could happen: we added a preliminary node for a parent but then never encountered
 153       // its CLD?
 154       return;
 155     }
 156 
 157     // Retrieve information.
 158     const Klass* const loader_klass = _cld->class_loader_klass();

 159 
 160     branchtracker.print(st);
 161 
 162     // e.g. "+--- jdk.internal.reflect.DelegatingClassLoader"
 163     st->print("+%.*s", BranchTracker::twig_len, "----------");
 164     st->print(" %s,", _cld->loader_name_and_id());
 165     if (!_cld->is_the_null_class_loader_data()) {




 166       st->print(" %s", loader_klass != NULL ? loader_klass->external_name() : "??");
 167       st->print(" {" PTR_FORMAT "}", p2i(_loader_oop));
 168     }
 169     st->cr();
 170 
 171     // Output following this node (node details and child nodes) - up to the next sibling node
 172     // needs to be prefixed with "|" if there is a follow up sibling.
 173     const bool have_sibling = _next != NULL;
 174     BranchTracker::Mark trm(branchtracker, have_sibling);
 175 
 176     {
 177       // optional node details following this node needs to be prefixed with "|"
 178       // if there are follow up child nodes.
 179       const bool have_child = _child != NULL;
 180       BranchTracker::Mark trm(branchtracker, have_child);
 181 
 182       // Empty line
 183       branchtracker.print(st);
 184       st->cr();
 185 


< prev index next >