Table 5-2 Supported -agentlib:hprofoptions (continued)

depth=size

Controls the depth of the stack trace for each stack trace taken.

 

• Increasing this value will make the profile data file larger, but it

 

enables HPjmeter to better estimate inclusive method times and

 

generate more complete call graphs.

 

• If you measure application performance by sampling, the default

 

value of 4 is too small for most applications; use values between 6

 

and 12.

 

 

cutoff=value

This is the cut-off value for printing the list of methods with their

 

exclusive times or object allocation sites.

 

• Decreasing this value will make the profile data file slightly larger,

 

but it enables HPjmeter to produce more complete call graphs or

 

heap metrics.

 

• Use a value of 0 for all applications.

 

 

format=a ,format=b

HPjmeter displays both ASCII and binary format of the profile file.

 

NOTE: Note that hprof does not list method arguments. In effect,

 

all overloaded methods are represented as just one method.

Naming Profile Data Files

Table 5-3shows the default file types HPjmeter uses when saving profile data files. You may want to follow this convention when naming profile data files, but it is not required.

Table 5-3 Default File Name Suffixes for Profile Data

Profiling Option

File Name Suffix

 

 

-Xeprof

.eprof

 

 

-agentlib:hprof

.hprof.txt

 

 

For other file suffixes recognized by HPjmeter, see Naming Monitoring Data Files (page 39)

–Xeprof and –agentlib:hprof Profiling Options and Their Corresponding Metrics

Table 5-4lists 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 5-4 Available Metrics or Features from -Xeprofand -agentlib:hprofData

Feature

-Xeprof

 

-agentlib:hprof

 

 

 

 

 

 

 

 

 

cpu=samples

cpu=times

heap=dump

heap=sites

 

 

 

 

 

 

Method Call Count (page 140)

Yes

No

Yes2

N/A

N/A

Exclusive Method Times

Yes

Yes 1

Yes 1

N/A

N/A

(CPU) (page 141)

 

 

 

 

 

 

 

 

 

 

 

Exclusive Method Clock

Yes

No

No

N/A

N/A

Times (page 141)

 

 

 

 

 

 

 

 

 

 

 

Call Graph Tree with Call

Yes

No

Yes 2

N/A

N/A

Count (page 141)

 

 

 

 

 

 

 

 

 

 

 

Call Graph Tree with Clock

Yes

No

No

N/A

N/A

Time (page 142)

 

 

 

 

 

 

 

 

 

 

 

Call Graph Tree with CPU

Yes

Yes 1,2

Yes 1,2

N/A

N/A

(page 142)

 

 

 

 

 

 

 

 

 

 

 

–Xeprof and –agentlib:hprof Profiling Options and Their Corresponding Metrics

65