For all Java 1.1 versions, the VM profiling option
-prof should be available.
To profile your application use the following command:
java -prof ApplicationClassName
|
java -prof:<filename> ApplicationClassName
|
To profile your applet, use:
appletviewer -J-prof URL
|
appletviewer -J-prof:<filename> URL
|
When the profiled applet or application normally
terminates its execution,
the Java
Virtual Machine creates a file containing the profile data collected
during the program run.
If <filename>
is not specified, java.prof is
created in the current directory.
Consecutive profiling runs will overwrite the file.
The -prof option uses tracing with reduction
and collects a call graph with
inclusive method clock times and method call counts.
The data is collected for the whole process (and not for individual threads),
throughout the execution time of the program.