HPjmeter 4.3 User's Guide

must also ensure that the host name specified here must match the name of the host used in the
open session.
Use known_hosts file
Click the checkbox if the specified known_hosts file should be used to connect to the remote
host.
Use public key identity
Click the checkbox if the specified public key file should be used for logging in to the remote host.
If a public key is not used or a password is required, you will be prompted when the sftp connection
is opened.
Specify the directory
Set the directory on the local machine that will hold the eprof files when they are transferred.
Specify the port
Set the port used for the connection, usually 22.
The General section in the first half of the window is used to configure the sftp connection.
Set profiling duration
The slider control is used to set the duration of the profiling run. You can choose a value between
1 and 20 minutes for the profiling session. The JVM will automatically enable the profiler, collect
the data, and disable the profilier. Because the profiling operation can affect the runtime
performance of the Java application, HPjmeter sets an upper limit on the amount of time allowed
for profiling. To collect profiling data for a longer period of time, you must use the server side
zero-preparation mode or the Xeprof command line option.
Related Topics
Profiling with Zero Preparation (page 74).
Profiling with -Xeprof (page 72)
Specify the eprof files transfer
Click the checkbox if HPjmeter should copy the file over from the HP-UX system after profiling has
finished.
Specify to open the transferred files
If the file has been copied to the local system, click the checkbox to indicate whether HPjmeter
should open it.
Profiling with -agentlib:hprof
Java 2 introduced a profiling interface, called JVMPI (Java Virtual Machine Profiler Interface). This
interface came with a sample profiling agent, called hprof.
The Java 5.0 release introduced an improved profiling interface, called JVMTI (Java Virtual Machine
Tool Interface), which replaces JVMPI. The hprof agent is also available with JVMTI.
This agent creates profile data files that can be interpreted after the program terminates. However,
note that the format of the files may be still evolving. Most Java versions based on JavaSoft
implementations are compatible. Currently HPjmeter can read text and binary files.
To run your application with profiling, use the following command:
$ java ... -agentlib:hprof[=options] ApplicationClassName
To profile an applet, use the following command:
$ appletviewer ... -J-agentlib:hprof[=options] URL
76 Profiling Applications