![]() Previous |
![]() Next |
For any given class name, more than one class may be loaded, provided every loaded class with that name was loaded by a different class loader. In some JVM environments, this is more common than in others. The various loaded classes may all be created from identical class files. Alternatively, they may be different versions of the same class, for example in an application server running two versions of the same application. They may also be completely different classes that just happen to use the same fully qualified class name, perhaps because naming conventions wasn't followed. Sometimes, leaks occur in only some of the loaded classes with a certain name, but not in the others.
Depending on the situation, it may be important to distinguish between classes with the same name. It other situations, it may not be significant. For this reason, the Trend tab and the Type Graph tab both provide two views of classes. By default, all classes with the same name are combined and displayed as a single Joined Type. The easiest way to tell if multiple classes with the same name exist is to look at the icon, since joined types have two class circles or sets of array brackets instead of just one. Further information may be obtained by placing your pointer over the type row. A tooltip will appear listing all classes that were joined into that type, as shown in Figure: Multiple Versions of the Same Type Tooltip. You can also enable additional columns in the table to show class loader information.
If one of the joined types is causing the problem, the entire joined type will appear red. You can then switch mode to display the individual classes and determine if the all seem to grow about the same or if any individual class can be singled out as being the cause.
Multiple Versions of the Same Type Tooltip

You can expand this view of the Trend tab to show types by class loader and then recombine them to return to the default view.
To split classes:
Click the Split Classes button:

When you split the classes, the Classloader and Classloader ID columns display the respective class loader information for each type.
To combine classes:
Click the Join Classes button:

Note that the Classloader and Classloader ID columns now display Multiple.