< 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     const char* const loader_name = _cld->loader_name();
 160 
 161     branchtracker.print(st);
 162 
 163     // e.g. "+--- jdk.internal.reflect.DelegatingClassLoader"
 164     st->print("+%.*s", BranchTracker::twig_len, "----------");
 165     st->print(" \"%s\",", loader_name);
 166     if (!_cld->is_the_null_class_loader_data()) {




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


< prev index next >