Home HProf Ant Task DashProf Ant Task Download

About DashProf

The hprof profiler was first introduced in JDK 1.2 (Java2), and was rather unreliable until JDK 1.3. Older JDKs supported a different profiling option, invoked as java -prof. The newer (JDK 1.2, 1.3, 1.4) still have backwards-compatible support for java -prof. In general, hprof is a more flexible and better option than java -prof, however there are a few instances when it is still useful:

For more information on java -prof, see the prophIt -prof page.

The dashprof Ant task makes it easy to profile any Java program using the standard Ant java task.

Quick Start

To get quickly up and running with java -prof, the first thing you should do is define a java Ant task in your Ant build file. Next, define the dashprof taskdef in your build file according to the following example:
  <taskdef name="dashprof" classname="net.sf.antprof.DashProf" classpath="/path/to/antprof.jar" />
Next, wrap a dashprof task around the java task:
  <target name="profile">
      <java classpathref="class.path" classname="your.Application" />
Finally, generate the profile data file by running:
  ant.bat profile
This command gathers CPU profile information and dumps it to the file java.prof when the Java VM exits. You can then load this profile into prophIt, or inspect it in a text editor.

Common Options

Note : No task attributes are required.
hotspotIf you are using the JDK 1.1 or JDK 1.2, AntProf automatically turns off the JIT compiler (including the HotSpot interpreter). If you are having trouble with dashprof in a newer version of Java, you can manually specify hotspot="no" and AntProf will turn off HotSpot. Yes

AntProf notes

SourceForge Ironworks.cc