Child pages
  • Tutorial

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

First of all, extract aprof.jar from downloaded zip file with AProf binaries. That This JAR is the file you will be using.

Note, that you should not rename the aprof.jar file, otherwise it will not work.

Integrated Help

Running Aprof

Aprof comes with integrated help explaining all supported options and their default values. Execute the following line from the console to read it:

No Format
java -jar aprof.jar

You will see something like thatthat in order to profile your Java application with Aprof you should start JVM with -javaagent:aprof.jar option. For example, to profile well-known SwingSet2 demo you need to start it this way:

output
No Format
java -javaagent:aprof.jar -jar SwingSet2.jar

That's it! While you are using the demo, Aprof collects its memory allocation statistics and flushes it to aprof.txt file every minute.

Understanding Results