Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327433 - Display class loaders as tree in class loader explorer
Summary: Display class loaders as tree in class loader explorer
Status: RESOLVED FIXED
Alias: None
Product: MAT
Classification: Tools
Component: GUI (show other bugs)
Version: 1.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-11 06:47 EDT by Andrew Johnson CLA
Modified: 2011-01-11 00:53 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Johnson CLA 2010-10-11 06:47:22 EDT
The class loader explorer displays the parents of class loaders.

Sometimes it is useful to display the class loaders as a tree, so expanding a loader gives the children.
Comment 1 Andrew Johnson CLA 2010-10-11 06:49:37 EDT
I have some code to enhance the class loader explorer with a -tree option to display the loaders as a tree. I have also made the explorer examine a set of loaders if required rather than all of them, by specifying the loaders or classes loaded by the loaders or instances of classes loaded by loaders.
Comment 2 Andrew Johnson CLA 2011-01-11 00:53:31 EST
The enhancement has been made.
Here is an example of the output:

Class Name                                                                                                          | Defined Classes | No. of Instances
---------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                                                                    |                 |                 
com.ibm.oti.vm.BootstrapClassLoader @ 0x480ee0                                                                      |          15,597 |          117,703
sun.misc.Launcher$ExtClassLoader @ 0x483bb8                                                                         |             217 |              143
|- parent sun.misc.Launcher$AppClassLoader @ 0x48b200                                                               |           3,885 |            1,870
|  |- parent org.mortbay.start.Classpath$Loader @ 0x4eb458                                                          |             837 |              115
|  |  |- parent Cometd Test WebApp                                                                                  |             482 |              125
|  |  |- parent Test WebApp                                                                                         |              82 |                8
|  |  |- parent Test WebApp                                                                                         |              82 |                8
|  |  |- parent /leak                                                                                               |               6 |                3
|  |  |  |- demo.LeakServlet                                                                                        |                 |                1
|  |  |  |- demo.LeakServlet.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V|                 |                1
|  |  |  |- demo.LeakServlet.getOtherChars()[C                                                                      |                 |                1
|  |  |  |- demo.LeakServlet.<clinit>()V                                                                            |                 |                0
|  |  |  |- demo.LeakServlet.<init>()V                                                                              |                 |                0
|  |  |  |- demo.LeakServlet.getChars()[C                                                                           |                 |                0
|  |  |  '- Total: 6 entries                                                                                        |                 |                 
|  |  |- parent JAAS Test                                                                                           |               0 |                0