IBM User Guide for Java V7 on Windows > Troubleshooting and support > Using diagnostic tools > Shared classes diagnostic data > Understanding shared classes diagnostics output
printStats utility
The printStats utility prints summary information about the specified cache to the standard error output. You can optionally specify one or more types of cache content, such as AOT data or tokens, to see more detailed information about that type of content. To see detailed information about all the types of content in the cache, use the printAllStats utility instead.
The printStats utility is a suboption of -Xshareclasses. You can specify a cache name using the name=<name> parameter. printStats is a cache utility, so the JVM reports the information about the specified cache and then exits.
The following output shows example results after running the printStats utility without a parameter, to generate summary data only:
Cache created with: -Xnolinenumbers = false BCI Enabled = true Cache contains only classes with line numbers base address = 0x00002AAACE282000 end address = 0x00002AAACF266000 allocation pointer = 0x00002AAACE3A61B0 cache size = 16776608 free bytes = 6060232 ROMClass bytes = 1196464 AOT bytes = 0 Reserved space for AOT bytes = -1 Maximum space for AOT bytes = -1 JIT data bytes = 0 Reserved space for JIT data bytes = -1 Maximum space for JIT data bytes = -1 Zip cache bytes = 1054352 Data bytes = 114080 Metadata bytes = 24312 Metadata % used = 1% Class debug area size = 1331200 Class debug area used bytes = 150848 Class debug area % used = 11% Raw class data area size = 6995968 Raw class data used bytes = 1655520 Raw class data area % used = 23% # ROMClasses = 488 # AOT Methods = 0 # Classpaths = 1 # URLs = 0 # Tokens = 0 # Zip caches = 22 # Stale classes = 0 % Stale classes = 0% Cache is 28% full![]()
In the example output, -Xnolinenumbers = false means the cache was created without the -Xnolinenumbers option being specified.
BCI Enabled = true indicates that the cache was created with the -Xshareclasses:enableBCI suboption.
![]()
One of the following messages is displayed to indicate the line number status of classes in the shared cache:
- Cache contains only classes with line numbers
- JVM line number processing was enabled (the -Xnolinenumbers option was not specified) for all the classes that were put in this shared cache. All classes in the cache contain line numbers if the original classes contained line number data.
- Cache contains only classes without line numbers
- JVM line number processing was disabled (the -Xnolinenumbers option was specified) for all the classes that were put in this shared cache, so none of the classes contain line numbers.
- Cache contains classes with line numbers and classes without line numbers
- JVM line number processing was enabled for some classes and disabled for others (the -Xnolinenumbers option was specified when some of the classes were added to the cache).
The following summary data is displayed:
- baseAddress and endAddress
- The boundary addresses of the shared memory area containing the classes.
- allocPtr
- The address where ROMClass data is currently being allocated in the cache.
- cache size and free bytes
- cache size shows the total size of the shared memory area in bytes, and free bytes shows the free bytes remaining.
- ROMClass bytes
- The number of bytes of class data in the cache.
- AOT bytes
- The number of bytes of Ahead Of Time (AOT) compiled code in the cache.
- Reserved space for AOT bytes
- The number of bytes reserved for AOT compiled code in the cache.
- Maximum space for AOT bytes
- The maximum number of bytes of AOT compiled code that can be stored in the cache.
- JIT data bytes
- The number of bytes of JIT-related data stored in the cache.
- Reserved space for JIT data bytes
- The number of bytes reserved for JIT-related data in the cache.
- Maximum space for JIT data bytes
- The maximum number of bytes of JIT-related data that can be stored in the cache.
- Zip cache bytes
- The number of zip entry cache bytes stored in the cache.
- Data bytes
- The number of bytes of non-class data stored by the JVM.
- Metadata bytes
- The number of bytes of data stored to describe the cached classes.
- Metadata % used
- The proportion of metadata bytes to class bytes; this proportion indicates how efficiently cache space is being used. The value shown does consider the Class debug area size.
- Class debug area size
- The size in bytes of the Class Debug Area. This area is reserved to store LineNumberTable and LocalVariableTable class attribute information.
- Class debug area bytes used
- The size in bytes of the Class Debug Area that contains data.
- Class debug area % used
- The percentage of the Class Debug Area that contains data.
Raw class data area size
The size in bytes of the Raw Class Data Area. This area is reserved when the cache is created with -Xshareclasses:enableBCI, or -Xshareclasses:rcdSize=nnn. The original class file bytes for a ROMClass are stored here when enableBCI is used to create the cache.
Raw class data used bytes
The size in bytes of the Raw Class Data Area that contains data.
Raw class data area % used
The percentage of the Raw Class Data Area that contains data.
- # ROMClasses
- The number of classes in the cache. The cache stores ROMClasses (the class data itself, which is read-only) and it also stores information about the location from which the classes were loaded. This information is stored in different ways, depending on the Java™ SharedClassHelper API used to store the classes. For more information, see Using the Java Helper API.
- # AOT methods
- Optionally, ROMClass methods can be compiled and the AOT code stored in the cache. The # AOT methods information shows the total number of methods in the cache that have AOT code compiled for them. This number includes AOT code for stale classes.
- # Classpaths, URLs, and Tokens
- The number of classpaths, URLs, and tokens in the cache. Classes stored from a SharedClassURLClasspathHelper are stored with a Classpath. Classes stored using a SharedClassURLHelper are stored with a URL. Classes stored using a SharedClassTokenHelper are stored with a Token. Most class loaders, including the bootstrap and application class loaders, use a SharedClassURLClasspathHelper. The result is that it is most common to see Classpaths in the cache.
The number of Classpaths, URLs, and Tokens stored is determined by a number of factors. For example, every time an element of a Classpath is updated, such as when a .jar file is rebuilt, a new Classpath is added to the cache. Additionally, if "partitions" or "modification contexts" are used, they are associated with the Classpath, URL, or Token. A Classpath, URL, or Token is stored for each unique combination of partition and modification context. For more information about partitions, see SharedClassHelper partitions. For more information about modification contexts, see Modification contexts.
- # Zip caches
- The number of zips that have entry caches stored in the shared cache.
- # Stale classes
- The number of classes that have been marked as "potentially stale" by the cache code, because of an operating system update. See Understanding dynamic updates.
- % Stale classes
- The percentage of classes in the cache that have become stale.
- Cache is XXX% full
- The percentage of the cache that is currently used. The value displayed does not consider the Class debug area size. The calculation for this value is:
% Full = (('Cache Size' - 'Debug Area Size' - 'Free Bytes') * 100) / ('Cache Size' - 'Debug Area Size')
Generating more detailed information
You can use a parameter to specify one or more types of cache content. The printStats utility then provides more detailed information about that type of content, in addition to the summary data described previously. The detailed output is similar to the output from the printAllStats utility. For more information about the different types of cache content and the printAllStats utility, see printAllStats utility.
If you want to specify more than one type of cache content, use the plus symbol (+) to separate the values:
printStats[=type_1[+type_2][...]]For example, use printStats=classpath to see a list of class paths that are stored in the shared cache, or printStats=romclass+url to see information about ROMClasses and URLs.The following data types are valid. The values are not case sensitive:
- Help
- Prints a list of valid data types.
- All
- Prints information about all the following data types in the shared cache. This output is equivalent to the output produced by the printAllStats utility.
- Classpath
- Lists the class paths that are stored in the shared cache.
- URL
- Lists the URLs that are stored in the shared cache.
- Token
- Lists the tokens that are stored in the shared cache.
- ROMClass
- Prints information about the ROMClasses that are stored in the shared cache. This parameter does not print information about ROMMethods in ROMClasses.
- ROMMethod
- Prints ROMClasses and the ROMMethods in them.
- AOT
- Prints information about AOT compiled code in the shared cache.
- JITprofile
- Prints information about JIT data in the shared cache.
JIThint
Prints information about JIT data in the shared cache.
- ZipCache
- Prints information about zip entry caches that are stored in the shared cache.
Parent: Understanding shared classes diagnostics output