Java Reference
In-Depth Information
Produces a heap dump from the running process.
The histogram forms walk the JVMs allocation list. This includes both live and dead
(but not yet collected) objects. The histogram is organized by the type of objects
using memory, and is ordered from greatest to least number of bytes used by a par‐
ticular type. The standard form does not pause the JVM.
The live form ensures that it is accurate, by performing a full, stop-the-world
(STW) garbage collection before executing. As a result, it should not be used on a
production system at a time when a full GC would appreciably impact users.
For the -heap form, note that the production of a heap dump can be a time-
consuming process, and is STW. Note that for many processes, the resulting file may
be extremely large.
s d
Basic usage
javap <classname>
javap is the Java class disassembler—effectively a tool for peeking inside class files.
It can show the bytecode that Java methods have been compiled into, as well as the
“constant pool” information (which contains information similar to that of the sym‐
bol table of Unix processes).
P r o i l e s
By default, javap shows signatures of public , protected , and default methods. The
-p switch will also show private methods.
Common switches
Decompile bytecode
Verbose mode (include constant pool information)
Include private methods
The javap tool will work with any class file, provided javap is from a JDK version
the same as (or later) than the one that produced the file.
Search WWH ::

Custom Search