Inspecting Contents of Shared Class Caches

The admincache tool provides a description of a shared class cache contents.

You can use the admincache tool -printStats option to obtain an overview describing the main contents of a shared class cache. For information about a specific cache, in a specific cache directory, use the -cacheName and -cacheDir options. The following example gives information about the nonrtCache cache in the default cache directory.
$ admincache -cacheName nonrtCache -printStats
J9 Java(TM) admincache 1.0
Licensed Materials - Property of IBM

(c) Copyright IBM Corp. 1991, 2008  All Rights Reserved
IBM is a registered trademark of IBM Corp.
Java and all Java-based marks and logos are trademarks or registered
trademarks of Sun Microsystems, Inc.


Current statistics for cache "nonrtCache":


base address       = 0xD5445000
end address        = 0xD6437000
allocation pointer = 0xD5529FA8

cache size         = 16776852
free bytes         = 14070360
ROMClass bytes     = 1166004
AOT bytes          = 1437412
Data bytes         = 57440
Metadata bytes     = 45636
Metadata % used    = 1%

# ROMClasses       = 372
# AOT Methods      = 981
# Classpaths       = 1
# URLs             = 0
# Tokens           = 0
# Stale classes    = 0
% Stale classes    = 0%

Cache is 16% full
Note: When using shared class caches, the name of the cache must not exceed 53 characters.
There are several pieces of useful information about this cache:

For more details about the information provided by the -printStats option in the admincache tool, see printStats utility.

The -printAllStats option provides a more detailed description of the contents of a shared class cache. The information includes the list of classes and AOT methods store in the cache. Output from the -printAllStats option is verbose.

Classes contained in the cache are indicated by lines similar to:
1: 0xD643B788 ROMCLASS: java/lang/ClassLoader at 0xD5469B88.
This line indicates that the class java/lang/ClassLoader is contained in the cache. The addresses are internal to the shared class cache, and are rarely useful except for diagnostic purposes.
AOT methods contained in the cache are indicated by lines similar to:
1: 0xD643B290 AOT: callerClassLoader
        for ROMClass java/lang/ClassLoader at 0xD5469B88.
These lines indicate that the callerClassLoader method from the java/lang/ClassLoader class is contained in the class. The addresses listed are internal shared cache addresses. Output from the -printAllStats option does not show the signature for each AOT method in the cache, where the signature consists of the parameter types and return type.

For more details about the information provided by the -printAllStats option in the admincache tool, see printAllStats utility.



© Copyright IBM Corporation 2005, 2010. All Rights Reserved.
© Copyright Sun Microsystems, Inc. 1997, 2007, 901 San Antonio Rd., Palo Alto, CA 94303 USA. All rights reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
This information center is powered by Eclipse technology. (http://www.eclipse.org/)