HPjmeter 4.3 User's Guide
Profiling with jmap
Java 6.0 on HP-UX introduced a new tool, jmap, in the JDK. (Note that Sun Microsystems added
jmap in Java 5, but it did not ship with HP-UX until Java 6.) The jmap tool can generate a Java
heap dump file for later analysis by HPjmeter. To generate a heap dump, use a command like the
following:
jmap –dump:format=b,file=heapdump.hprof <pid>
You can now open the heapdump.hprof file in the HPjmeter console. You can obtain the pid
for a Java application using the jps command.
–Xeprof and –agentlib:hprof Profiling Options and Their Corresponding
Metrics
Table 6 lists the metrics or features available with each of the two profiling options used for collecting
data. An * (asterisk) after a metric means it is a combination of one or more measures. N/A (not
applicable) means the option is irrelevant to the particular feature.
Table 6 Available Metrics or Features from -Xeprof and -agentlib:hprof Data
-agentlib:hprof-XeprofFeature
heap=sitesheap=dumpcpu=timescpu=samples
N/AN/AYes
2
NoYesMethod Call Count (page 163)
N/AN/AYes
1
Yes
1
YesExclusive Method Times (CPU)
(page 164)
N/AN/ANoNoYesExclusive Method Clock Times
(page 164)
N/AN/AYes
2
NoYesCall Graph Tree with Call
Count (page 165)
N/AN/ANoNoYesCall Graph Tree with Clock
Time (page 165)
N/AN/AYes
1,2
Yes
1,2
YesCall Graph Tree with CPU
(page 165)
N/AN/AYes
1,2
Yes
1,2
YesInclusive Method CPU Times
(page 165)
N/AN/ANoNoYesInclusive Method Clock Times
(page 165)
Yes
3
Yes
3
Yes
3
Yes
3
YesThreads/Groups Histogram
YesNoYes
2
N/AYes
2,4
Objects Created by Method
(page 168)
YesNoYes
2
N/AYes
2,4
Created Objects (Count)
(page 168)
YesNoN/AN/ANoCreated Objects (Bytes)
(page 168)
NoYesN/AN/ANoLive Objects (Count)
(page 169)
NoYesN/AN/ANoLive Objects (Bytes) (page 169)
NoYesN/AN/ANoLive Array Sizes (page 169)
NoYesNoNoNoUnfinalized Objects
(page 169)
–Xeprof and –agentlib:hprof Profiling Options and Their Corresponding Metrics 79