RFR (M) JDK-6479360 - detailed dumping of class size statistics
Ioi Lam
ioi.lam at oracle.com
Wed Jan 16 16:39:52 PST 2013
Please review:
http://cr.openjdk.java.net/~acorn/class_stats_010/
Bug: RFE: PrintClassHistogram improvements
https://jbs.oracle.com/bugs/browse/JDK-6479360
Sponsor: Karen Kinnear
Summary:
A new diagnostic command "jcmd GC.class_stats" is added. The user
can invoke this command to connect to a live JVM and dump a detailed
report of size statistics of all loaded classes (including array
classes and anonymous classes).
==========SYNOPSIS===================================
$ jcmd $PID help GC.class_stats
Provide statistics about Java class meta data.
Impact: High: Depends on Java heap size and content.
Syntax : GC.class_stats [options] [<columns>]
Arguments:
columns : [optional] Comma-separated list of all the columns to
show. If not specified, the following columns are shown:
InstBytes,KlassBytes,CpAll,annotations,MethodCount,Bytecodes,
MethodAll,ROAll,RWAll,Total (STRING, no default value)
Options: (options must be specified using the <key> or <key>=<value> syntax)
-all : [optional] Show all columns (BOOLEAN, false)
-csv : [optional] Print in CSV (comma-separated values) format for
spreadsheets (BOOLEAN, false)
-help : [optional] Show meaning of all the columns (BOOLEAN, false)
======================================================
By default, the output is human-readable tabulated text format. The
user can also select CSV format (comma-separated values) to be
used with spreadsheets.
A large number of columns are available. By default, a few "summary
columns" (e.g., size of Klass objects, total read-only data, etc)
are printed. The user can also manually select the columns.
Please see the attachments in the bug for sample output, as well as
a listing of all the columns and their meanings:
https://jbs.oracle.com/bugs/browse/JDK-6479360?focusedCommentId=13290360&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13290360
Impact:
If this diagnostic command is not used, there should be no
impact to the JVM's execution, except for
+ libjvm.so footprint increase (about 10KB larger on Linux/x64)
+ one additional virtual method in Klass.
This feature is excluded when INCLUDE_SERVICES=0 (e.g.,
embedded builds).
Tests run:
+ JPRT -- (hotspot only) to verify build-ability
+ Manually ran "jcmd $PID help GC.class_stats" on Linux/x64
+ I intend to add a new testcase once this is committed:
https://jbs.oracle.com/bugs/browse/JDK-8006413
Add utility classes for writing better multiprocess tests in jtreg
Thanks,
Ioi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20130116/94c0b077/attachment.html
More information about the hotspot-runtime-dev
mailing list